Commit Graph

1446 Commits

Author SHA1 Message Date
Max Horn
46155b2c36 Add Android backend from patch #2603856
svn-id: r49449
2010-06-06 09:34:36 +00:00
David Turner
193d7df594 Correction for SCI valgrind uninit memory error in MIDI sound which occurs during LSL6 intro.
This may be "hiding" a bug in the use of sound/midiparser.cpp in SCI i.e. incorrect use of parseNextEvent(), so this should be reviewed, but this patch initialises _next_event at object construction, which corrects this, should not break anything else and is good practice.

svn-id: r49445
2010-06-06 00:27:56 +00:00
Yotam Barnoy
6884ffc291 PSP: added preliminary support for using ME hardware to play MP3 files. If the decoder fails to load, MAD is used instead. Disable with DISABLE_PSP_MP3.
svn-id: r49319
2010-05-30 09:47:00 +00:00
Neil Millstone
5143e7fff4 Fix typo(?) which prevents streaming code from compiling.
svn-id: r49314
2010-05-29 20:32:25 +00:00
Matthew Hoops
f2dda51943 Have makeADPCMStream use the entire stream if the size is 0 (as it says in the doxygen comment).
svn-id: r49236
2010-05-26 12:15:14 +00:00
Max Horn
7bbbaf7d8c Patch #3006178: "rjp1: calculate sample length correctly"
Fixes bug #3001110: "FOTAQ Amiga: crashes reporting assertion failure"
Added a NEWS entry to the patch.

svn-id: r49210
2010-05-25 11:35:16 +00:00
Matthew Hoops
b3bd797e01 Move the QDM2 code to the graphics module, removing the cyclic dependency.
svn-id: r49171
2010-05-23 21:41:13 +00:00
Matthew Hoops
5e90f66edc Hide the QDM2 implementation and only expose it via a factory method, hopefully fixing compilation on most systems at the same time.
svn-id: r49170
2010-05-23 19:54:17 +00:00
Matthew Hoops
2f31b05651 Move Mohawk's QuickTime code to graphics/ (and QDM2 to sound, disabled when Mohawk is not enabled) so SCI can use the code.
svn-id: r49165
2010-05-23 18:33:55 +00:00
Matthew Hoops
811fc0e7ec Add the Common::Rational class from patch #2963496 (VideoDecoder Rewrite)
svn-id: r49061
2010-05-17 20:53:04 +00:00
Ori Avtalion
0ae4fcd055 Fix comment to removed function
svn-id: r48965
2010-05-07 12:59:46 +00:00
Johannes Schickel
caf31ee5af Replace various strncpy usages by strlcpy.
svn-id: r48955
2010-05-05 17:54:12 +00:00
Johannes Schickel
c5436aebdd Cleanup.
svn-id: r48921
2010-05-03 18:32:26 +00:00
Johannes Schickel
e7f29db498 Check for read/seek errors of the underlying SeekableReadStream in RawStream.
svn-id: r48920
2010-05-03 18:28:05 +00:00
Johannes Schickel
df318c0ec3 Fix for bug #2961787 "HE SAM1: Music in kitchen slightly off (regression)".
Unlike in the branch-1-1-x I did not restore the old RawMemoryStream
code in the trunk. Instead I stripped out the pre-buffering of the
RawStream code. I still decided to add some in-place buffering
in RawStream::readBuffer to at least not rely on super-fast disk I/O.

This is currently an experimental change. There might be need to
reconsider the buffering (even though backends with slow disk I/O
should actually do buffering for file I/O on their own).

svn-id: r48919
2010-05-03 18:27:45 +00:00
Johannes Schickel
f2ee496c0e Paranoia change: Prevent possible assertion caused by MP3Stream.
Currently we have an assert checking that the framerate of an
Audio::Timestamp is always > 0. Since MAD might return "0"
(and maybe even other illegal values) in case the MP3 stream is
invalid we need to check that before we setup the _length
Timestamp of MP3Stream.

svn-id: r48904
2010-05-03 13:03:44 +00:00
Max Horn
df4400d223 Rename input -> stream
svn-id: r48869
2010-04-29 21:54:39 +00:00
Andre Heider
6329d96cef Fix the MT32 gfx output for 16bit compatiblity, cleanup, get rid of unnecessary buffers.
svn-id: r48753
2010-04-20 18:29:53 +00:00
Max Horn
bb26c04053 Fixing some warnings (with gcc 3.3.6)
svn-id: r48694
2010-04-17 23:19:52 +00:00
Max Horn
a1840bd573 AUDIO: Rename Mixer::playInputStream to playStream
svn-id: r48637
2010-04-12 09:14:17 +00:00
Ori Avtalion
f4d7bdc937 Add missing cases to switch statements, remove whitespace
svn-id: r48604
2010-04-09 19:25:05 +00:00
Johannes Schickel
e4f588ae4c Do not use a template parameter for stereo setting for RawStream but instead pass the constructor a boolean, this should save some binary size.
svn-id: r48496
2010-04-03 15:57:04 +00:00
Johannes Schickel
5412dac46f Cleanup.
svn-id: r48495
2010-04-03 15:56:40 +00:00
Travis Howell
615378ca11 Fix bug #2976353 - NIPPON: Sound looping fails (regression). By reverting 47469, since the IFF sound code is only used by the Parallaction game engine.
svn-id: r48467
2010-04-02 13:12:23 +00:00
Johannes Schickel
86653687d7 Fix for bug #2969211 "NIPPON: Crash in Intro".
It is not a good idea to supply an SubLoopingAudioStream with the start
and end time to be exactly the same time. Clarify that in the
SubLoopingAudioStream documentation, add an assert in the
SubLoopingAudioStream constructor for that case and also prevent
make8SVXStream from doing so.

svn-id: r48356
2010-03-22 15:54:56 +00:00
Max Horn
d78dba3bca COMMON: Move Common::RandomSource to common/random.*
svn-id: r48279
2010-03-18 15:07:11 +00:00
Johannes Schickel
40562798d6 Fix our DECLARE_SINGLETON macro to conform to the C++ specs.
We need to use a namespace Common { } there to make strict C++ compilers
like clang++ and comeau happy. I also added a slight comment about why
that is needed to the macro definition and a note that you need to use
it from the global namespace.

svn-id: r48254
2010-03-13 21:55:49 +00:00
Max Horn
79662919c6 Fix bug #2969282: DW2: Weird "PC SPEAKER-like" sound distortion.
svn-id: r48246
2010-03-12 22:34:54 +00:00
Johannes Schickel
bee3321ec4 This hopefully fixes building on win64.
svn-id: r48245
2010-03-12 13:10:37 +00:00
Max Horn
8f560e5aaf Fix typos
svn-id: r48242
2010-03-12 00:37:25 +00:00
Max Horn
77fc15ce82 MIXER: Change MixerImpl::playInputStream to error out when mixer is not ready
My previous commit which tried to support this does not work correctly when
using QueuingAudioStream; it then just leads to nasty crashes. Hence I am
removing this again for now, until I get around to implement one of the
better alternatives.

svn-id: r48239
2010-03-11 23:40:19 +00:00
Max Horn
9b837d66d4 Replace Audio::MixerImpl::setOutputRate with a new 'sampleRate' param to the MixerImpl constructor
svn-id: r48238
2010-03-11 23:39:51 +00:00
Max Horn
c97ee14a65 Remove last traces of OSystem::getOutputSampleRate()
svn-id: r48229
2010-03-10 21:01:44 +00:00
Torbjörn Andersson
d9c4ee9376 Initialise 'releaseAdd' to avoid a Valgrind warning in Write20() when the
emulator is initialised.

svn-id: r48214
2010-03-09 05:03:38 +00:00
Max Horn
3366a19c37 Fix bug #2872076 (MIXER: Division by 0 in rate conversion if w/o soundcd)
svn-id: r48203
2010-03-08 21:54:32 +00:00
Max Horn
f24cc1c8be Tweak makeVOCDiskStream
* now takes a SeekableReadStream *pointer* like (almost) all other
  audiostream factories
* fix potential memory leak in it
* rename takeOwnershipOfStream to disposeAfterUse for consistency

svn-id: r48184
2010-03-08 10:27:42 +00:00
Johannes Schickel
50116130ef Show an error message in case multiple OPL outputs are created instead of using an assert.
The new DBOPL emulator we are using should support multiple instances though. We *might*
consider allowing as many instances as the user wants. Of course since the original
games only had one OPL chip available, that should not be required. Also just in case
we might allow real hardware as playback device that would be out of the question again
too.

svn-id: r48183
2010-03-08 00:54:05 +00:00
Johannes Schickel
b8901a4741 Add a slight comment when the DBOPL sources where synched with DOSBox.
svn-id: r48182
2010-03-08 00:34:53 +00:00
Johannes Schickel
e941780d39 Use memset instead of a custom loop for zeroing the sample buffer.
svn-id: r48181
2010-03-08 00:34:29 +00:00
Johannes Schickel
f67f7d36f1 Cleanup.
svn-id: r48180
2010-03-08 00:34:01 +00:00
Johannes Schickel
f7b1faedc2 Switch to the other DOSBox OPL emulator as suggested by the DOSBox developers.
svn-id: r48179
2010-03-08 00:33:36 +00:00
Neil Millstone
277b3078bc SID: Adding DISABLE_SID option, as SID player embiggens binary by a large amount. This is a problem for the DS port.
svn-id: r48137
2010-02-26 17:42:40 +00:00
Max Horn
7f2259c11f Add assert(!_finished) to QueuingAudioStreamImpl::queueAudioStream
svn-id: r48122
2010-02-23 22:54:23 +00:00
Max Horn
4e691a774c Tweak QueuingAudioStream comments
svn-id: r48121
2010-02-23 22:52:18 +00:00
Johannes Schickel
8daaeae849 Fix gcc warning.
svn-id: r48077
2010-02-17 16:07:32 +00:00
Max Horn
dd5518d3c5 Add support for samples > 32kb to Paula chip emulation code.
In addition, the code got simplified considerably. Its behavior changed
slightly due to this, but I think the old behavior was wrong. In any
case, this may fix some bugs, or introduce regressions, or both. We'll
see ;).

svn-id: r48058
2010-02-14 01:54:21 +00:00
Johannes Schickel
2ddfdd960c Hopefully fixing bug #2948858 "MP3 (CD Audio) Broken under SVN".
svn-id: r48032
2010-02-10 16:34:32 +00:00
Johannes Schickel
52af1b3884 Formatting.
svn-id: r48023
2010-02-09 22:03:59 +00:00
Johannes Schickel
e7d6d44e86 Be a bit more forgiveful in case the SeekableAudioStream passed to SubLoopingAudioStream does not allow reading the requested sample count at once (i.e. do not tread that as error, unless endOfData() is set).
svn-id: r48022
2010-02-09 22:03:02 +00:00
Johannes Schickel
b097e8635c Stop SubLoopingAudioStream playback, in case reading from the parent stream fails.
svn-id: r48021
2010-02-09 21:52:46 +00:00