Fixed Mac OS X build release-2.0.6
authorSam Lantinga <slouken@libsdl.org>
Fri, 22 Sep 2017 11:25:52 -0700
changeset 115258df7a59b5528
parent 11524 037bbd73cdf8
child 11526 d0748685683f
Fixed Mac OS X build
src/audio/coreaudio/SDL_coreaudio.m
     1.1 --- a/src/audio/coreaudio/SDL_coreaudio.m	Fri Sep 22 11:15:57 2017 -0700
     1.2 +++ b/src/audio/coreaudio/SDL_coreaudio.m	Fri Sep 22 11:25:52 2017 -0700
     1.3 @@ -675,14 +675,13 @@
     1.4      }
     1.5  
     1.6      /* Make sure we can feed the device a minimum amount of time */
     1.7 -    double MINIMUM_AUDIO_BUFFER_TIME_MS;
     1.8 +    double MINIMUM_AUDIO_BUFFER_TIME_MS = 15.0;
     1.9 +#if defined(__IPHONEOS__)
    1.10      if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) {
    1.11 -        /* Older hardware, use 40 ms as a minimum time */
    1.12 +        /* Older iOS hardware, use 40 ms as a minimum time */
    1.13          MINIMUM_AUDIO_BUFFER_TIME_MS = 40.0;
    1.14 -    } else {
    1.15 -        /* Newer hardware, use 15 ms as a minimum time */
    1.16 -        MINIMUM_AUDIO_BUFFER_TIME_MS = 15.0;
    1.17      }
    1.18 +#endif
    1.19      const double msecs = (this->spec.samples / ((double) this->spec.freq)) * 1000.0;
    1.20      int numAudioBuffers = 2;
    1.21      if (msecs < MINIMUM_AUDIO_BUFFER_TIME_MS) {  /* use more buffers if we have a VERY small sample set. */