Commit Graph

26 Commits

Author SHA1 Message Date
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
2bd0347968 AUDIO: Use override
Using clang-tidy modernize-use-override
2021-11-14 20:14:11 +02:00
Orgad Shaneh
af529f568b AUDIO: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 13:41:02 +02:00
Cameron Cawley
b76652120b AUDIO: Separate the XA ADPCM decoder from the PSX video decoder 2020-08-24 14:21:00 +02:00
Colin Snover
dbf2f0c266 AUDIO: Fix compilation on AmigaOS 4 2017-09-10 02:08:21 -05:00
Colin Snover
41506201b9 AUDIO: Fix incorrect reading of DK3 ADPCM audio data
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.
2017-09-09 23:29:58 -05:00
Torbjörn Andersson
9382dab811 AUDIO: Fix audio corruption in MS ADPCM decoder
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-07-06 20:51:28 +02:00
Colin Snover
cbc3b773aa AUDIO: Make WAV streams seekable
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.
2016-06-19 14:48:33 -05:00
Matthew Hoops
331d8ece21 AUDIO: Add a packetized version of ADPCM streams 2015-08-30 19:53:54 -04:00
Johannes Schickel
452cec49d9 AUDIO: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Matthew Hoops
72101c66fa AUDIO: Cleanup naming 2013-04-20 15:18:09 -04:00
D G Turner
62d87e30f4 AUDIO: Fix MS ADPCM to work with Mono streams using odd sized buffers. 2012-12-10 16:29:16 +00:00
D G Turner
43e2c6ee1e AUDIO: Correct ADPCM Fixes to ensure internal buffers are drained.
This also adds an omitted _decodedSampleCount initialization in Oki
ADPCM decoder.
2012-08-04 20:29:37 +01:00
D G Turner
9c47fdae29 AUDIO: Fix Oki ADPCM to work with Mono streams using odd sized buffers. 2012-08-04 18:38:12 +01:00
D G Turner
b79221729b AUDIO: Fix DVI ADPCM to work with Mono streams using odd sized buffers. 2012-08-04 18:36:13 +01:00
Christoph Mallon
a5a8833c05 COMMON: Add DisposablePtr<T>, which replaces many repeated implementations of a dispose flag. 2011-08-07 15:19:08 +02:00
Sven Hesse
1f3ccd4eed AUDIO: Fix stereo MS IMA ADPCM decoding 2011-07-19 03:10:10 +02:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
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-06-20 00:59:48 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Matthew Hoops
9d8874c707 AUDIO: Cleanup MS IMA handling
- 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-24 23:14:14 -04:00
Matthew Hoops
deb46ab38b AUDIO: Split the Intel DVI ADPCM into its own class
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-13 09:45:13 -04:00
Max Horn
393c6f6ade AUDIO: Expose some internal ADPCM data tables 2011-04-13 12:48:57 +02:00
Max Horn
7607e351cc TINSEL: Move custom ADPCM decoders to tinsel engine 2011-04-13 12:48:57 +02:00
Max Horn
b9296a189e AUDIO: Expose ADPCM decoder internals via a new header
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-04-13 12:48:57 +02:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00