Removed unneeded Android audio code
authorSam Lantinga
Thu, 08 Aug 2013 21:16:29 -0700
changeset 761327e0ae109c71
parent 7612 627d571587d3
child 7614 af0bd07212bd
Removed unneeded Android audio code
src/audio/android/SDL_androidaudio.c
     1.1 --- a/src/audio/android/SDL_androidaudio.c	Thu Aug 08 21:25:09 2013 -0300
     1.2 +++ b/src/audio/android/SDL_androidaudio.c	Thu Aug 08 21:16:29 2013 -0700
     1.3 @@ -50,12 +50,6 @@
     1.4  
     1.5      audioDevice = this;
     1.6  
     1.7 -    this->hidden = (struct SDL_PrivateAudioData *) SDL_malloc(sizeof(*(this->hidden)));
     1.8 -    if (!this->hidden) {
     1.9 -        return SDL_OutOfMemory();
    1.10 -    }
    1.11 -    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
    1.12 -
    1.13      test_format = SDL_FirstAudioFormat(this->spec.format);
    1.14      while (test_format != 0) { /* no "UNKNOWN" constant */
    1.15          if ((test_format == AUDIO_U8) || (test_format == AUDIO_S16LSB)) {
    1.16 @@ -91,13 +85,6 @@
    1.17          /* Init failed? */
    1.18          return SDL_SetError("Java-side initialization failed!");
    1.19      }
    1.20 -    
    1.21 -    /* Audio thread is started here, after audio buffers and Java's AudioTrack are in place and ready to go */
    1.22 -    this->thread = SDL_CreateThread(SDL_RunAudio, "AndroidAudioThread", this);
    1.23 -    if (this->thread == NULL) {
    1.24 -        AndroidAUD_CloseDevice(this);
    1.25 -        return SDL_SetError("Couldn't create audio thread");
    1.26 -    }
    1.27  
    1.28      return 0;
    1.29  }
    1.30 @@ -120,11 +107,6 @@
    1.31      /* At this point SDL_CloseAudioDevice via close_audio_device took care of terminating the audio thread
    1.32         so it's safe to terminate the Java side buffer and AudioTrack
    1.33       */
    1.34 -   
    1.35 -    if (this->hidden != NULL) {
    1.36 -        SDL_free(this->hidden);
    1.37 -        this->hidden = NULL;
    1.38 -    }
    1.39      Android_JNI_CloseAudioDevice();
    1.40  
    1.41      if (audioDevice == this) {
    1.42 @@ -142,7 +124,6 @@
    1.43      impl->CloseDevice = AndroidAUD_CloseDevice;
    1.44  
    1.45      /* and the capabilities */
    1.46 -    impl->ProvidesOwnCallbackThread = 1;
    1.47      impl->HasCaptureSupport = 0; /* TODO */
    1.48      impl->OnlyHasDefaultOutputDevice = 1;
    1.49      impl->OnlyHasDefaultInputDevice = 1;