Bug #623

gr::audio::osx_source, osx_sink do not correctly resume after stopping

Added by Kevin Reid 8 months ago. Updated 4 months ago.

Status:ClosedStart date:12/02/2013
Priority:NormalDue date:
Assignee:Michael Dickens% Done:

100%

Category:gr-audio-osxEstimated time:40.00 hours
Target version:release-3.7.3
Resolution:fixed

Description

If a flow graph containing an gr::audio::osx_source or an gr::audio::osx_sink is stopped and started, or locked and unlocked, then it will stop functioning correctly. The sink starts repeating a chunk of samples from when it was stopped, and the source delivers a constant (zero?) signal.

The attached program demonstrates the problem; it takes two parameters which should be 1 or 0 to specify whether the source and sink, respectively, should be replaced with new instances (which suppresses the problem, and allows testing the one that was not replaced).

I've taken a look at the code and it looks like the problem is that osx_sink::stop() will abort() the circular buffers, but not reset them in start(). (I haven't tried this proposed fix because I haven't yet figured out how to get a working environment for testing GR builds.)

Previous discussion of this bug affecting Gqrx: https://groups.google.com/d/topic/gqrx/EMEbTJHNKL0/discussion

audio-bug.py Magnifier (1017 Bytes) Kevin Reid, 12/02/2013 02:57 am

History

#1 Updated by Michael Dickens 8 months ago

The OSX audio sink and source have some sample rate issues too, and should honor the selected device setting as well; this task has been on my queue for a while now. I'll bump this up in priority.

#2 Updated by Johnathan Corgan 8 months ago

  • Status changed from New to Assigned

#3 Updated by Michael Dickens 6 months ago

  • % Done changed from 0 to 30

The sink should be mostly fixed; I need multiple audio output devices to test and fix the rest, and have ordered something that should do the trick. In the meantime, feel free to test out this branch: https://github.com/michaelld/gnuradio/tree/fix_gr_audio_osx_sink

#4 Updated by Florian Franzen 5 months ago

Wait, gnuradio is on github? Why do they have this redmine then? I am confused.

If I had known that I could have just issued a pull request myself. Sorry that you had to do all this extra work.

I will follow the pull request on github and report back to you.

#5 Updated by Michael Dickens 5 months ago

A number of us have a fork (or 2) of GR on github; even Rondeau does. It's a simple way to do work and get that work back into GR. gnuradio.org hosts the master GIT repository.

I need to re-do the sink and source to work better, which is what this branch (and, the next one I'm working on) represent. Your pull request to fix the start/stop would have been welcomed, and likely used, but I'd still need a little kick to get work done ... so, thanks! :)

#6 Updated by Michael Dickens 5 months ago

  • Target version set to release-3.7.3
  • % Done changed from 30 to 100
  • Estimated time set to 40.00
  • Resolution set to fixed

Fixed in 24dc96ad (2014-03-08).

#7 Updated by Johnathan Corgan 4 months ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF