Bug#462753: libao2: need to clear the final period in alsa driver before closing it.
Morita Sho
morita-pub-en-debian at inz.sakura.ne.jp
Thu Feb 4 02:14:07 UTC 2010
Thank you so much for your detailed explanation!
I have built libao revision 16861 and installed it to /usr/local.
Then I recompiled reproduce_libao_bug.c with the following command:
% gcc -Wall -I/usr/local/include -L/usr/local/lib -lao -ldl -lm -o reproduce_libao_bug
reproduce_libao_bug.c
% ldd reproduce_libao_bug | grep libao
libao.so.4 => /usr/local/lib/libao.so.4 (0xb7895000)
This executable works properly. No noise at end of the playback.
I also tested with mmap by the following modification.
% diff -u reproduce_libao_bug.c reproduce_libao_bug_mmap.c
--- reproduce_libao_bug.c 2010-02-02 00:32:20.000000000 +0900
+++ reproduce_libao_bug_mmap.c 2010-02-04 09:23:49.000000000 +0900
@@ -64,6 +64,8 @@
int main(void)
{
ao_initialize();
+ ao_option *o=NULL;
+ ao_append_option(&o,"use_mmap","yes");
printf("reproduce_libao_bug: Using " AO_DRIVER " driver.\n");
@@ -78,7 +80,7 @@
format.rate = 22254;
format.byte_format = AO_FMT_LITTLE;
- device = ao_open_live(driver_id, &format, NULL);
+ device = ao_open_live(driver_id, &format, o);
if (device == NULL) {
fprintf(stderr, "Error opening device.\n");
return 1;
% gcc -Wall -I/usr/local/include -L/usr/local/lib -lao -ldl -lm -o reproduce_libao_bug_mmap
reproduce_libao_bug_mmap.c
This executable works properly, too.
It seems that both tests work fine. Let me know if you need additional tests.
> A question-- if the kernel is built with genuine OSS (no OSS emulation
> in ALSA, actual OSS) does the sound card still have this problem?
Hmm... I'm not sure because I'm not familiar with OSS...
--
Morita Sho <morita-pub-en-debian at inz.sakura.ne.jp>
More information about the pkg-xiph-maint
mailing list