comparison src/audio/SDL_wave.c @ 2012:575d5c9d4db8

Continuing my quest to replace all the bitwise operations on SDL_AudioFormats with the new 1.3 macros...
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 01 Sep 2006 19:16:26 +0000
parents 6abc7e6f9817
children e27bdcc80744
comparison
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);