From: atuc <at...@gm...> - 2009-01-17 14:07:36
|
-------- Original-Nachricht -------- Betreff: Re: [Iaxclient-devel] Re; iaxclient on Linux ... Datum: Sat, 17 Jan 2009 14:49:47 +0100 Von: Alexander Tuchacek <tuc...@kr...> An: Gareth Bult <ga...@en...> Referenzen: <11933176.342711232103683798.JavaMail.root@zimbra> Gareth Bult schrieb: > Hi, > > I've been developing with iaxclient on Linux and had a fair amount of success in general, but I'm now running up against the buffers. Linux (Ubuntu in particular) seem to be standardising on "PulseAudio", which generally works fine - when you start an Alsa or OSS application, it activates a plugin which connects to PluseAudio allowing different applications to output sound at the same time. Great! > > First problem I notice is that the ALSA option in portaudio doesn't work, apparently because it's trying to use a sample rate of 8000 when the minimum for alsa appears to be 44100. Anyway, this is bypassable by using OSS and /dev/dsp ... > > aoss <application> "looks" like it's going to work .. when I run the app and the app opens /dev/dsp, off it goes and the sound comes out nicely. However, when my iaxclient based app is outputting sound and I try to get another app to output sound - nothing happens! Conversely, if I'm playing a CD and I get an incoming call .. silence from my app! (the underlying code reports it was unable to open /dev/dsp) > > Checking other docs, apparently there is a specific issue with PortAudio which means it's about the only library out there which doesn't play ball with PulseAudio .. :-( > > It doesn't look like there's much going on with PortAudio any more, I've seen no end of recommendations that developers use *anything* else, and at the moment they don't even have a mailing list (!) , so are there any plans to move to OSS/ALSA/Pulse directly and remove PortAudio .. ? Alternatively are there any moves afoot to make PortAudio play nice with Pluse ?? > > .. or (!) can anyone suggest how I might get IAX2 working in a Linux app such that I can get sound from both the app and the rest of the Linux application base to run at the same time ?? > i use a the alsa dmix plugin for default, it forces samplerate convert to 44100, pulse audio shoes it as "My Alsa DMIX Soundcard" my .asoundrc: best alex > pcm.dmixer { > type dmix > ipc_key 1024 > ipc_perm 0666 # Andere Benutzer können ebenfalls dmix gleichzeitig nutzen > slave.pcm "snd_card" > slave { > pcm "hw:0,0" > # buffer_size kann bei Problemen der jeweiligen Karte angepasst werden. > period_time 0 > period_size 128 > buffer_size 8192 > # bei Störungen kann die Konvertierung auf die Rate 44100 eingeschaltet werden. > rate 44100 > # einige Soundkarten benötigen das exakte Datenformat (zB ice1712) > # format S32_LE > } > bindings { > 0 0 > 1 1 > } > } > > # Das dsnoop-Plugin, welches es erlaubt, mehrere Programme gleichzeitig aufnehmen zu lassen. > pcm.dsnooper { > type dsnoop > ipc_key 2048 > ipc_perm 0666 > slave.pcm "snd_card" > slave > { > pcm "hw:0,0" > period_time 0 > period_size 128 > buffer_size 8192 > # bei Störungen kann die Konvertierung auf die Rate 44100 eingeschaltet werden. > rate 44100 > # einige Soundkarten benötigen das exakte Datenformat (zB ice1712) > # format S32_LE > format S16_LE > } > bindings { > 0 0 > 1 1 > } > } > > # Dies definiert unser Fullduplex-Plugin als Standard für alle ALSA-Programme. > pcm.duplex { > type asym > playback.pcm "dmixer" > capture.pcm "dsnooper" > hint { > show on > description "My Alsa DMIX Soundcard " > } > } > > pcm.!default { > type plug > slave.pcm "duplex" > } > > |