Friday
May042012
GRCon2012 Call for Presentations
Friday, May 4, 2012 at 03:46PM We have opened up our call for presentations for the 2012 GNU Radio Conference.
We are inviting anyone interested in presenting their work at the conference to provide us with an abstract (500 words or less) about it.
Important dates are:
- June 29: Last day to submit an abstract
- July 13: Acceptance notifications for presentations
Tom Rondeau |
1 Comment | 
Reader Comments (1)
Dear Tom,
Gnuradio is very attractive to me.
I've been a long fun of Mac. I have recently tried using gnuradio 3.6.0 for my FUNcube. I have found a serious bug which kills Mac OSX version application. Audio sync never recovers once you call stop(). I found it is because of one of the flag, d_doAbort. Once set, this flag is never reset. I have fixed the code and now works as expected. I would like to share this for other people working on OSX. I don't know how to submit the code, so I would like to just write them down here.
I have also added one function to report file position, as I thought it is convenient when you load signal from the disk.
Best,
Masa
******** audio_osx_sink.cc ***********
--- original
bool audio_osx_sink::start ()
{
if (! IsRunning ()) {
OSStatus err = AudioOutputUnitStart (d_OutputAU);
CheckErrorAndThrow (err, "AudioOutputUnitStart", "audio_osx_sink::start");
}
return (true);
}
bool audio_osx_sink::stop ()
{
if (IsRunning ()) {
OSStatus err = AudioOutputUnitStop (d_OutputAU);
CheckErrorAndThrow (err, "AudioOutputUnitStop", "audio_osx_sink::stop");
for (UInt32 n = 0; n < d_n_channels; n++) {
d_buffers[n]->abort ();
}
}
return (true);
}
--- fixed
bool audio_osx_sink::start ()
{
if (! IsRunning ()) {
OSStatus err = AudioOutputUnitStart (d_OutputAU);
CheckErrorAndThrow (err, "AudioOutputUnitStart", "audio_osx_sink::start");
// Need to reset d_doAbort flag in circular_buffer
for (UInt32 n = 0; n < d_n_channels; n++) {
d_buffers[n]->resetAbort();
}
}
return (true);
}
bool audio_osx_sink::stop ()
{
if (IsRunning ()) {
OSStatus err = AudioOutputUnitStop (d_OutputAU);
CheckErrorAndThrow (err, "AudioOutputUnitStop", "audio_osx_sink::stop");
for (UInt32 n = 0; n < d_n_channels; n++) {
d_buffers[n]->abort();
}
}
return (true);
}
******** audio_osx_source.cc ***********
--- original
bool audio_osx_source::start ()
{
if (! IsRunning ()) {
OSStatus err = AudioOutputUnitStart (d_InputAU);
CheckErrorAndThrow (err, "AudioOutputUnitStart",
"audio_osx_source::start");
}
return (true);
}
--- fixed
bool audio_osx_source::start ()
{
if (! IsRunning ()) {
OSStatus err = AudioOutputUnitStart (d_InputAU);
CheckErrorAndThrow (err, "AudioOutputUnitStart",
"audio_osx_source::start");
// Need to reset d_doAbort flag in circular_buffer
for (UInt32 n = 0; n < d_n_user_channels; n++) {
d_buffers[n]->resetAbort();
}
}
return (true);
}
********* circular_buffer.h *********
--- original
void abort () {
gruel::scoped_lock l (*d_internal);
d_doAbort = true;
d_writeBlock->notify_one ();
d_readBlock->notify_one ();
};
};
#endif /* _CIRCULAR_BUFFER_H_ */
--- fixed
void abort () {
gruel::scoped_lock l (*d_internal);
d_doAbort = true;
d_writeBlock->notify_one ();
d_readBlock->notify_one ();
};
// d_doAbort flag becomes true by abort() after lock(), but there is no change to
// be false again even after unlock(). This stops the ring buffer update.
void resetAbort() {
d_doAbort = false;
};
};
#endif /* _CIRCULAR_BUFFER_H_ */
************ Reporting file position
********** gr_file_source.h ************
--- original
/*!
* \brief seek file to \p seek_point relative to \p whence
*
* \param seek_point sample offset in file
* \param whence one of SEEK_SET, SEEK_CUR, SEEK_END (man fseek)
*/
bool seek (long seek_point, int whence);
};
#endif /* INCLUDED_GR_FILE_SOURCE_H */
--- addition
/*!
* \brief seek file to \p seek_point relative to \p whence
*
* \param seek_point sample offset in file
* \param whence one of SEEK_SET, SEEK_CUR, SEEK_END (man fseek)
*/
bool seek (long seek_point, int whence);
/*!
* \brief return current file position
*/
fpos_t getpos(void) { fpos_t pos; fgetpos((FILE *) d_fp, &pos); return pos; }
};
#endif /* INCLUDED_GR_FILE_SOURCE_H */