diff options
author | Matthew Hoops | 2011-04-10 15:11:03 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-04-10 15:11:03 -0400 |
commit | 9d0e5a7132341b1f9d31fa775cb4f98fa95b73a6 (patch) | |
tree | c90d56878ba1049a922e8eaa867b1b77655a6420 /audio/decoders | |
parent | f9413e4dc26081f59247fa7eae62f50258e92fa4 (diff) | |
download | scummvm-rg350-9d0e5a7132341b1f9d31fa775cb4f98fa95b73a6.tar.gz scummvm-rg350-9d0e5a7132341b1f9d31fa775cb4f98fa95b73a6.tar.bz2 scummvm-rg350-9d0e5a7132341b1f9d31fa775cb4f98fa95b73a6.zip |
ALL: Add/update some comments
Diffstat (limited to 'audio/decoders')
-rw-r--r-- | audio/decoders/aac.cpp | 3 | ||||
-rw-r--r-- | audio/decoders/quicktime.h | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/audio/decoders/aac.cpp b/audio/decoders/aac.cpp index fb867250b7..b38d4e03b4 100644 --- a/audio/decoders/aac.cpp +++ b/audio/decoders/aac.cpp @@ -128,6 +128,7 @@ int AACStream::readBuffer(int16 *buffer, const int numSamples) { assert((numSamples % _channels) == 0); + // Dip into our remaining samples pool if it's available if (_remainingSamples) { samples = MIN<int>(numSamples, _remainingSamplesSize - _remainingSamplesPos); @@ -140,6 +141,7 @@ int AACStream::readBuffer(int16 *buffer, const int numSamples) { } } + // Decode until we have enough samples (or there's no more left) while (samples < numSamples && !endOfData()) { NeAACDecFrameInfo frameInfo; uint16 *decodedSamples = (uint16 *)NeAACDecDecode(_handle, &frameInfo, _inBuffer + _inBufferPos, _inBufferSize - _inBufferPos); @@ -153,6 +155,7 @@ int AACStream::readBuffer(int16 *buffer, const int numSamples) { memcpy(buffer + samples, decodedSamples, copySamples * 2); samples += copySamples; + // Copy leftover samples for use in a later readBuffer() call if (copySamples != decodedSampleSize) { _remainingSamplesSize = decodedSampleSize - copySamples; _remainingSamples = new int16[_remainingSamplesSize]; diff --git a/audio/decoders/quicktime.h b/audio/decoders/quicktime.h index 6e9f5b2c4e..2fca5d6944 100644 --- a/audio/decoders/quicktime.h +++ b/audio/decoders/quicktime.h @@ -23,6 +23,14 @@ * */ +/** + * @file + * Sound decoder used in engines: + * - groovie + * - mohawk + * - sci + */ + #ifndef AUDIO_QUICKTIME_H #define AUDIO_QUICKTIME_H |