From: Nathaniel Gray <n8gray@caltech.edu>
To: alsa-devel@lists.sourceforge.net
Subject: dmix plugin problems -- Resend
Date: Mon, 26 May 2003 15:28:32 -0700 [thread overview]
Message-ID: <200305261528.32421.n8gray@caltech.edu> (raw)
I'm sending this again since I got no response the first time and dmix
does not appear to be under heavy development, despite how incredibly
useful it would be if it worked.
[n8gray@golux alsa-lib-0.9.3]$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 0.9.3a.
Compiled on May 9 2003 for kernel 2.4.21-0.16mm-mdkcustom.
Using alsa-libs 0.9.3.
The dmix plugin seems to be very unreliable, or else maybe I'm not
setting it up correctly. Here's my asoundrc:
=================== .asoundrc ===================
pcm.intel8x0 {
type hw
card 0
}
ctl.intel8x0 {
type hw
card 0
}
pcm.mydmix {
type dmix
ipc_key 12349
ipc_key_add_uid true
slave {
pcm "hw:0,0"
# Setting this rate to 44100 seems to help
rate 44100
}
}
ctl.mydmix {
type hw
card 0
}
pcm.mixed {
type plug
slave {
pcm mydmix
}
}
ctl.mixed {
type hw
card 0
}
=================================================
If I run this command nothing happens:
[n8gray@golux sounds]$ aplay -D mixed KDE_Beep_ClockChime.wav
Playing WAVE 'KDE_Beep_ClockChime.wav' : Unsigned 8 bit, Rate 7418 Hz,
Mono
I get no sound, no error, aplay uses no cpu time. Here's the tail end
of the same command under strace:
open("KDE_Beep_ClockChime.wav", O_RDONLY) = 5
read(5, "RIFF\256\17\0\0WAVEfmt \20\0\0\0\1\0\1\0", 24) = 24
read(5, "\372\34", 2) = 2
read(5, "\0\0\372\34\0\0\1\0\10\0", 10) = 10
read(5, "data\212\17\0\0", 8) = 8
write(2, "Playing WAVE \'KDE_Beep_ClockChim"..., 41Playing WAVE
'KDE_Beep_ClockChime.wav' : ) = 41
write(2, "Unsigned 8 bit, ", 16Unsigned 8 bit, ) = 16
write(2, "Rate 7418 Hz, ", 14Rate 7418 Hz, ) = 14
write(2, "Mono", 4Mono) = 4
write(2, "\n", 1
) = 1
shmget(IPC_PRIVATE, 49152, 0x1b6|0666) = 10747908
shmat(10747908, 0, 0) = 0x40274000
shmget(IPC_PRIVATE, 12288, 0x1b6|0666) = 10780677
shmat(10780677, 0, 0) = 0x40023000
read(5, "G\214j\313\267hqG\234\250Yn;\206\274[e=t\305\207\217FM"...,
927) = 927
read(5, "\206\177U\217\214\207\211S\201\215\211\231[p\204\201\242"...,
927) = 927
poll([at this point the program just hangs]
If I run this command it completes but I get no sound output:
[n8gray@golux sounds]$ aplay -D mixed pop.wav
Playing WAVE 'pop.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Mono
The same file plays properly (with sound) if I leave out the "-D mixed"
flag. This command, however, works perfectly:
[n8gray@golux sounds]$ aplay -D mixed info.wav
Playing WAVE 'info.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Mono
If I actually try to mix two streams, though, I get xruns and cracks in
the sound:
[n8gray@golux sounds]$ aplay -D mixed info.wav & aplay -D mixed info.wav
[1] 12952
Playing WAVE 'info.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Mono
Playing WAVE 'info.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Mono
xrun!!! (at least 0.030 ms long)
xrun!!! (at least 0.008 ms long)
[1]+ Done aplay -D mixed info.wav
I've tried this experiment with long sounds to try to eliminate any
startup inefficiency, but the cracks last as long as the streams are
being mixed.
I'll be glad to help debug in any way I can. I've tried using the C
versions of mix_areas1 and mix_areas2 and it doesn't help any of these
problems.
Thanks,
-Nathan
--
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
next reply other threads:[~2003-05-26 22:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-26 22:28 Nathaniel Gray [this message]
2003-05-26 23:48 ` dmix plugin problems -- Resend David E. Storey
2003-05-27 4:16 ` Nathaniel Gray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200305261528.32421.n8gray@caltech.edu \
--to=n8gray@caltech.edu \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.