Age | Commit message (Collapse) | Author |
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- queue up to 0.5 seconds of audio to avoid buffer underruns
- support for SDX2 codec
- put both audio codecs into audio/decoders/3do.cpp
- made movie player capable of playing EA logo movie
|
|
This fixes bug #6834 MP3: ScummVM doesn't skip ID3 tag at
beginning of file.
|
|
|
|
I really have no idea what I was thinking in acb127c2
|
|
AUDIO: Miscellaneous AudioStream fixes
|
|
variable's purpose.
|
|
|
|
|
|
|
|
|
|
These issues were identified by the STACK tool.
By default, the C++ new operator will throw an exception on allocation
failure, rather than returning a null pointer.
The result is that testing the returned pointer for null is redundant
and _may_ be removed by the compiler. This is thus optimization
unstable and may result in incorrect behaviour at runtime.
However, we do not use exceptions as they are not supported by all
compilers and may be disabled.
To make this stable without removing the null check, you could qualify
the new operator call with std::nothrow to indicate that this should
return a null, rather than throwing an exception.
However, using (std::nothrow) was not desirable due to the Symbian
toolchain lacking a <new> header.
A global solution to this was also not easy by redefining "new" as "new
(std::nothrow)" due to custom constructors in NDS toolchain and various
common classes.
Also, this would then need explicit checks for OOM adding to all new
usages as per C malloc which is untidy.
For now to remove this optimisation unstable code is best as it is
likely to not be present anyway, and OOM will cause a system library
exception instead, even without exceptions enabled in the application
code.
|
|
|
|
|