mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-04 16:31:15 -05:00
OSX fix-up
This commit is contained in:
parent
65ae1de36d
commit
76c68cc4fa
@ -56,17 +56,13 @@ void AudioThread::threadMain() {
|
||||
parameters.nChannels = 2;
|
||||
parameters.firstChannel = 0;
|
||||
unsigned int sampleRate = AUDIO_FREQUENCY;
|
||||
#ifdef __APPLE__
|
||||
unsigned int bufferFrames = 0;
|
||||
#else
|
||||
unsigned int bufferFrames = 256;
|
||||
#endif
|
||||
|
||||
RtAudio::StreamOptions opts;
|
||||
// opts.flags = RTAUDIO_SCHEDULE_REALTIME | RTAUDIO_MINIMIZE_LATENCY;
|
||||
// opts.flags = RTAUDIO_MINIMIZE_LATENCY;
|
||||
opts.streamName = "CubicSDR Audio Output";
|
||||
opts.priority = sched_get_priority_max(SCHED_FIFO);
|
||||
// opts.priority = sched_get_priority_max(SCHED_FIFO);
|
||||
|
||||
try {
|
||||
dac.openStream(¶meters, NULL, RTAUDIO_FLOAT32, sampleRate, &bufferFrames, &audioCallback, (void *) this, &opts);
|
||||
|
@ -154,7 +154,11 @@ bool DemodulatorInstance::isTerminated() {
|
||||
break;
|
||||
case DemodulatorThreadCommand::DEMOD_THREAD_CMD_DEMOD_TERMINATED:
|
||||
demodulatorThread = NULL;
|
||||
#ifdef __APPLE__
|
||||
pthread_join(t_Demod,NULL);
|
||||
#else
|
||||
t_Demod->join();
|
||||
#endif
|
||||
demodTerminated = true;
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user