Mercurial > SDL_sound_CoreAudio
comparison decoders/aiff.c @ 477:3e705c9180e5
Fixed binary compatibility, added Sound_GetDuration().
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 12 May 2004 02:15:00 +0000 |
parents | c66080364dff |
children | 8a814bbbedfa |
comparison
equal
deleted
inserted
replaced
475:f0b8865577db | 477:3e705c9180e5 |
---|---|
475 | 475 |
476 sample->actual.channels = (Uint8) c.numChannels; | 476 sample->actual.channels = (Uint8) c.numChannels; |
477 sample->actual.rate = c.sampleRate; | 477 sample->actual.rate = c.sampleRate; |
478 | 478 |
479 /* Really, sample->total_time = (c.numSampleFrames*1000) c.sampleRate */ | 479 /* Really, sample->total_time = (c.numSampleFrames*1000) c.sampleRate */ |
480 sample->total_time = (c.numSampleFrames / c.sampleRate) * 1000; | 480 internal->total_time = (c.numSampleFrames / c.sampleRate) * 1000; |
481 sample->total_time += (c.numSampleFrames % c.sampleRate) | 481 internal->total_time += (c.numSampleFrames % c.sampleRate) |
482 * 1000 / c.sampleRate; | 482 * 1000 / c.sampleRate; |
483 | 483 |
484 if (c.sampleSize <= 8) | 484 if (c.sampleSize <= 8) |
485 { | 485 { |
486 sample->actual.format = AUDIO_S8; | 486 sample->actual.format = AUDIO_S8; |
487 bytes_per_sample = c.numChannels; | 487 bytes_per_sample = c.numChannels; |