47 Commits

Author SHA1 Message Date
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
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
Ori Avtalion
0ae4fcd055 Fix comment to removed function
svn-id: r48965
2010-05-07 12:59:46 +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
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
79662919c6 Fix bug #2969282: DW2: Weird "PC SPEAKER-like" sound distortion.
svn-id: r48246
2010-03-12 22:34:54 +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
2ddfdd960c Hopefully fixing bug #2948858 "MP3 (CD Audio) Broken under SVN".
svn-id: r48032
2010-02-10 16:34:32 +00:00
Johannes Schickel
18f6ac4776 Fix RawStream::seek implementation.
svn-id: r48007
2010-02-08 21:24:47 +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
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
Johannes Schickel
3cc0ef6c1c Remove RawMemoryStream.
svn-id: r47717
2010-01-30 15:28:07 +00:00
Johannes Schickel
8e3646e062 Get rid of Audio::makeRawMemoryStream_OLD.
svn-id: r47715
2010-01-30 15:19:15 +00:00
Johannes Schickel
523181d719 Add a factory which plays audio from a buffer via RawDiskStream.
svn-id: r47714
2010-01-30 15:18:25 +00:00
Johannes Schickel
ec3f58e626 - Mark makeRawDiskStream factory as deprecated.
- Introduce two new makeRawStream factories, one is using RawStreamBlockList instead of an RawDiskStreamAudioBlock array.

svn-id: r47713
2010-01-30 15:17:57 +00:00
Johannes Schickel
17cebab354 Change RawDiskStream to use a Common::List to store its blocks internally.
svn-id: r47712
2010-01-30 15:16:55 +00:00
Johannes Schickel
347a974609 Add some paranaoia assert (and a related TODO) to the MSIMA2 implementation.
svn-id: r47652
2010-01-28 21:05:10 +00:00
Johannes Schickel
0417c0ab88 Fix seek implementation of our Vorbis stream.
svn-id: r47635
2010-01-28 09:44:21 +00:00
Max Horn
1c906a1f08 Hide VagStream implementation, only expose it via a factory method
svn-id: r47634
2010-01-28 09:38:21 +00:00
Johannes Schickel
23f9891749 Fix MP3 playback speed.
svn-id: r47632
2010-01-28 09:15:58 +00:00
Johannes Schickel
7e1051d8ec Fix seeking in FLAC implementation (FLAC's API uses the number of sample pairs, not the number of samples).
svn-id: r47593
2010-01-27 08:41:08 +00:00
Filippos Karapetis
8606982590 Moved the Shorten decoder inside the SAGA engine, as it's the only one using it (and it's still unfinished, too)
svn-id: r47592
2010-01-27 08:40:48 +00:00
Johannes Schickel
812603e29e Fix invalid sample position on Timestamp to sample conversion for Stereo streams.
svn-id: r47591
2010-01-27 08:08:33 +00:00
Max Horn
77fe0215cd Remove outdated comments
svn-id: r47582
2010-01-26 22:52:08 +00:00
Max Horn
1565f14bc1 Moved audio stream implementations (for MP3, FLAC, etc.) to new dir sound/decoders/
svn-id: r47579
2010-01-26 22:48:45 +00:00