Skip to content

Commit

Permalink
Fixed Mac OS X build
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 22, 2017
1 parent 28602b1 commit fe6b8f1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/audio/coreaudio/SDL_coreaudio.m
Expand Up @@ -675,14 +675,13 @@ static BOOL update_audio_session(_THIS, SDL_bool open)
}

/* Make sure we can feed the device a minimum amount of time */
double MINIMUM_AUDIO_BUFFER_TIME_MS;
double MINIMUM_AUDIO_BUFFER_TIME_MS = 15.0;
#if defined(__IPHONEOS__)
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) {
/* Older hardware, use 40 ms as a minimum time */
/* Older iOS hardware, use 40 ms as a minimum time */
MINIMUM_AUDIO_BUFFER_TIME_MS = 40.0;
} else {
/* Newer hardware, use 15 ms as a minimum time */
MINIMUM_AUDIO_BUFFER_TIME_MS = 15.0;
}
#endif
const double msecs = (this->spec.samples / ((double) this->spec.freq)) * 1000.0;
int numAudioBuffers = 2;
if (msecs < MINIMUM_AUDIO_BUFFER_TIME_MS) { /* use more buffers if we have a VERY small sample set. */
Expand Down

0 comments on commit fe6b8f1

Please sign in to comment.