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.nChannels = 2;
parameters.firstChannel = 0; parameters.firstChannel = 0;
unsigned int sampleRate = AUDIO_FREQUENCY; unsigned int sampleRate = AUDIO_FREQUENCY;
#ifdef __APPLE__
unsigned int bufferFrames = 0;
#else
unsigned int bufferFrames = 256; unsigned int bufferFrames = 256;
#endif
RtAudio::StreamOptions opts; RtAudio::StreamOptions opts;
// opts.flags = RTAUDIO_SCHEDULE_REALTIME | RTAUDIO_MINIMIZE_LATENCY; // opts.flags = RTAUDIO_SCHEDULE_REALTIME | RTAUDIO_MINIMIZE_LATENCY;
// opts.flags = RTAUDIO_MINIMIZE_LATENCY; // opts.flags = RTAUDIO_MINIMIZE_LATENCY;
opts.streamName = "CubicSDR Audio Output"; opts.streamName = "CubicSDR Audio Output";
opts.priority = sched_get_priority_max(SCHED_FIFO); // opts.priority = sched_get_priority_max(SCHED_FIFO);
try { try {
dac.openStream(&parameters, NULL, RTAUDIO_FLOAT32, sampleRate, &bufferFrames, &audioCallback, (void *) this, &opts); dac.openStream(&parameters, NULL, RTAUDIO_FLOAT32, sampleRate, &bufferFrames, &audioCallback, (void *) this, &opts);

View File

@ -154,7 +154,11 @@ bool DemodulatorInstance::isTerminated() {
break; break;
case DemodulatorThreadCommand::DEMOD_THREAD_CMD_DEMOD_TERMINATED: case DemodulatorThreadCommand::DEMOD_THREAD_CMD_DEMOD_TERMINATED:
demodulatorThread = NULL; demodulatorThread = NULL;
#ifdef __APPLE__
pthread_join(t_Demod,NULL);
#else
t_Demod->join(); t_Demod->join();
#endif
demodTerminated = true; demodTerminated = true;
break; break;
default: default: