aboutsummaryrefslogtreecommitdiff
path: root/audio/decoders/adpcm.cpp
AgeCommit message (Collapse)Author
2017-09-10AUDIO: Fix compilation on AmigaOS 4Colin Snover
2017-09-09AUDIO: Fix incorrect reading of DK3 ADPCM audio dataColin Snover
Previously, _topNibble was not reset at the beginning of a new audio block, and the alignment byte at the end of odd blocks was being read as audio data, which caused audible clicks and out-of-bounds sample generation. There may have also been read errors related to the use of continue/break keywords inside of a macro wrapped with do-while(0). The introduction of partial block reads in this code when it was converted from ffmpeg to a ReadStream interface was also confusing and somewhat inefficient (calling SeekableReadStream::pos frequently), so this code has been refactored for clarity and to improve efficiency by reducing the number of virtual calls. Error detection has also been improved somewhat by ensuring that there are enough bytes to read a block header, and that the step indexes in the header are within the valid range.
2016-07-06AUDIO: Fix audio corruption in MS ADPCM decoderTorbjörn Andersson
Since _decodedSamples[] is filled with either 2 or 4 samples, we can't use 1 - (count - 1) to "ensure that acts as a FIFO". When we have 4 samples, that index will become negative, putting uninitialized data into the buffer. We could still use a similar trick, but I think it's much clearer to use an index variable like this. We need an addition variable either way.
2016-06-19AUDIO: Make WAV streams seekableColin Snover
This allows raw PCM in WAVE containers to have duration and be seekable, and opens the door for ADPCM streams to be seekable later if necessary. This change is needed to avoid duplication of RIFF/WAVE container parsing for SCI engine, which uses raw PCM WAVE files and needs to be able to determine their lengths.
2015-08-30AUDIO: Add a packetized version of ADPCM streamsMatthew Hoops
2014-02-18AUDIO: Make GPL headers consistent in themselves.Johannes Schickel
2013-04-20AUDIO: Cleanup namingMatthew Hoops
2012-12-10AUDIO: Fix MS ADPCM to work with Mono streams using odd sized buffers.D G Turner
2012-08-04AUDIO: Correct ADPCM Fixes to ensure internal buffers are drained.D G Turner
This also adds an omitted _decodedSampleCount initialization in Oki ADPCM decoder.
2012-08-04AUDIO: Fix Oki ADPCM to work with Mono streams using odd sized buffers.D G Turner
2012-08-04AUDIO: Fix DVI ADPCM to work with Mono streams using odd sized buffers.D G Turner
2011-08-07COMMON: Add DisposablePtr<T>, which replaces many repeated implementations ↵Christoph Mallon
of a dispose flag.
2011-07-19AUDIO: Fix stereo MS IMA ADPCM decodingSven Hesse
2011-06-20ALL: Remove trailing whitespacesMax Horn
This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-28JANITORIAL: Reduce header dependencies in shared codeOri Avtalion
Some backends may break as I only compiled SDL
2011-04-24AUDIO: Cleanup MS IMA handlingMatthew Hoops
- Split The Last Express' ADPCM to the engine. Using the MS IMA routine was really a hack. - Fixed stereo MS IMA ADPCM, the old routine was completely wrong.
2011-04-13AUDIO: Split the Intel DVI ADPCM into its own classMatthew Hoops
IMA is really just the definition on how to decode a sample from a nibble, DVI is just a way for those nibbles to be stored in the stream.
2011-04-13AUDIO: Expose some internal ADPCM data tablesMax Horn
2011-04-13TINSEL: Move custom ADPCM decoders to tinsel engineMax Horn
2011-04-13AUDIO: Expose ADPCM decoder internals via a new headerMax Horn
There are tons of ADPCM variants out there, and it is impractical to stuff them all into a single adpcm.cpp file. By exposing the internals, engines can implement their ADPCM decoder variants more easily.
2011-02-09AUDIO: Rename sound/ dir to audio/Max Horn
svn-id: r55850