src/audio/SDL_wave.c
changeset 2012 575d5c9d4db8
parent 1994 6abc7e6f9817
child 2669 e27bdcc80744
equal deleted inserted replaced
2011:b2b7154ce016 2012:575d5c9d4db8
   580             goto done;
   580             goto done;
   581         }
   581         }
   582     }
   582     }
   583 
   583 
   584     /* Don't return a buffer that isn't a multiple of samplesize */
   584     /* Don't return a buffer that isn't a multiple of samplesize */
   585     samplesize = ((spec->format & 0xFF) / 8) * spec->channels;
   585     samplesize = ((SDL_AUDIO_BITSIZE(spec->format)) / 8) * spec->channels;
   586     *audio_len &= ~(samplesize - 1);
   586     *audio_len &= ~(samplesize - 1);
   587 
   587 
   588   done:
   588   done:
   589     if (format != NULL) {
   589     if (format != NULL) {
   590         SDL_free(format);
   590         SDL_free(format);