[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] initial gr-audio-portaudio

From: Martin Dvh
Subject: Re: [Discuss-gnuradio] initial gr-audio-portaudio
Date: Mon, 13 Mar 2006 15:52:25 +0100
User-agent: Debian Thunderbird 1.0.2 (X11/20051002)

Stephane Fillod wrote:
> On Sun, Mar 12, 2006 at 02:36:21PM -0500, Robert McGwier wrote:
>>That is why I put the message out.  It will be good to have a working 
>>starting point.
> Okay, there it is. Just checked in to gr-audio-portaudio repository.
> It's somewhat working, but there's still some static in the audio 
> output (tested with ALSA playback, mono and stereo). Some more work
> is needed.
> You will need the attached patchs:
> - against gnuradio-core: ot_gri_ringbuffer.patch
>       * src/lib/omnithread/omnithread.h: add omni_mutex::trylock
>       * src/lib/general/gri_ringbuffer.{cc,h},
>         src/lib/general/Makefile.am: new lockless ringbuffer (single
>           reader/single writer) taken from JACK software (GPL).
> - against portaudio-V19(CVS): portaudio-pkg-config.patch
>       * pkg-config .pc file with proper THREAD_FLAGS
> The code should be portable. I was missing the native Win32 call for
> mutex_trylock, so someone will have to find it, and define
> OMNI_MUTEX_TRYLOCK_IMPLEMENTATION in src/lib/omnithread/ot_nt.h,
> with appropriate semantic (return value).
I think you can do this with TryEnterCriticalSection
You could also use the omni_semaphore class defined in 
This latter one uses CreateSemaphore and WaitForSingleObject with some wrapper 
(you probably have to change all defines if you change to using omni_semaphore)


Another example of how it can be used (very much like our omni_semaphore class)

I don't have time to implement and test right now.
(I am working hard on finishing my gnuradio presentation for wednessday in 
If nobody implements it this week I will have a look next week.

> The gri_pa_find_device_by_name() function will have to be made more
> smart, like accepting which HostApi (ALSA, JACK, ..) is to be chosen,
> and which device from this API. A syntax will have to be agreed upon,
> like "ALSA:hw:0" or "OSS:/dev/dsp1".
> Have fun,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]