discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] gr-audio OSX fixes test branch (take 2)


From: Alexandru Csete
Subject: Re: [Discuss-gnuradio] gr-audio OSX fixes test branch (take 2)
Date: Wed, 5 Mar 2014 00:37:57 +0100

Hi Michael,

Following your step by step guide, I could successfully test your
changes with the Funcube Dongle Pro+ and a few USB audio devices. I
tested using audio_fft.py and dial_tone.py. It really works great;
it's amazing when one can use almost random sample rates and the audio
system will take care of everything :)

I hope your patch can be committed very soon. Even if there are some
bugs left, it works far better than the current code.

Alex


On Sat, Mar 1, 2014 at 11:05 PM, Michael Dickens
<address@hidden> wrote:
> I just pushed the latest changes to my gr-audio OSX test branch:
> < https://github.com/michaelld/gnuradio/tree/fix_gr_audio_osx >
>
> fix gr-audio osx:
> + use GNU Radio preferences file to set default input and output audio 
> device, if provided;
> + use gr::logger for all non-debug messages;
> + case-insensitive string find with desired audio device name;
> + fixes buffer allocation bug with low sample rates;
> + allows using a specific (named) audio device, or the default;
> + handles the case when the selected audio device becomes unavailable (e.g., 
> a USB stick is removed while in use);
> + if no audio device name is provided, uses the default audio device as found 
> in System Preferences::Sound;
> + handles the case when the default audio device is in use, and the user 
> changes that audio device in System Preferences::Sound, by internally 
> resetting to use the newly selected audio device;
> + all non-Apple names are now lower_case, not CamelCase.
>
> I believe the behavior is now as discussed by Kevin, Tom, myself, and others. 
>  And, at least for me, everything works as desired on OSX 10.8.  These 
> changes should work back to at least OSX 10.4, maybe even earlier.
>
> If you want do use MacPorts to test out these changes, here's what I 
> recommend you do:
>
> 1) make sure the gnuradio-devel port is installed and up to date
> {{{
> sudo port -f deactivate installed and "gnuradio*"
> sudo port install gnuradio-devel
> sudo port selfupdate
> sudo port upgrade gnuradio-devel
> }}}
>
> 2) Download the patch for these fixes; you can get them via my github branch 
> above (commit 55eaa7da48), and I've also put them into my public DropBox 
> folder:
> < 
> https://dl.dropboxusercontent.com/u/16655336/gr-audio-osx-wip-2014-03-01.diff 
> >
>
> 3) Patch gnuradio-devel; change "/PATH/TO" to be the correct path to the 
> patch:
> {{{
> sudo port patch gnuradio-devel
> cd `port work gnuradio-devel`/gnuradio*
> sudo patch -p1 < /PATH/TO/gr-audio-osx-wip-2014-03-01.diff
> }}}
>
> 4) build gnuradio-devel:
> {{{
> sudo port build gnuradio-devel
> }}}
>
> 5) install the new gr audio library (assuming PREFIX=/opt/local; if not, 
> change the "cp" destination):
> {{{
> cd `port work gnuradio-devel`/build/gr-audio/lib
> sudo cp libgnuradio-audio.3.7.3git.dylib /opt/local/lib
> }}}
>
> 6) Try it out!  For example:
> {{{
> /opt/local/share/gnuradio/examples/audio/audio_fft.py -r 96000 -I FUN
> /opt/local/share/gnuradio/examples/audio/dial_tone.py -r 1200 -O BuIlT
> }}}
>
> Try different rates, and different I/O devices.  You should see LOG printouts 
> from "audio_osx_source" and "audio_osx_sink" with information about what it's 
> doing.
>
> Let me know what you think! - MLD
>
> ps> I intentionally am having you install gnuradio-devel then create a 
> patched version in case things got messed up, for 2 reasons:
>
> a) If things get messed up either building or after copying 
> libgnuradio-audio, you can clean it up by doing
> {{{
> sudo port -f deactivate gnuradio-devel
> sudo port activate gnuradio-devel
> }}}
> and start from go.
>
> b) Sometimes 'port' thinks it is being smart by looking at the available 
> (deactivated) versions of a port, comparing to what is being requested, and 
> then activating a port instead of finishing the install of what you already 
> have being compiled.  Adding in the "-s" (from source) does not always help.  
> Hence, my having you copy the library by hand -- it's not difficult, and it's 
> easy to clean up if things don't work right.
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

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