Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-19 Thread Michael Dickens
On Aug 19, 2010, at 1:31 AM, Elvis Dowson wrote: The issue manifests itself on both a VM and with GR running natively on my hardware (late 2009 iMac 27" i7). My US$0.02 worth: TTBOMK&M, on the Mac OS X side you can input and output about any sample rate & CoreAudio will handle the sample rat

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-18 Thread Elvis Dowson
Hi Eric, On Aug 19, 2010, at 5:35 AM, Eric Blossom wrote: > Elvis, do you understand the high level source of the problem? > That is, that there are two hardware devices whose clocks are not > synchronized? Yes, I do now, and that one possible solution is to rate match or buffer the sample data

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-18 Thread Johnathan Corgan
On Wed, Aug 18, 2010 at 18:35, Eric Blossom wrote: > The relative rates may be mismatched by less than 0.1%.  Even at that > level, on the average you'd need to be adding or dropping 1 sample > every 1000 to match the rates between the two clock domains. I've had (cheap) sound cards that require

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-18 Thread Eric Blossom
On Sat, Aug 14, 2010 at 03:16:38AM +0400, Elvis Dowson wrote: > Hi Eric, > > On Aug 13, 2010, at 8:38 PM, Eric Blossom wrote: > > > Given the interfaces exported by ALSA, you'd need to figure out how to > > honor the condition "ok_to_block == False". > > Could you please tell me the intent behin

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-18 Thread Eric Blossom
On Fri, Aug 13, 2010 at 09:59:20PM +0400, Elvis Dowson wrote: > Hi Eric, >Before I dive into it, I just have a quick question. > Why is it that others are not encountering the same issue? The same > example code was run on a Mac Pro dual quad machine belonging to > another member

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-13 Thread Elvis Dowson
Hi Eric, On Aug 13, 2010, at 8:38 PM, Eric Blossom wrote: > Given the interfaces exported by ALSA, you'd need to figure out how to > honor the condition "ok_to_block == False". Could you please tell me the intent behind the ok_to_block flag? By blocking, do you mean a synchronous call, which w

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-13 Thread Elvis Dowson
I guess, its perhaps an older version of GNU Radio, the one before the audio API changed. Best regards, Elvis ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-13 Thread Elvis Dowson
Hi Eric, Before I dive into it, I just have a quick question. Why is it that others are not encountering the same issue? The same example code was run on a Mac Pro dual quad machine belonging to another member of this forum, and he didn't face the issue of crackling and distorted

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-13 Thread Eric Blossom
On Fri, Aug 13, 2010 at 03:47:12AM +0400, Elvis Dowson wrote: > Hi Eric, >I came across an old thread, > http://www.ruby-forum.com/topic/107228 > > "There is a general issue related to the fact that when using > usrp_wfm_rcv and similar applications that there are in fact two cloc

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-13 Thread Elvis Dowson
Hi Alex, On Aug 13, 2010, at 12:39 PM, Alexandru Csete wrote: > > Maybe it is a driver issue. I suppose your iMac is the latest > generation (late 2009?) but the distributed alsa drivers are usually > older. Yes, my iMac 27" is a late 2009 model. $ sudo dmidecode -s system-product-name iMac

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-13 Thread Alexandru Csete
On 13 August 2010 01:02, Elvis Dowson wrote: > Hi, >      Another data point, if I set the audio sink sample rate to 16kHz, there > are no under-runs, but that obviously will cause the sound to play back at a > lower pitch, but atleast there are no crackles and distortions. In the > console out

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-12 Thread Philip Balister
On 08/12/2010 04:47 PM, Elvis Dowson wrote: Hi Eric, I came across an old thread, http://www.ruby-forum.com/topic/107228 "There is a general issue related to the fact that when using usrp_wfm_rcv and similar applications that there are in fact two clock domains, and that they ar

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-12 Thread Elvis Dowson
Hi Eric, I came across an old thread, http://www.ruby-forum.com/topic/107228 "There is a general issue related to the fact that when using usrp_wfm_rcv and similar applications that there are in fact two clock domains, and that they are guaranteed not to match. There's an osc on t

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-12 Thread Elvis Dowson
Hi, Another data point, if I set the audio sink sample rate to 16kHz, there are no under-runs, but that obviously will cause the sound to play back at a lower pitch, but atleast there are no crackles and distortions. In the console output window, there are no audio underruns. When you se

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-12 Thread Elvis Dowson
Hi, I was reading up on audio underruns, and basically its because the application isn't being able to generate enough data for the sound-card, i.e. GNU Radio generating data slower than the card is consuming the data. Ubuntu Studio Upgrade from Ubuntu - Community Ubuntu Documentation

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-12 Thread Eric Blossom
On Thu, Aug 12, 2010 at 09:29:35PM +0400, Elvis Dowson wrote: > Hi, > Would anyone happen to have an idea where I should start looking, > in order to debug the audio under-runs for the audio sink? Does the dial_tone.py example sound OK? Eric > Best regards, > Elvis Dowson ___

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-12 Thread Elvis Dowson
Hi, Would anyone happen to have an idea where I should start looking, in order to debug the audio under-runs for the audio sink? Best regards, Elvis Dowson ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-12 Thread Elvis Dowson
Hi Alex, On Aug 12, 2010, at 1:03 PM, Alexandru Csete wrote: > Try to resample the audio to 44.1 kHz or 48 kHz using a > rational_resampler block. That might solve it. Adding the Rational Resampler, with decimation = 2 and interpolation = 3, works in terms of resampling. The two separate wave f

Re: [Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-12 Thread Alexandru Csete
On 12 August 2010 09:24, Elvis Dowson wrote: > Hi, >        I have switched my linux environment from Fedora 12 to Ubuntu 10.04. > This gives me better network performance with the USRP2, even when running > Ubuntu 10.04 inside a VMware environment on Mac OS X 10.4. > However, real-time audio, e.g

[Discuss-gnuradio] Distorted playback of real-time audio on Linux

2010-08-12 Thread Elvis Dowson
Hi, I have switched my linux environment from Fedora 12 to Ubuntu 10.04. This gives me better network performance with the USRP2, even when running Ubuntu 10.04 inside a VMware environment on Mac OS X 10.4. However, real-time audio, e.g. an FM receiver application, when played back in r