gr::audio::osx_source, osx_sink do not correctly resume after stopping
|Assignee:||Michael Dickens||% Done:|
|Category:||gr-audio-osx||Estimated time:||40.00 hours|
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
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
#3 Updated by Michael Dickens almost 2 years 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 almost 2 years 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 almost 2 years 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! :)