Commit Graph

1425 Commits

Author SHA1 Message Date
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
Johannes Schickel
6a624df560 Make Audio::convertTimeToStreamPos return a frame-precision based result instead of a sub-frame-precision based result. This fixes the SubLoopingAudioStream tests.
svn-id: r48020
2010-02-09 21:52:27 +00:00
Johannes Schickel
f6aa8d0068 Fix SubLoopingAudioStream's readBuffer implementation.
svn-id: r48018
2010-02-09 21:51:47 +00:00
Johannes Schickel
18f6ac4776 Fix RawStream::seek implementation.
svn-id: r48007
2010-02-08 21:24:47 +00:00
Johannes Schickel
b431e700d8 Fix bug in LoopingAudioStream::readBuffer, this makes the unit tests complete without any error.
svn-id: r47935
2010-02-06 16:42:15 +00:00
Sven Hesse
51d0365818 Loosening the 2 samples per channel requirement of Apple_ADPCMStream to 1 sample per channel
svn-id: r47864
2010-02-03 19:55:14 +00:00
Johannes Schickel
6312b690de Fix bug in RawStream::getLength for 16bit streams. (Uncovered by our new unit tests yay!)
svn-id: r47859
2010-02-03 15:45:54 +00:00
Johannes Schickel
d32dfa3bb3 Make makeMP3Stream return 0 on failure too.
svn-id: r47848
2010-02-03 09:47:29 +00:00
Johannes Schickel
8ae24a27b3 Yet more Flac -> FLAC changes for consistency.
svn-id: r47847
2010-02-03 09:42:40 +00:00
Johannes Schickel
fe35d372da - Rename FlacStream to FLACStream.
- Rename makeFlacStream to makeFLACStream.

svn-id: r47846
2010-02-03 09:42:11 +00:00
Johannes Schickel
e7d5849ac8 Rename RawAudioStream to RawStream for consistency.
svn-id: r47844
2010-02-03 09:19:16 +00:00
Johannes Schickel
286786b6af Cleanup.
svn-id: r47843
2010-02-03 09:11:55 +00:00
Johannes Schickel
9c1a42f9f5 Rename:
- FlacInputStream -> FlacStream
 - VorbisInputStream -> VorbisStream
 - MP3InputStream -> MP3Stream

svn-id: r47842
2010-02-03 08:59:10 +00:00
Johannes Schickel
c040eeca44 - Return 0 in makeVorbisStream and makeFlacStream, in case creating the stream failed.
- Add a TODO in the MP3 code for the same behavior.

svn-id: r47841
2010-02-03 08:58:52 +00:00
Max Horn
20f8503c23 Further OOify the ADPCM code
svn-id: r47740
2010-01-31 02:14:11 +00:00
Max Horn
7f2f9a8117 Rearrange code of ADPCMStream subclasses
svn-id: r47739
2010-01-31 02:13:38 +00:00
Max Horn
f3322bb1c8 Split ADPCMStream into several classes
svn-id: r47738
2010-01-31 02:12:59 +00:00
Max Horn
17ec0a8402 Rename ADPCMInputStream to ADPCMStream; make some members const
svn-id: r47737
2010-01-31 02:12:33 +00:00
Max Horn
21e1cc4cf8 Switch makeADPCMStream to DisposeAfterUse::Flag
svn-id: r47736
2010-01-31 02:11:41 +00:00
Johannes Schickel
5539f0d358 Add some TODO item.
svn-id: r47721
2010-01-30 15:38:31 +00:00
Johannes Schickel
3125dfe66e Add some asserts to the RawAudioStream code.
svn-id: r47720
2010-01-30 15:37:20 +00:00
Johannes Schickel
75ba7ee0f8 Rename RawDiskStream to RawAudioStream.
svn-id: r47718
2010-01-30 15:29:48 +00:00