On Thu, Jul 23, 2009 at 10:15 PM, Detlev Casanova<detlev.casan...@gmail.com> wrote: > On Thursday 23 July 2009 20:46:49 Tiago Salem Herrmann wrote: >> Hi, >> >> In order to be able to send voice clips in WLM I need to capture sound >> from a microphone. >> I've been searching how to do this using phonon, but as far as I can see >> there is still no support for sound capture. >> Does anyone have an idea on how I could do that in a good way and >> platform-independent? >> Is portaudio (www.portaudio.com) a good option? > > It can be, GStreamer is the best option currently, I think. > The problem won't be cross platform, it will be Linux. Linux has multiple > multimedia frameworks (GStreamer, PulseAudio, Jack,...) but some sound cards > allow only 1 application to use it at a time. That means that if Kopete uses > Portaudio and KNotify uses Phonon with GStreamer, one of them won't be able to > play anything. > > Why I think GStreamer is the best is because > (1) it's one of the engines used by Phonon and > (2) most linux applications are using GStreamer. > > I hope Phonon will have support for audio Input and audio output from a buffer > soon. > > Justin McPherson who works at Qt Software is working on Phonon to make it > access the sound card directly (dropping media engines like GStreamer and > Xine) but I haven't heard from that since some time now. > > But once again, programs using Phonon and programs using GStreamer will fight > to have access to the sound card. The main argument for developping Phonon is > that when you use Qt based applications (and so Phonon based), you should'nt > use GStreamer based applications at the same time. > > This problem does not appear under Windows because all applications should use > DirectX to deal with the sound card. Even GStreamer uses DirectX under > Windows. > > But well, GStreamer is platform independant, very powerfull and is the most > used. > If you want an examaple library, see psimedia : > > http://delta.affinix.com/psimedia/
GStreamer is very difficult to build under Windows and it does not work that well. The Phonon GStreamer backend does not work on Windows (although I've almost made it work). In addition to that, GStreamer requires the glib loop. On Linux, most (all?) distributions build Qt with the glib event loop but that's not the case in Windows. I can't speak for Mac (I don't own one) but I guess it's the same as Windows. May I suggest you use the linphone mediastreamer2 library? It's small, autocontained (it can use ffmpeg, theora, etc but it's optional) and works on Unix, Win32 and Mac. GPLv2. http://svn.savannah.gnu.org/viewvc/trunk/linphone/mediastreamer2/?root=linphone http://svn.savannah.gnu.org/viewvc/trunk/linphone/mediastreamer2/README?root=linphone&view=markup -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) _______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel