148 Commits

Author SHA1 Message Date
Paul Gilbert
7b10dac542 AUDIO: Support Wave files with an initial fact chunk 2016-12-20 22:47:49 -05:00
Torbjörn Andersson
579c024653 AUDIO: Keep packetized MP3 stream from ending prematurely
This fixes the audio in the intro AVI movie for German Fullpipe.
2016-09-19 07:25:55 +02:00
Paul Gilbert
7d0c83850c AUDIO: Whitespace fix in MP3 engine usage list 2016-09-03 09:58:50 -04:00
Paul Gilbert
4d11f2fbf0 AUDIO: Add Titanic to list of engines using MP3 decoder 2016-09-02 23:56:44 -04:00
Paul Gilbert
d7e52b4b50 AUDIO: Disable MP3 decoding in Wave files if MAD dependency is disabled 2016-09-02 23:54:55 -04:00
Paul Gilbert
417cc51bcb AUDIO: Add support for MP3 encoded data in WAVE files
This is needed for playback of Starship Titanic speech data
2016-09-02 21:32:32 -04:00
Paul Gilbert
b312c8fe9d AUDIO: Add titanic to list of engines using wave files 2016-08-05 19:19:17 -04:00
Willem Jan Palenstijn
567054d829 AUDIO: Fix build 2016-07-31 08:55:12 +02:00
Eugene Sandulenko
30498bfbf0 AUDIO: Fix indentation 2016-07-31 09:28:46 +03: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
848abbee06 AUDIO: Fix incorrect forward declaration 2016-06-21 08:33:50 -05: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
Eugene Sandulenko
33184e822d AUDIO: Plug potential memory leak 2016-05-15 12:26:15 +02:00
Ori Avtalion
3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Tobia Tesan
914537ab52 JANITORIAL: Mark audio/decoders/vorbis as: used in Wintermute 2016-03-28 12:36:41 +02:00
Christian Krause
1fdeb98e70 AUDIO: Fix compiler warning
This commit fixes a compiler warning about a "set but not used"
variable. The warning was introduced by commit 2f707bf2.
2015-09-15 20:48:09 -04:00
Matthew Hoops
8165e9aa4c AUDIO: Fix uninitialized read in MP3 initialization
Thanks to chkr-private for finding the issue
2015-09-15 20:44:09 -04:00
Matthew Hoops
c8a7e39e05 AUDIO: Mark the old Codec class as deprecated
Once QuickTime audio edits are rewritten to use PacketizedAudioStream, we can remove this class.
2015-08-30 21:01:43 -04:00
Matthew Hoops
331d8ece21 AUDIO: Add a packetized version of ADPCM streams 2015-08-30 19:53:54 -04:00
Matthew Hoops
3aa9e2c581 AUDIO: Add a packetized version of the PCM stream 2015-08-30 19:53:54 -04:00
Matthew Hoops
562234b96b AUDIO: Implement a packetized version of MP3 2015-08-30 19:53:53 -04:00
Matthew Hoops
52f67cba39 AUDIO: Split the seeking MP3 class from the base decoding stream 2015-08-30 19:53:53 -04:00
Martin Kiewitz
10741d5bd6 AUDIO: makeAIFFStream seek to start of dataStream
fixes non working audio when playing a File(Stream)
2015-06-07 00:30:15 +02:00
Matthew Hoops
b6fdc7be88 AUDIO: Make makeAIFFStream return a RewindableAudioStream
All callers requiring SeekableAudioStream have been adapted by using dynamic_cast
2015-06-06 17:20:41 -04:00
Matthew Hoops
7eb663a45b AUDIO: Fix another syntax error 2015-06-06 17:14:24 -04:00
Matthew Hoops
1cea582152 AUDIO: Fix syntax 2015-06-06 17:13:21 -04:00
Martin Kiewitz
97813f89ec SHERLOCK: rework 3DO audio, add AIFC file support
- 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
2015-06-06 22:50:36 +02:00
Matthew Hoops
2f707bf207 AUDIO: Rewrite the AIFF decoder to support AIFC 2015-06-04 19:47:41 -04:00
Matthew Hoops
b986b44827 AUDIO: Do not read the entire AIFF buffer into memory 2015-06-04 19:47:37 -04:00
Matthew Hoops
4266d76ce4 AUDIO: Mark AIFF as being used by BBVS 2015-06-04 19:47:32 -04:00
Matthew Hoops
3d1da64249 AUDIO: Only expose makeAIFFStream to clients 2015-06-04 19:47:28 -04:00
Torbjörn Andersson
e71553af3b AUDIO: Add more engines that use wave.h that I missed before. 2015-06-05 01:37:02 +02:00
Torbjörn Andersson
34261b3fce AUDIO: Update list of engines that use wave.h 2015-06-05 01:32:39 +02:00
Martin Kiewitz
4dec07bf2d SHERLOCK: improve 3DO movie player, add SDX2 codec
- 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
2015-06-04 15:53:54 +02:00
Thierry Crozat
5c7cc826f0 AUDIO: Skip ID3 tag at start of mp3 files
This fixes bug #6834 MP3: ScummVM doesn't skip ID3 tag at
beginning of file.
2015-04-05 21:17:06 +01:00
Matthew Hoops
d58f250918 AUDIO: Fix skipping samples when the skip length is greater than the first chunk 2015-01-26 19:54:32 -05:00
Matthew Hoops
d2bf7f99fd AUDIO: Really fix seeking with audio edits
I really have no idea what I was thinking in acb127c2
2014-08-14 20:16:14 -04:00
Eugene Sandulenko
6e794a9823 Merge pull request #487 from clone2727/audio_fixes
AUDIO: Miscellaneous AudioStream fixes
2014-08-09 15:33:50 +02:00
Joni Vähämäki
1d12bddd63 AUDIO: Rename MP3Stream's _totalTime to _curTime to better reflect the variable's purpose. 2014-08-01 01:43:04 +03:00
Matthew Hoops
1b834f92bd AUDIO: Finish off AAC/QDM2 queues when done decoding a packet 2014-07-27 23:44:44 -04:00
Joni Vähämäki
8564c7ec0a AUDIO: Increment total play time when decoding MP3 data. 2014-07-26 14:30:56 +03:00
Matthew Hoops
9630753861 COMMON: Move some QuickTime Track variables into SampleDesc where they belong 2014-03-18 19:12:20 -04:00
Johannes Schickel
452cec49d9 AUDIO: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
D G Turner
ac4087856f ALL: Remove optimization unstable code on checking for null after new.
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.
2014-01-15 02:36:19 +00:00
Matthew Hoops
72101c66fa AUDIO: Cleanup naming 2013-04-20 15:18:09 -04:00
Matthew Hoops
c38beb0ced AUDIO: Remove default makeADPCMStream rate/channels values 2013-04-20 14:54:41 -04:00
Matthew Hoops
54d4707edc AUDIO: Fix invalid free call 2013-04-16 12:05:42 -04:00
clone2727
91317c3630 Merge pull request #293 from clone2727/qtmidi
Add support for QuickTime Music playback
2012-12-13 15:49:40 -08: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
Matthew Hoops
3399b5662f AUDIO: Fix AIFF comment about supporting IMA ADPCM 2012-11-24 17:25:39 -05:00