Mercurial > SDL_sound_CoreAudio
comparison decoders/aiff.c @ 369:d76a34316c84
Fixed to handle stereo AIFF files.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Mon, 24 Jun 2002 23:12:55 +0000 |
parents | 8ba541e81c1e |
children | cbb15ecf423a |
comparison
equal
deleted
inserted
replaced
368:84d6c604eaa9 | 369:d76a34316c84 |
---|---|
480 sample->actual.rate = c.sampleRate; | 480 sample->actual.rate = c.sampleRate; |
481 | 481 |
482 if (c.sampleSize <= 8) | 482 if (c.sampleSize <= 8) |
483 { | 483 { |
484 sample->actual.format = AUDIO_S8; | 484 sample->actual.format = AUDIO_S8; |
485 bytes_per_sample = 1; | 485 bytes_per_sample = c.numChannels; |
486 } /* if */ | 486 } /* if */ |
487 else if (c.sampleSize <= 16) | 487 else if (c.sampleSize <= 16) |
488 { | 488 { |
489 sample->actual.format = AUDIO_S16MSB; | 489 sample->actual.format = AUDIO_S16MSB; |
490 bytes_per_sample = 2; | 490 bytes_per_sample = 2 * c.numChannels; |
491 } /* if */ | 491 } /* if */ |
492 else | 492 else |
493 { | 493 { |
494 BAIL_MACRO("AIFF: Unsupported sample size.", 0); | 494 BAIL_MACRO("AIFF: Unsupported sample size.", 0); |
495 } /* else */ | 495 } /* else */ |