Commit Graph

295 Commits

Author SHA1 Message Date
Andre Heider
922510df7e SOUND: New global define AUDIO_REVERSE_STEREO.
This reverses the stereo channels for all sfx streams, meant for
hardware devices which expect an inverse order. Use it for the Wii
and Gamecube port since it's reversed since day one :P

svn-id: r52357
2010-08-24 18:44:14 +00:00
Max Horn
df4400d223 Rename input -> stream
svn-id: r48869
2010-04-29 21:54:39 +00:00
Max Horn
a1840bd573 AUDIO: Rename Mixer::playInputStream to playStream
svn-id: r48637
2010-04-12 09:14:17 +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
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
31e39d221b cleanup
svn-id: r47406
2010-01-20 12:44:37 +00:00
Max Horn
68826c27da Get rid of Mixer::playRaw for good
svn-id: r47394
2010-01-19 22:19:43 +00:00
Max Horn
b227c660c6 Remove loop start/end params from Mixer::playRaw; convert some code from Mixer::playRaw to Mixer::playInputStream
svn-id: r47375
2010-01-19 11:20:58 +00:00
Max Horn
f0a0ed8f9e Get rid of Mixer::FLAG_REVERSE_STEREO; also change SCUMM's iMuse Digital emulation to reverse stereo again, as it once seems to have been intended
svn-id: r47374
2010-01-19 11:19:53 +00:00
Max Horn
557bb394de Get rid of Mixer::FLAG_AUTOFREE.
Also fix several recently introduced new/delete vs. malloc/free mismatches.

svn-id: r47369
2010-01-19 00:56:29 +00:00
Max Horn
69be747621 Move raw audio streams to new header sound/raw.h
svn-id: r47368
2010-01-19 00:54:06 +00:00
Max Horn
349fcd1d71 Rename 'Linear' audio streams to 'raw'
svn-id: r47367
2010-01-19 00:52:41 +00:00
Max Horn
a44c6e4323 Add Mixer::getElapsedTime() method returning a Timestamp, thus offering a higher precision than Mixer::getSoundElapsedTime(). Convert some video code to use it.
svn-id: r47213
2010-01-09 22:37:10 +00:00
Max Horn
f720d99b0a Switch Mixer::playInputStream to use DisposeAfterUse::Flag
svn-id: r47182
2010-01-08 22:09:43 +00:00
Johannes Schickel
616e4626f5 Since AudioStream looping is no longer handled by the Mixer, drop Mixer::playAudioStreamLooping. (There's Audio::makeLoopingAudioStream).
svn-id: r47160
2010-01-08 16:27:29 +00:00
Johannes Schickel
b47725540f Cleanup.
svn-id: r47133
2010-01-07 17:04:32 +00:00
Johannes Schickel
6abc10c6ea Add a playInputStreamLooping for RewindableAudioStream to Mixer.
svn-id: r47113
2010-01-07 14:23:42 +00:00
Johannes Schickel
49e53ade00 Switch Mixer back to use only one Channel implementation. (partial revert of r47031 + r47034).
svn-id: r47110
2010-01-07 14:21:13 +00:00
Johannes Schickel
e38b7b3cc5 Properly initialize _pos in LoopingChannel.
svn-id: r47055
2010-01-05 22:02:04 +00:00
Johannes Schickel
2d3a06f805 Cleanup.
svn-id: r47052
2010-01-05 22:00:06 +00:00
Johannes Schickel
caa3db4659 - Initial implementation of looping of SeekableAudioStreams in Mixer.
- Adapted AudioCD code to use this for audio CD emulation.

svn-id: r47045
2010-01-05 21:10:34 +00:00
Johannes Schickel
7d126de793 Add some basic documentation to the new Channel interface.
svn-id: r47034
2010-01-05 19:52:50 +00:00
Johannes Schickel
7d5b2b118a - Do not calculate left/right channel volume every SimpleChannel::mix call anymore, but do it once
- Notify a channel, when it's channel volume type changed from inside MixerImpl::setVolumeForSoundType

svn-id: r47033
2010-01-05 19:52:32 +00:00
Johannes Schickel
4ebcd1c61c Get rid of public variables in Channel.
svn-id: r47032
2010-01-05 19:52:12 +00:00
Johannes Schickel
63bccc213b Create a generic Channel interface for the default Mixer implementation.
svn-id: r47031
2010-01-05 19:51:48 +00:00
Johannes Schickel
50888f5b65 - Fix a bug in Channel::pause for recursive pausing.
- Fix bug in Channel:getElapsedTime, when called while the channel is paused.

svn-id: r47029
2010-01-05 18:32:26 +00:00
Johannes Schickel
5b9f267e71 Use the return value of RateConverter::flow to calculate the decoded samples and not the upper bound "len". (This should only be a difference when the audio stream has no more samples left)
svn-id: r47015
2010-01-05 02:42:55 +00:00
Max Horn
645f73cb18 Switch Channel::getElapsedTime() to use a Timestamp for its computations
svn-id: r46995
2010-01-04 22:48:52 +00:00
Torbjörn Andersson
9e2f9b338f Removed a (hopefully) obsolete FIXME comment.
svn-id: r35690
2009-01-03 00:08:46 +00:00
Jordi Vilalta Prat
b1999a2a16 Fixed indentation and removed whitespaces at the end of line
svn-id: r35481
2008-12-22 11:22:15 +00:00
Torbjörn Andersson
2bbc958373 Made getSoundElapseTime() work better when the sound has been paused. A new
variable, _pauseTime, keeps track of how long the sound has been paused since the
last mixer time stamp.

svn-id: r34955
2008-11-09 13:28:59 +00:00
Nicola Mettifogo
12106a1599 Removed useless dependencies from common/file.h in common code. When complete removal was not possibile, dependency has been pushed to the cpp files from the headers.
svn-id: r34343
2008-09-05 11:41:39 +00:00
Max Horn
c45d632f3b Patch ##1956946 (Audio::Mixer internal API revision) with some tweaks
svn-id: r32828
2008-06-28 15:28:29 +00:00
Nicola Mettifogo
258901bab9 Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
svn-id: r28966
2007-09-19 08:40:12 +00:00
Max Horn
19ad20c201 Don't be so strict about un-pausing sounds which are not paused currently
svn-id: r28163
2007-07-22 11:54:35 +00:00
Max Horn
93b1a53c72 Changed semantics of Mixer::pause*() methods -- if you pause n times, you have to unpause n times before the sound resumes (this means pauseAll works correct in engines which selectively pause/resume single sounds)
svn-id: r27798
2007-06-30 21:02:58 +00:00
Max Horn
0d77f50d6b Removed dead code
svn-id: r27066
2007-06-03 15:56:14 +00:00
Max Horn
218e132e37 Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
svn-id: r27024
2007-05-30 21:56:52 +00:00
Eugene Sandulenko
06c2976fa0 More fixes for MSVC8 warnings.
svn-id: r26063
2007-03-10 15:04:06 +00:00
Max Horn
029b8c4323 Changed the order of the parameters of makeLinearInputStream to resemble Mixer::playRaw; also made makeLinearInputStream honor FLAG_LOOP (and for this, changed its loop related params slightly)
svn-id: r25926
2007-03-02 15:26:22 +00:00
Max Horn
c2dbd22692 Added reverseStereo parameter to Mixer::playInputStream; changed Mixer::playRaw to use Mixer::playInputStream
svn-id: r25923
2007-03-02 14:49:07 +00:00
Max Horn
8366420474 Remove unneeded #includes
svn-id: r25838
2007-02-24 23:41:20 +00:00
Max Horn
227a080e5b Patch #1663933 (Kill premix channel) with a few tiny additional tweaks by me
svn-id: r25752
2007-02-20 18:50:17 +00:00
Max Horn
8cef52294c Fix for bug #1660559: MANIAC/ZAK: Music does not stop when pausing (regression)
svn-id: r25605
2007-02-15 12:47:09 +00:00
Max Horn
cb49cbdd45 * Reimplemented Mixer::pauseAll to simply invoke pause on all channels
(implying change of semantics)
* Reordered the params of Mixer::playRaw (the SoundType now comes first, not last)
* Removed Mixer::isPaused
* Removed Mixer::getSoundElapsedTimeOfSoundID
* Added some doxygen comments to the Mixer

svn-id: r25356
2007-02-03 19:05:53 +00:00
Max Horn
07f7761479 Backend modularization: Create timer manager, savefile manager and audio mixer in the backends for increased flexibility
svn-id: r24443
2006-10-22 15:42:29 +00:00
Max Horn
9217472f0e With this change, backends are now responsible for instantiating their OSystem class before calling scummvm_main (Note: PalmOS and Symbian are not yet converted, and won't work currently)
svn-id: r21557
2006-04-02 14:16:31 +00:00
Max Horn
406703148f Change CVS keywords to SVN keywords
svn-id: r20515
2006-02-11 10:05:31 +00:00
Eugene Sandulenko
ea42bad781 Update copyright notice
svn-id: r20088
2006-01-18 17:39:49 +00:00