Android/openslES: fix warnings, comment out un-used interface
authorSylvain Becker <sylvain.becker@gmail.com>
Tue, 05 Feb 2019 15:14:15 +0100
changeset 12598d3acc7299a95
parent 12597 b5ea5997cbf9
child 12599 e9be1aa42927
Android/openslES: fix warnings, comment out un-used interface
src/audio/openslES/SDL_openslES.c
     1.1 --- a/src/audio/openslES/SDL_openslES.c	Tue Feb 05 15:09:41 2019 +0100
     1.2 +++ b/src/audio/openslES/SDL_openslES.c	Tue Feb 05 15:14:15 2019 +0100
     1.3 @@ -46,7 +46,7 @@
     1.4  
     1.5  /* engine interfaces */
     1.6  static SLObjectItf engineObject = NULL;
     1.7 -static SLEngineItf engineEngine;
     1.8 +static SLEngineItf engineEngine = NULL;
     1.9  
    1.10  /* output mix interfaces */
    1.11  static SLObjectItf outputMixObject = NULL;
    1.12 @@ -59,9 +59,11 @@
    1.13  static SLObjectItf                   bqPlayerObject      = NULL;
    1.14  static SLPlayItf                     bqPlayerPlay        = NULL;
    1.15  static SLAndroidSimpleBufferQueueItf bqPlayerBufferQueue = NULL;
    1.16 -/*static SLEffectSendItf          bqPlayerEffectSend = NULL; */
    1.17 +#if 0
    1.18 +static SLEffectSendItf               bqPlayerEffectSend  = NULL;
    1.19  static SLMuteSoloItf                 bqPlayerMuteSolo    = NULL;
    1.20  static SLVolumeItf                   bqPlayerVolume      = NULL;
    1.21 +#endif
    1.22  
    1.23  #if 0
    1.24  /* recorder interfaces TODO */
    1.25 @@ -191,26 +193,7 @@
    1.26  bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context)
    1.27  {
    1.28      struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) context;
    1.29 -    static int t = 0;
    1.30 -
    1.31 -    /* assert(bq == bqPlayerBufferQueue); */
    1.32 -    /* assert(NULL == context); */
    1.33 -
    1.34 -    /* for streaming playback, replace this test by logic to find and fill the next buffer */
    1.35 -#if 0
    1.36 -    if (--nextCount > 0 && NULL != nextBuffer && 0 != nextSize)
    1.37 -    {
    1.38 -        SLresult result;
    1.39 -
    1.40 -        /* enqueue another buffer */
    1.41 -        result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, nextBuffer, nextSize);
    1.42 -        /* the most likely other result is SL_RESULT_BUFFER_INSUFFICIENT, */
    1.43 -        /* which for this code example would indicate a programming error */
    1.44 -        assert(SL_RESULT_SUCCESS == result);
    1.45 -        (void) result;
    1.46 -    }
    1.47 -#endif
    1.48 -    LOGI("SLES: Playback Callmeback %u", t++);
    1.49 +    LOGI("SLES: Playback Callmeback");
    1.50      SDL_SemPost(audiodata->playsem);
    1.51      return;
    1.52  }
    1.53 @@ -236,14 +219,12 @@
    1.54  openslES_CreatePCMPlayer(_THIS)
    1.55  {
    1.56      struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden;
    1.57 -
    1.58      SLDataFormat_PCM format_pcm;
    1.59 -
    1.60 -    SDL_AudioFormat test_format = 0;
    1.61      SLresult result;
    1.62      int i;
    1.63  
    1.64  #if 0
    1.65 +    SDL_AudioFormat test_format = 0;
    1.66  
    1.67        test_format = SDL_FirstAudioFormat( this->spec.format );
    1.68  
    1.69 @@ -391,12 +372,14 @@
    1.70      (void) result;
    1.71  #endif
    1.72  
    1.73 +#if 0
    1.74      /* get the volume interface */
    1.75      result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_VOLUME, &bqPlayerVolume);
    1.76      if (SL_RESULT_SUCCESS != result) {
    1.77          LOGE("SL_IID_VOLUME interface get failed");
    1.78          /* goto failed; */
    1.79      }
    1.80 +#endif
    1.81  
    1.82      /* Create the audio buffer semaphore */
    1.83      audiodata->playsem = SDL_CreateSemaphore(NUM_BUFFERS - 1);
    1.84 @@ -454,9 +437,11 @@
    1.85          bqPlayerObject = NULL;
    1.86          bqPlayerPlay = NULL;
    1.87          bqPlayerBufferQueue = NULL;
    1.88 -        /* bqPlayerEffectSend = NULL; */
    1.89 +#if 0
    1.90 +        bqPlayerEffectSend = NULL;
    1.91          bqPlayerMuteSolo = NULL;
    1.92          bqPlayerVolume = NULL;
    1.93 +#endif
    1.94      }
    1.95  
    1.96      if (audiodata->playsem) {