PSP: Removed inlined copy of SDL_CalculateAudioSpec()'s functionality.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 27 Jan 2016 23:20:23 +0100
changeset 10058 d141e7945ddf
parent 10057 1599a0012da5
child 10059 25f67a2e77a0
PSP: Removed inlined copy of SDL_CalculateAudioSpec()'s functionality.
src/audio/psp/SDL_pspaudio.c
--- a/src/audio/psp/SDL_pspaudio.c	Tue Jan 26 22:20:05 2016 +0100
+++ b/src/audio/psp/SDL_pspaudio.c	Wed Jan 27 23:20:23 2016 +0100
@@ -66,20 +66,7 @@
     this->spec.freq = 44100;
 
     /* Update the fragment size as size in bytes. */
-/*  SDL_CalculateAudioSpec(this->spec); MOD */
-    switch (this->spec.format) {
-    case AUDIO_U8:
-        this->spec.silence = 0x80;
-        break;
-    default:
-        this->spec.silence = 0x00;
-        break;
-    }
-    this->spec.size = SDL_AUDIO_BITSIZE(this->spec.format) / 8;
-    this->spec.size *= this->spec.channels;
-    this->spec.size *= this->spec.samples;
-
-/* ========================================== */
+    SDL_CalculateAudioSpec(&this->spec);
 
     /* Allocate the mixing buffer.  Its size and starting address must
        be a multiple of 64 bytes.  Our sample count is already a multiple of