OSX fix-up

This commit is contained in:
Charles J. Cliffe 2014-12-16 00:22:33 -05:00
parent 65ae1de36d
commit 76c68cc4fa
2 changed files with 5 additions and 5 deletions

View File

@ -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(&parameters, NULL, RTAUDIO_FLOAT32, sampleRate, &bufferFrames, &audioCallback, (void *) this, &opts);

View File

@ -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: