Commit Graph

388 Commits

Author SHA1 Message Date
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
Torbjörn Andersson
a3008e8f01 FMOPL: Fix confusing "opl_driver" behavior
The way I've configured ScummVM, the default is to use FluidSynth
for MIDI, and any game where I want AdLib overrides that setting.
I have set the DOSBox OPL emulator as the default.

However, this causes the game's "opl_driver" setting to be "auto",
which overrides the default setting, and usually picks the MAME
OPL emulator. To counter this, if it sees that "opl_driver" is
"auto", it will check the default setting.

In other words, only use "auto" if "opl_driver" isn't set on any
level. I think this is the behaviour that should cause the least
amount of astonishment.
2015-05-30 19:18:29 +02:00
Kirben
f58be61a3d AUDIO: Add patch from madmoose to fix arpeggio effect in ProTracker modules. 2015-05-22 10:30:38 +10: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
Filippos Karapetis
e34b5be8e3 MT32: Update to munt 1.5.0
This syncs with munt commit 4041a16a5d
2014-12-21 22:19:28 +02:00
Bastien Bouclet
200b05246c AUDIO: Wrap around in the Timestamp constructor
The "making of" video in the Xbox version of Myst III is
unusually long. VideoDecoder::FixedRateVideoTrack::getFrameTime
would trigger an overflow.
2014-12-20 19:38:18 +01:00
Einar Johan Trøan Sømåen
06c3a73289 AUDIO: Fix some Doxygen comments that seem wrong. 2014-08-29 03:29:13 +02: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
Matthew Hoops
dc155b23f0 AUDIO: Better handle endOfStream() vs endOfData() in SubSeekableAudioStream 2014-08-01 01:47:30 -04:00
Matthew Hoops
d8ef40879c AUDIO: Better handle endOfStream() vs endOfData() in SubLoopingAudioStream 2014-08-01 01:39:46 -04: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
82d464367b AUDIO: Better handle endOfStream() vs endOfData() in LoopingAudioStream 2014-07-27 23:44:45 -04:00
Matthew Hoops
931e2e16f7 AUDIO: Fix endOfStream() for LimitingAudioStream 2014-07-27 23:44:45 -04:00
Matthew Hoops
6d632dda27 AUDIO: Better handle endOfStream() vs endOfData() in QueuingAudioStreamImpl 2014-07-27 23:44:44 -04:00
Matthew Hoops
d2353964b8 AUDIO: Fix QueuingAudioStreamImpl locking 2014-07-27 23:44:44 -04: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
Filippos Karapetis
f953e3a435 MT32: Sync with the latest changes in munt
This syncs the code with munt commit fa8b4f899d, avoiding usage of a
global constructor
2014-07-13 17:12:04 +03:00
Johannes Schickel
32df9f7759 MT32: Comment out default showLCDMessage/printDebug implementations.
This keeps the original MUNT code in showLCDMessage/printDebug and simply
comments it out. This *silences* a warning about debug use in our former
default replacement code. Since we already implement a ReportHandler there
is no need to adapt the default implementation.

This is not the cleanest way but the solution which requires the least changes
to MUNT code.
2014-07-11 00:56:10 +02:00
Johannes Schickel
f8d0a48dcd Revert "MT32: Avoid runtime abort due to non-POD object pass in MT32 Emulator."
This reverts commit 6731eb21e3.
2014-07-11 00:38:31 +02:00
D G Turner
6731eb21e3 MT32: Avoid runtime abort due to non-POD object pass in MT32 Emulator. 2014-07-10 23:11:20 +01:00
Filippos Karapetis
8c5f67568f MT32: Update to munt 1.4.0
This syncs with munt commit 175446af43
2014-07-08 00:02:18 +03:00
Filippos Karapetis
10c7986a36 MT32: Copyright year bump 2014-07-08 00:02:17 +03:00
Max Horn
4d02f67bd1 ALL: Resolve multiple clang warnings 2014-03-30 14:38:02 +02: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
0063c25805 AUDIO: Manually specify function alignment in ARM assembly. 2014-03-06 20:21:48 +01:00
Johannes Schickel
452cec49d9 AUDIO: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Alyssa Milburn
f92df4c6aa Revert "AUDIO: Simplify MidiTracker::processEvent return value"
MI2 deletes the parser object(!) so we can't access any member
variables here. Thanks to athrxx for finding this.

This reverts commit 86c2fe47e0 and adds
a comment explaining why.
2014-01-27 00:20:50 +01:00
Alyssa Milburn
83ce4cfb5e Revert "AUDIO: fix invalid mem access in midiparser.cpp"
This broke SCI, since it doesn't call processEvent any more.

This reverts commit afa54072a9.
2014-01-27 00:08:57 +01:00
athrxx
afa54072a9 AUDIO: fix invalid mem access in midiparser.cpp
(this caused a crash in MI2)
2014-01-26 22:51:39 +01:00
Johannes Schickel
417064e311 Merge pull request #417 from digitall/STACK_fixes
ALL: Fix optimization unstable code on checking for null after new.
2014-01-17 17:48:16 -08:00
Johannes Schickel
e00ae0918a AUDIO: Cleanup MT-32 code a bit.
This removes overwrites in ReportHandlerScummVM which are simply the default
implementation anyway. A side effect is that this silences/fixes a warning
about the former onProgramChanged to hide an virtual method due to parameter
differences.
2014-01-16 22:46:21 +01:00
Johannes Schickel
1eb10b1a46 AUDIO: Register EAS sound driver as plain sound type.
MIDI code will control volume via MIDI events thus the generated audio should
not be affected by mixer sound volumes.

The initial commit 0e6cdfd675 added it as music
sound type. Might be copied from the (also) incorrect FluidSynth code.
2014-01-16 22:21:39 +01:00
Johannes Schickel
d99f23fb10 AUDIO: Register FluidSynth driver as plain sound type.
MIDI code will control volume via MIDI events thus the generated audio should
not be affected by mixer sound volumes.

The initial commit(s) in d4d045b117 /
13dc149ded added it as music sound type.
So, this seems to be a long standing issue.
2014-01-16 22:20:23 +01:00
Johannes Schickel
5ea87462e4 AUDIO: Register MT-32 emulator as plain sound type.
Formerly the audio stream was registered as sfx. This is incorrect behavior
since the client code will control music volume with MIDI events on its own.
It seems 67b311713d introduced this very long
ago.

This should fix unintended coupling of sfx volume and music volume in BASS.
2014-01-16 22:18:47 +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
Johannes Schickel
b22aeafcc8 AUDIO: Do not add extrapath to SearchMan in MT-32 emu code.
At the point where the emulator is created extrapath should already been
added to extrapath. If not, the check in checkDevice already failed and thus
adding it would be too late anyway.

It seems this was added in 805b21181a. The
comment about it being a HACK has been removed in bbad3f333a
but it's not clear to my why... At any rate, this should not be here.
2013-11-03 19:36:04 +01:00