Age | Commit message (Collapse) | Author |
|
These are flagged by GCC if -Wswitch-default is enabled.
|
|
These are flagged by GCC if -Wswitch-default is enabled.
|
|
Fixes warning C4245: signed/unsigned mismatch
(seems in line with other decoders)
|
|
Reported by angstsmurf.
|
|
No need to explicitly set it to 1.0. (There may have been in an
earlier version, to avoid any possible rounding error. But if so,
that reason is long gone.)
|
|
The high-resolution videos play back at much lower volume than the
original ones. This adds hard-coded values for how much to amplify
each cutscene. It's all done by ear, and it does introduce some
clipping, but I think it should be acceptable.
Of course, it could also be a problem with the audio decoder, so
this may be the wrong approach entirely.
|
|
It also hads further support for playing AIFF files. However, the
Blorb files for Lurking Horror & Sherlock on the if-archive website
don't seem to be valid AIFF files, so sound doesn't play using them
|
|
|
|
This code comes from clone2727's now defunct (?) ac3 branch.
|
|
|
|
If the audio thread called to readBuffer before any packet had been
added to the stream, the state of the stream would be changed from
INIT to EOS. Later, when a packet was received, the state would go
directly from EOS to READY, skipping decoder init, leaving garbage
memory in the decoder structs and causing a crash of the decoder.
Fixes Trac#9653.
|
|
|
|
|
|
Fixes out of bounds reads in the Myst ME intro videos.
OOB reads may happen because:
- The bitstream implementation reads 4 bytes at a time, and the buffer
size is not guaranteed to be a multiple of 4.
- The huffman parsing code reads a fixed amount of bits when it
sometimes needs not all of them.
Also fixed bits vs bytes mismatch for the size parameter of the calls to
the bitstream constructor, and removed a few unnecessary heap
allocations.
Fixes #10220.
|
|
|
|
write streams
|
|
And fix an out of bounds acces when seeking to the end of a video.
Skipping samples is needed even when seeking through silent edits
because a silent stream is queued for those.
Fixes #10219.
|
|
|
|
|
|
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.
|
|
All users of BitStream were in fact using a specific, hardcoded variant,
so we can hardcode that variant, removing the need for virtual calls,
and enabling inlining.
|
|
|
|
This fixes the audio in the intro AVI movie for German Fullpipe.
|
|
|
|
|
|
|
|
This is needed for playback of Starship Titanic speech data
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
This commit fixes a compiler warning about a "set but not used"
variable. The warning was introduced by commit 2f707bf2.
|
|
Thanks to chkr-private for finding the issue
|
|
Once QuickTime audio edits are rewritten to use PacketizedAudioStream, we can remove this class.
|
|
|
|
|
|
|
|
|
|
fixes non working audio when playing a File(Stream)
|
|
All callers requiring SeekableAudioStream have been adapted by using dynamic_cast
|
|
|
|
|
|
- rework 3DO audio decoders to decode into buffer only
- 3DO audio decoders also use streams without separate size arg now
- add support for ADP4 + SDX2 inside AIFC files
- add debug command "3do_playaudio" to play AIFC files
- remove audio flags and replace with stereo bool
|
|
|
|
|