Formerly when an unsupported block was found the opening would fail. Instead
now all the valid blocks till that occasion will be played.
This fixes an missing sound in Full Throttle (thanks to clone2727 for
reporting), which is using a VOC file which fails to specify the proper block
length for its sound block.
This should allow the QDM2 codec to work again with Common::Bitstream
instead of the older getBits() reader, but this aborts with a reading
past end of stream error...
getBits(n) would cause a runtime error if n is greater than 32,
but using getBits() to skip is no longer necessary as the newer
BitStream class has a skip method, which is used instead.
This removes the internal getBitContext bitwise reading code and
replaces with Common::BitStream.
However, this breaks the codec as in one location, the internal buffer
of getBitContext reader is used and this can't be directly replaced.
This will need to be understood and rewritten.
The number of channels in AAC can differ from the actual number of channels needed making us require this. The channel count inside the container is always the correct one.
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
This drops the (unused) ability to play based on a list of input blocks. This
was formely only used by the NDS specific VOC streaming code, which has been
removed in 9fa9f68789.
Now all VOCs are streamed rather than preloaded. This deprecates the
STREAM_AUDIO_FROM_DISK define, which was previously used to stream VOCs from
disk.
This might very well break some engines which relied on the stream not being
changed after makeVOCStream! I adapted all engines which had a check for
STREAM_AUDIO_FROM_DISK in their code.
It would be wise to check all other engines using VOC to see if this might
cause any problems for them.
endOfData() will not return true if the eos flag is encountered. Flag handling is a bit stricter than before (flags == 1 does not necessarily mean eos). Also removed some dead code, fixed wrong code, and fixed formatting.