Commit Graph

1473 Commits

Author SHA1 Message Date
Johannes Schickel
6ca0570fe3 - Add a SubLoopingAudioStream, which loops a nested part of a stream and thus features the same looping capabilites as LinearMemoryStream and LinearDiskStream.
- Remove custom looping code from LinearMemoryStream and LinearDiskStream.
- Adapt various client code to the changes.

svn-id: r47226
2010-01-10 15:20:14 +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
4a832ceb01 Fix Timestamp::addMsecs; some cleanup
svn-id: r47212
2010-01-09 22:36:32 +00:00
Johannes Schickel
9c2fa534d1 Implement some safer handling of the "Extended" block in VOC files.
svn-id: r47203
2010-01-09 18:51:25 +00:00
Max Horn
be8371fb07 Replace AppendableAudioStream by QueuingAudioStream
svn-id: r47189
2010-01-09 00:19:13 +00:00
Willem Jan Palenstijn
229c53d485 Use DisposeAfterUse::Flag
svn-id: r47187
2010-01-08 23:05:00 +00:00
Johannes Schickel
b8727aefcc Fix LinearMemoryStream::seek, when the stream was created without request to dispose the memory itself.
svn-id: r47184
2010-01-08 22:14:55 +00:00
Max Horn
f720d99b0a Switch Mixer::playInputStream to use DisposeAfterUse::Flag
svn-id: r47182
2010-01-08 22:09:43 +00:00
Max Horn
474d49946f Rename QueuedAudioStream to QueuingAudioStream
svn-id: r47179
2010-01-08 22:06:04 +00:00
Max Horn
95726dfe50 Move Mohawk's QueuedAudioStream to sound/ (with some tweaks)
svn-id: r47177
2010-01-08 22:04:30 +00:00
Johannes Schickel
271956f2d7 Add some warning inside makeLoopingAudioStream, in case the give start time is after the given end time.
svn-id: r47162
2010-01-08 16:38:51 +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
e976b11995 Add another makeLoopingAudioStream factory for transparently looping a certain interval of a SeekableAudioStream.
svn-id: r47159
2010-01-08 16:25:51 +00:00
Johannes Schickel
a5adbb851a Fix use of getRate in VorbisInputStream's constructor. (Thanks to cyx for spotting this)
svn-id: r47144
2010-01-07 23:50:18 +00:00
Johannes Schickel
a15cc002bb Cleanup.
svn-id: r47139
2010-01-07 20:13:02 +00:00
Johannes Schickel
bd651c6c3d Fix a little bug in LoopingAudioStream::readBuffer.
svn-id: r47138
2010-01-07 19:34:19 +00:00
Johannes Schickel
127213f706 Remove setNumLoops and getNumPlayedLoops from AudioStream.
svn-id: r47137
2010-01-07 17:45:38 +00:00
Johannes Schickel
aa2f55ddc6 Remove the deprecated FLAC, Vorbis and MP3 factories.
svn-id: r47134
2010-01-07 17:14:44 +00:00
Johannes Schickel
b47725540f Cleanup.
svn-id: r47133
2010-01-07 17:04:32 +00:00
Johannes Schickel
a597e5fef9 Make VagStream a RewindableAudioStream.
svn-id: r47132
2010-01-07 17:04:01 +00:00
Johannes Schickel
d5fe29c3c9 Make makeWAVStream return a RewindableAudioStream.
svn-id: r47129
2010-01-07 16:34:56 +00:00
Johannes Schickel
ca5e137945 Create a wrapper makeLoopingAudioStream to reduce code duplcation.
svn-id: r47128
2010-01-07 16:18:03 +00:00
Johannes Schickel
2e9bae44c5 Let ADPCM streams subclass RewindableAudioStreams and thus allow them to be looped with the new looping code.
svn-id: r47127
2010-01-07 16:08:41 +00:00
Max Horn
4f463e288e Get rid of calculatePlayTime, instead store playtimes as Timestamps
svn-id: r47122
2010-01-07 15:25:14 +00:00
Max Horn
32ec5746be Add Timestamp::totalNumberOfFrames() method, clarify some comments
svn-id: r47120
2010-01-07 15:12:20 +00:00
Max Horn
423094cd5f Fix warning
svn-id: r47119
2010-01-07 15:11:46 +00:00
Johannes Schickel
c57549184b Add important note for engine authors about SubSeekableAudioStream.
svn-id: r47114
2010-01-07 14:25:16 +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
e00f36f9c7 Cleanup.
svn-id: r47112
2010-01-07 14:22:57 +00:00
Johannes Schickel
b80779824f - Strip custom looping code out of FLAC, Vorbis and MP3 streams
- Adapt the legacy make*Stream factories to use the new AudioStream subclasses
- Change return value of make*Stream back to AudioStream *

svn-id: r47111
2010-01-07 14:22:24 +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
aa92e004f5 First step of a slight revision of the new AudioStream looping API:
- Create a RewinadableAudioStream, for streams which can only be reset to the start
- Create a LoopableAudioStream, which loops a whole RewindableAudioStream
- Make SeekableAudioStream a subclass of RewindableAudioStream
- Create a SubSeekableAudioStream, which allows of limiting the range of an SeekableAudioStream to be played.

- Adapt AudioCD code.

svn-id: r47109
2010-01-07 14:20:36 +00:00
Johannes Schickel
b6fb8b349a Fix FLAC's getLength implementation.
svn-id: r47093
2010-01-06 20:25:19 +00:00
Johannes Schickel
f32aeb01bf Add a constructor to Timestamp, which allows for specifying seconds + start frames directly.
svn-id: r47091
2010-01-06 20:24:56 +00:00
Johannes Schickel
8c79b6f6ee Adapt FLAC and Vorbis to use calculateSampleOffset in their seek implementation.
svn-id: r47085
2010-01-06 16:11:21 +00:00
Max Horn
dd76e2bda0 Rename some Timestamp methods: getNumberOfFrames -> numberOfFrames and getFramerate -> framerate
svn-id: r47083
2010-01-06 15:56:04 +00:00
Johannes Schickel
297a955579 - Simplify Audio::calculateSampleOffset.
- Made Audio::calculateSampleOffset accessable from outside audiostream.cpp.
- Adapt KYRA's AUDStream to use Audio::calculateSampleOffset.

svn-id: r47082
2010-01-06 15:40:49 +00:00
Johannes Schickel
e72707b04e - Add some functionallity to query the seconds and number of frames stored in a Timestamp.
- Add tests for these

svn-id: r47081
2010-01-06 15:33:54 +00:00
Johannes Schickel
84f3034406 - Move openStreamFile from AudioStream to SeekableAudioStream.
- Fix documentation of openStreamFile.

svn-id: r47080
2010-01-06 15:23:33 +00:00
Max Horn
1c6ccf8000 Add more comparision operators to Timestamp
svn-id: r47071
2010-01-06 12:15:05 +00:00
Max Horn
5b635fd610 Change the way Timestamp stores its data.
Instead of storing milliseconds and frames (which causes rounding errors,
and causes ambiguity in how a given time is stored), we now do things
differently: We store a number of seconds, and frames. To make sure that
we can still handle milliseconds accurately, though, we change the
framerate to the least common multiple of the original framerate and
1000. So 60 becomes 6000, and 44100 becomes 441000. There are no visible
changes for client code, except for the increased accuracy.

svn-id: r47070
2010-01-06 12:09:14 +00:00
Johannes Schickel
789f2ce255 The current AIFF stream implementations returns a SeekableAudioStream, reflect that in its factory method.
svn-id: r47067
2010-01-06 00:02:49 +00:00
Johannes Schickel
8638d6ce61 Change the AudioStream::openStreamFile API to return SeekableAudioStreams and remove parameter for depreacted loop support. (We could consider moving this to SeekableAudioStream).
svn-id: r47065
2010-01-06 00:01:57 +00:00
Johannes Schickel
81a94a0644 - Put the new factories for MP3, Vorbis and FLAC in place.
- Marked the loop factories with loop related parameters as deprecated.

svn-id: r47061
2010-01-05 23:59:28 +00:00
Johannes Schickel
e38b7b3cc5 Properly initialize _pos in LoopingChannel.
svn-id: r47055
2010-01-05 22:02:04 +00:00
Johannes Schickel
7591a09365 Implement Timestamp::operator== as equality in time.
svn-id: r47054
2010-01-05 22:01:05 +00:00
Johannes Schickel
2d3a06f805 Cleanup.
svn-id: r47052
2010-01-05 22:00:06 +00:00
Robin Watts
61c413e114 Update ARM version of rate filler code in line with LordHoto's change
in revision 47014.

svn-id: r47051
2010-01-05 21:56:13 +00:00
Johannes Schickel
083cab5157 Cleanup.
svn-id: r47046
2010-01-05 21:10:58 +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
920dac2f9d Remove unsafe getTotalPlayTime from AudioStream.
svn-id: r47037
2010-01-05 20:14:28 +00:00
Johannes Schickel
e9a94ecb9b Add a "getLength" function to SeekableAudioStream.
svn-id: r47036
2010-01-05 20:13:31 +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
d485d0c295 Oops somehow I must have missed CopyRateConverter::flow, in r47014.
svn-id: r47016
2010-01-05 02:48:38 +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
Johannes Schickel
2ef2064f44 Make RateConverter::flow return the number of sample pairs written, like it's documented in the .cpp file.
svn-id: r47014
2010-01-05 02:42:35 +00:00
Johannes Schickel
f5c3bd887e - Add a new SeekableAudioStream interface. Soon to be used to replace audio stream specific looping code by generic code in Mixer...
- Adapted some existing AudioStreams to implement that interface (not tested!)

svn-id: r47013
2010-01-05 02:27:24 +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
Max Horn
4ae9412a3a Make some improvements for Audio::Timestamp.
* Add convertToFramerate() method
* Add framerate() method
* Add operator == and !=
* Improve frameDiff() to work for two timestamps with distinct framerates
* Improve Doxygen comments

svn-id: r46994
2010-01-04 22:48:28 +00:00
Johannes Schickel
b2355cac9f - Remove unsafe default constructor of Audio::Timestamp.
- Add an assert which prevents the _frameRate from being 0 in the Audio::Timestamp constructor.

svn-id: r46958
2010-01-03 22:41:35 +00:00
Torbjörn Andersson
72eb9ec9ea Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is null
before freeing it, which isn't necessary.

svn-id: r46941
2010-01-03 19:37:43 +00:00
Willem Jan Palenstijn
13a242838f SCI/new music code: Don't stop notes when looping for a hold
svn-id: r46897
2010-01-02 20:20:36 +00:00
Johannes Schickel
137744c40c This time properly fix getTotalPlayTime for looped FLAC, MP3 and VORBIS audio streams.
svn-id: r46863
2010-01-01 22:57:08 +00:00
Johannes Schickel
2e9d5a5f41 Mention in documentation of AudioStream::setNumLoops, that this function also resets the number of loops played counter.
svn-id: r46862
2010-01-01 22:56:18 +00:00
Johannes Schickel
6109275750 Properly reset _numPlayedLoops in setNumLoops in all AudioStream implementations implementing setNumLoops.
svn-id: r46861
2010-01-01 22:55:38 +00:00
Martin Kiewitz
f3cd114c5c init _numPlayedLoops inside LinearMemoryStream
svn-id: r46857
2010-01-01 22:16:53 +00:00
Johannes Schickel
bba2c8ce95 Fix getTotalPlayTime for MP3, FLAC, Vorbis and LinearMemoryStream after the latest loop related changes.
svn-id: r46838
2010-01-01 16:57:23 +00:00
Eugene Sandulenko
622dd0d16d Implemented setNumLoops() for common audio streams.
Implemented getNumPlayedLoops() for common audio streams.

Requested by m_kriewitz.

svn-id: r46836
2010-01-01 16:28:22 +00:00
Eugene Sandulenko
5ebadb10d4 Extend doxygen comment for setNumLoops()
svn-id: r46832
2010-01-01 15:35:12 +00:00
Martin Kiewitz
8ee5033bab Added setNumLoops() for linear memory streams, enables looping of samples in sci
svn-id: r46821
2010-01-01 13:31:02 +00:00
Martin Kiewitz
ea86c41cc5 Adding setNumLoops() to AudioStream class
svn-id: r46819
2010-01-01 13:11:34 +00:00
Fabio Battaglia
a108df30a7 Add Nintendo 64 port to trunk.
svn-id: r46773
2009-12-30 21:11:38 +00:00
Jordi Vilalta Prat
7475bbbc3f Fix bug #2923380 (AMIGAOS4: Compiler error)
svn-id: r46753
2009-12-30 15:41:11 +00:00
Eugene Sandulenko
fb8ecae7f1 Add Mohawk engine code. Part 2/3: common code changes.
svn-id: r46728
2009-12-29 23:20:23 +00:00
Johannes Schickel
5cd176052c Typo...
svn-id: r46319
2009-12-09 20:11:02 +00:00
Johannes Schickel
27e03012d5 This is hopefully fixing compilation of the fluidsynth code.
svn-id: r46318
2009-12-09 20:08:57 +00:00
Max Horn
c8873d8492 Changed MidiDriver::createMidi to take a MidiDriverType instead of an int
svn-id: r46316
2009-12-09 18:12:51 +00:00
Max Horn
84f3c98fad Remove the Audio::Mixer parameter from the midi/music plugins
svn-id: r46315
2009-12-09 18:05:20 +00:00
Johannes Schickel
67fc4e420b Rename the MT-32 emulator driver name from "MT-32" to "MT-32 Emulation to avoid confusion.
svn-id: r46271
2009-12-07 00:16:28 +00:00
Johannes Schickel
ef5d0226c1 Fix warnings.
svn-id: r46145
2009-11-26 00:43:43 +00:00
Travis Howell
8783b0f2f7 Add patch #2839048 - MM C64 sound/music player, with minor changes.
svn-id: r46143
2009-11-26 00:31:19 +00:00
Johannes Schickel
611a58f19c Extend documentation slightly.
svn-id: r46141
2009-11-25 23:17:16 +00:00
Johannes Schickel
776d735c2e Do not fall back to a auto detection of the OPL emulator, when the user selected OPL emulator does not support a mode asked for.
We will now output a warning to the user in this case. That should be fine,
since SCI is the only engine so far, which uses Dual OPL2 emulation.
Albeit this is not supported by our MAME emulator the user will still get
sound output, since the SCI engine will do proper recovery and fallback
to single OPL2 emulation, which is supported by the MAME emulator.
In case a engine would require a specifc mode (like OPL3) and the
user selects MAME emulation, this might result in no sound output
(or a crash), in case the engine does not take any care of testing whether
the OPL creation succeeded. But luckily so far no engine does this,
so it should be fine to not worry about that for now.

svn-id: r46140
2009-11-25 23:02:03 +00:00
Max Horn
413a048a06 Fix 'randomly placed' doxygen comments (which lead to incorrect documentation, e.g. some of those ended up as doxygen comment for various namespaces, such as Common)
svn-id: r46136
2009-11-25 10:55:25 +00:00
Max Horn
81762edf33 Remove Igor engine
svn-id: r45898
2009-11-14 13:11:06 +00:00
Max Horn
45308a2bd5 Fix for bug #2890038 (FT: Crashes when entering inventory)
svn-id: r45638
2009-11-03 20:49:53 +00:00
Max Horn
51933629d1 Changed foo(void) to foo() in almost all non-backend source files
svn-id: r45616
2009-11-02 21:54:57 +00:00
Max Horn
400ee8c461 Enhance VOC debug output
svn-id: r45615
2009-11-02 21:42:21 +00:00
Max Horn
be4078823a cleanup
svn-id: r45236
2009-10-18 19:43:47 +00:00
Max Horn
7f0f6655e8 cleanup
svn-id: r45098
2009-10-14 23:22:32 +00:00
Max Horn
6a2985ba08 Patch #2834677: Wave/ADPCM Endianness Fixes
svn-id: r45095
2009-10-14 22:37:05 +00:00
Max Horn
d0876b06ed Remove some unused variables
svn-id: r44853
2009-10-09 22:21:45 +00:00
Max Horn
3399c3aeb6 Change doxygen inline comments from "//!" to "///" as proposed on -devel
svn-id: r44802
2009-10-08 21:28:57 +00:00
Max Horn
f242266f6d Change a couple places from 'end of namespace' to 'End of namespace', for consistency
svn-id: r44634
2009-10-04 21:26:33 +00:00
Andre Heider
29bb8a59ee If an error occured on constructing a VorbisInputStream, return 0 from makeVorbisStream, just like makeFlacStream does.
svn-id: r44556
2009-10-03 19:27:10 +00:00
Max Horn
8ba75fc522 Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
svn-id: r44495
2009-09-30 16:16:53 +00:00
Max Horn
76132409d6 Removed Mac OS X QuickTime MIDI backend. It breaks on OS X 10.6, and it's not as good as the CoreAudio backend anyway
svn-id: r44428
2009-09-27 22:43:32 +00:00
Andre Heider
3045ecce2f Removed an assert() in favour of error checking.
svn-id: r44278
2009-09-23 21:14:37 +00:00
Johannes Schickel
c50940bbf4 Got rid of Common::File::addDefaultDirectory, instead implemented the solution proposed in "Case agnostic handling for directories (and files)" on -devel.
svn-id: r44266
2009-09-23 00:15:00 +00:00
Johannes Schickel
1b68bf76ac Wording.
svn-id: r44086
2009-09-14 19:30:46 +00:00
Johannes Schickel
160f9e7705 Use struct packing for AdLib instruments like the SCUMM engine does. (And a comment about this change, which might be rather paranoia than having a real effect)
svn-id: r44085
2009-09-14 18:41:21 +00:00
Torbjörn Andersson
e7469479ce Removed unnecessary semi-colons.
svn-id: r44048
2009-09-13 10:32:55 +00:00
Norbert Lange
0b5a32e99a fix SFX not playing before music started
svn-id: r43799
2009-08-29 12:44:51 +00:00
Sven Hesse
a6c7d14ddf This just fix the compile errors on AmigaOS (bug #2845660)
svn-id: r43772
2009-08-27 16:29:56 +00:00
Norbert Lange
917d4b78b3 Merge with trunk
svn-id: r43701
2009-08-24 17:51:47 +00:00
Johannes Schickel
dd7868acc2 - Change shorten.h guard to match the sjis.h guard.
- Also enable shorten code when the build includes support for dynamic engine plugins.

svn-id: r43700
2009-08-24 16:07:46 +00:00
Norbert Lange
5f87d5090c fixed small mistake with the sinetable
moved pow2table into the only function using it

svn-id: r43563
2009-08-20 15:10:32 +00:00
Johannes Schickel
3ade77dfb0 Typos.
svn-id: r43515
2009-08-18 15:41:00 +00:00
Johannes Schickel
5c11ec51bc - Destory AudioCDManager singleton after user quits a game, this saves a few bytes memory
- Added FIXME to audiocd.h, concering why destroying the AudioCDManager can not quit CD playback right now

svn-id: r43513
2009-08-18 15:32:26 +00:00
Norbert Lange
56c23731e7 dont keep some unused parts of the mdatfile in memory
svn-id: r43506
2009-08-18 11:48:38 +00:00
Norbert Lange
5e1e7d0191 added tiebreaking to pickVoice, now the use of channels is better distributed
added a fixedpoint pow2 function (similar to the original) - no floats used anymore at the expense of a 512 byte table
added a sinetable for the modulation effect.

svn-id: r43505
2009-08-18 11:34:55 +00:00
Johannes Schickel
516dd5c9a4 Slight cleanup to makeLinearDiskStream interface.
svn-id: r43481
2009-08-17 13:49:56 +00:00
Filippos Karapetis
76a339ecd0 Added looping support to LinearDiskStream, needed by SAGA and perhaps other engines. Note that the loop end parameter is still not implemented
svn-id: r43479
2009-08-17 13:16:40 +00:00
Norbert Lange
cc3a20c13c merge with trunk
svn-id: r43478
2009-08-17 12:58:53 +00:00
Johannes Schickel
582eb13fa2 Fix for bug #2838568 "AMIGAOS4: Compiler error in audiostream.cpp"
svn-id: r43447
2009-08-16 17:38:09 +00:00
Norbert Lange
c96affd0c1 merge with trunk
svn-id: r43443
2009-08-16 16:39:34 +00:00
Neil Millstone
a135a7f938 Allow VOCs to stream from disk. Disabled by default, use symbol STREAM_AUDIO_FROM_DISK to enable. See patch #2834001.
svn-id: r43357
2009-08-13 21:46:41 +00:00
Norbert Lange
29b145310c (re-)initialise some Variables when sound is stopped
svn-id: r43351
2009-08-13 16:42:36 +00:00
Norbert Lange
13757d5354 sound_amiga: honor _musicEnabled and _sfxEnabled flags
maxtrax: initialise lastvolume

svn-id: r43337
2009-08-13 00:07:37 +00:00
Norbert Lange
0836cf6d9b merged from trunk (Amiga LoK supposedly completeable!)
fixed a bug I introduced in one of the last cleanups

svn-id: r43291
2009-08-11 22:35:56 +00:00
Andre Heider
dc0e908385 Fixed an endian bug in the ADPCM decoder (#2211901).
svn-id: r43287
2009-08-11 19:11:26 +00:00
Norbert Lange
8cb42dd689 fixed bug in tempoeffect
svn-id: r43204
2009-08-10 12:09:31 +00:00
Norbert Lange
d63ddbdbbe fix potential leak in loadscore
added parameters to constructor

svn-id: r43203
2009-08-10 11:47:49 +00:00
Norbert Lange
b4c689a3c1 fixed up some missing newlines
removed MSVC6 disable pragmas, the warnings are already disabled in the project files

svn-id: r43182
2009-08-09 18:59:22 +00:00
Norbert Lange
0350a1598d merge with trunk
svn-id: r43134
2009-08-08 19:09:30 +00:00
Johannes Schickel
c455e135b2 Fix XMIDI looping implementation. Now for example the music in the ferret village of ITE plays fine.
svn-id: r43126
2009-08-08 13:57:21 +00:00
Norbert Lange
4e7b156e10 fix a bug that prevented gcc from compiling
correctly added my palette patch (it showed up in the rev-changes but dint got applied fully to the svn tree?)

svn-id: r43116
2009-08-08 09:49:28 +00:00
Norbert Lange
6dbeddab25 slighty changed how voices get disabled after their sample played
svn-id: r43111
2009-08-08 09:23:09 +00:00
Norbert Lange
baeed11aae added missing stuff for modulation and microtonal effects (several bugs in original player - dont think this was ever used)
added compiletime macros for modulation and microtonal
moved common initialization stuff into a new resetPlayer() method
reworked stopEvents, made them simpler and inlined the noteOff function
added check for allocation and IO-Errors to the load-function.

svn-id: r43110
2009-08-08 09:18:23 +00:00
Norbert Lange
78e06a0e1c refactored noteOn
removed channel.voicesActive variable

svn-id: r43104
2009-08-07 21:00:34 +00:00
Norbert Lange
d51e8be2bf implemented "SPECIAL" commands
addid missing stacklock for a few public functions

svn-id: r43100
2009-08-07 18:02:06 +00:00
Norbert Lange
c4047908aa added stub for setting audio filter in Paula
fixed wrong value for volume in maxtrax

svn-id: r43099
2009-08-07 16:21:30 +00:00
Norbert Lange
648bec1d0c move function definitions from header to the cpp file
moved a few functions to static scope

svn-id: r43077
2009-08-05 19:26:00 +00:00
Norbert Lange
621071ea9e added some error messages to the compile-time checks
svn-id: r43076
2009-08-05 18:57:13 +00:00
Norbert Lange
025846020b moved check if class should be compiled to the header
svn-id: r43075
2009-08-05 18:45:22 +00:00
Norbert Lange
55a24eacd5 fixed wrong indentation
moved notetable to static scope

svn-id: r43074
2009-08-05 18:13:42 +00:00
Norbert Lange
29e4755f2a check if modplayers should be compiled based on engine-macros
svn-id: r43073
2009-08-05 18:00:13 +00:00
Norbert Lange
fc8e269c36 cleaned up sound_amiga.cpp a bit, added checks for missing files
svn-id: r43050
2009-08-04 18:24:39 +00:00
Norbert Lange
4c4eb1394c added warning should the sound files not be available (intro will hang if there is no musictimer)
svn-id: r43049
2009-08-04 17:43:56 +00:00
Norbert Lange
c304c633ce moved helper functions from the header file into the cpp file
svn-id: r43047
2009-08-04 17:12:19 +00:00
Norbert Lange
dbe50abae4 added doxygeb comments
added checks to public functions if resources already got loaded

svn-id: r43046
2009-08-04 17:03:35 +00:00
Norbert Lange
e6f8bfafc7 moved code for initialising patterns into own function
added initialisation of return-addresses for patterns and macros

svn-id: r43045
2009-08-04 15:43:40 +00:00
Norbert Lange
0306695459 Some formatting changes and added comments
fixed parameters for "Play macro" command
fixed copypaste-mistake for pattern-fade

svn-id: r43032
2009-08-04 10:42:42 +00:00
Norbert Lange
2a4c60244b made some unused methods private
svn-id: r42986
2009-08-02 00:39:06 +00:00
Norbert Lange
bb9f1d6a25 fix some more harmless warnings to make gcc shutup
svn-id: r42985
2009-08-02 00:27:15 +00:00
Norbert Lange
2dd5516954 fixed some constness warnings
svn-id: r42984
2009-08-02 00:15:38 +00:00
Norbert Lange
92d292a3f6 made MdatResource struct private and changed the signatures of functions which load the resources.
svn-id: r42982
2009-08-02 00:03:42 +00:00
Norbert Lange
59395eb6b6 stole formatting for constructors from existing code
svn-id: r42981
2009-08-01 23:14:28 +00:00
Norbert Lange
a28281072d engines/scumm/scumm.cpp: terminate method is pretty redundant - removed
tfmx, player_v4a: refactored Tfmx to allow sharing of resources between 2 instances. Needed changes in player_v4a aswell

svn-id: r42980
2009-08-01 23:02:45 +00:00
Norbert Lange
27ee1eb331 refactored and commented player_va4 a bit
fix waitcommand in Tfmx
try making tfmxplayer compile again

svn-id: r42976
2009-08-01 16:10:00 +00:00
Norbert Lange
1becc072f9 Added the last 2 patterncommands just so I dont have to warn about unimplemented ones
svn-id: r42963
2009-07-31 15:20:02 +00:00
Norbert Lange
fd1fed0b6e process all DMA Events before Macros, for the unlikely chance of making a difference
svn-id: r42962
2009-07-31 14:36:37 +00:00
Norbert Lange
a4ebf2cfa6 using accessmodifiers in Tfmx now and removed/disabled functions that now dont work anymore (the commandline utility cant be compiled anymore as result of this)
added arraysize of external signals and check it before accesses
moved 2 debug-functions into Tfmx.cpp, removed depencies to files in the tfmx folder
moved common code for fade-effects in a seperate method

svn-id: r42961
2009-07-31 14:29:04 +00:00
Johannes Schickel
e779747ca4 Fix typo, which made our "floorf" macro use "floorf" instead of "floor" on systems without "floorf".
svn-id: r42904
2009-07-29 20:03:46 +00:00
Johannes Schickel
17fe3ce29e Oops enabled HACK to prevent multiple OPL instances again.
svn-id: r42849
2009-07-27 18:19:16 +00:00
Norbert Lange
f051e7e9ab use own soundhandle as the ones in Kyra::Sound seem to be used for voices (and might get killed)
svn-id: r42620
2009-07-19 16:11:05 +00:00
Norbert Lange
5952977ed0 use ticks for timing fadeout
svn-id: r42618
2009-07-19 15:36:11 +00:00
Norbert Lange
dbe300fc53 fixed retiring of external Notes
fixed/improved counting DMAs in Paula
added flag for looping songs
rearranged maxtrax.h a bit

svn-id: r42613
2009-07-19 14:02:19 +00:00
Norbert Lange
31b6767666 fixed: intro-music started twice because it was hardcoded in the engine
removed verbose debug-output from maxtrax
 

svn-id: r42604
2009-07-19 01:14:51 +00:00
Norbert Lange
396d6c86aa add support for fadeout
svn-id: r42601
2009-07-19 00:58:01 +00:00
Norbert Lange
22ee23cac7 some more tables included, for tempo and volume values
svn-id: r42600
2009-07-19 00:44:54 +00:00
Norbert Lange
bb5207c13b fixed some initialisation issues
svn-id: r42595
2009-07-18 17:27:31 +00:00
Norbert Lange
9e16e3b3e6 first attempt at enabling soundeffects using an table from the executeable. Doesnt quite work as it should
svn-id: r42575
2009-07-18 00:04:28 +00:00
Norbert Lange
bb64bf008d merge with trunk
svn-id: r42574
2009-07-17 21:23:54 +00:00
Norbert Lange
cfe2928d98 added primitive support for Kyrandia`s Intro Music.
svn-id: r42567
2009-07-17 16:07:57 +00:00
Norbert Lange
c0c25d234e precalculating some more from CalcNote
svn-id: r42556
2009-07-17 01:42:58 +00:00
Norbert Lange
1fa1bdc9f6 avoid some calculations from being done every time in CalcNote
svn-id: r42553
2009-07-17 00:58:26 +00:00
Norbert Lange
30cb4772f2 simplified NoteOn calculations
added playNote command for soundeffects

svn-id: r42544
2009-07-17 00:07:36 +00:00
Max Horn
baabc623f6 Got rid of two more ioFailed uses
svn-id: r42501
2009-07-15 10:04:50 +00:00
Max Horn
6b98c4c4e7 Got rid of some more ioFailed uses (also fixed a potential leak in graphics/font.cpp, and handle eos correctly in the FLAC code)
svn-id: r42488
2009-07-14 18:24:20 +00:00
Norbert Lange
799ab9ac45 removed one more useless variable and turned often used flags into bools
big cleanup of the interrupt-function
changed NoteOn function to pass the results directly instead of saving them in member variables

svn-id: r42466
2009-07-14 02:15:31 +00:00
Norbert Lange
d5e1738ef6 cleaned up NoteOn a bit
fixed NoteOff and removed some useless variables - intro sounds fine now

svn-id: r42461
2009-07-13 22:49:34 +00:00
Norbert Lange
162c6a418d added routine pickvoice to dinamically choose a fitting channel
use similar FP-rounding as the original player

svn-id: r42454
2009-07-13 21:27:58 +00:00
Norbert Lange
100d86ee4d made all structures that are only written when loading song/samples const
fixed volume-handling a bit, still not correct

svn-id: r42343
2009-07-10 16:01:40 +00:00
Norbert Lange
3ae850fe9c added initialisation of channels
svn-id: r42339
2009-07-10 15:04:41 +00:00
Norbert Lange
c5a3ab2af2 changed: period in Paula get set immediately instead of queued
svn-id: r42336
2009-07-10 14:30:37 +00:00
Norbert Lange
f63c15acc1 added timebased effects
fixed passing length of samples to Paula
fixed setting tempo at songstart
fixed setting tempo/flags only if loading a score

svn-id: r42334
2009-07-10 13:38:13 +00:00
Norbert Lange
c16d276f99 fixed some mismatched new[]/delete
fixed 2 bugs in the calcnote function

svn-id: r42304
2009-07-09 16:18:35 +00:00
Filippos Karapetis
b1bd180408 Added proper safeguards for shorten.*, thereby fixing commit 42259
svn-id: r42290
2009-07-09 15:17:45 +00:00
Filippos Karapetis
8a783bdd76 Renamed sound/iff.* to sound/iff_sound.* to fix an issue with the upcoming changes to the MSVC project files (sound/iff.* produces iff.obj, which clashes with iff.obj from graphics/iff.*)
svn-id: r42287
2009-07-09 13:17:46 +00:00
Norbert Lange
84e96bc513 fixed up some constants
svn-id: r42276
2009-07-09 00:19:17 +00:00
Norbert Lange
d25f481421 fixed (and inlined) the "Antilog" function
svn-id: r42274
2009-07-09 00:02:12 +00:00
Norbert Lange
a9d9de7db4 implemented setting note-periods, likely still somewhat wrong.
reversed the log functions which does exactly the inverse as the name implies (its refered as "antilog" in the sources *rollseyes*)

svn-id: r42273
2009-07-08 22:59:50 +00:00
Filippos Karapetis
90422f6bd3 Added guards to only include the Shorten audio code when the SAGA2 code in the SAGA engine is enabled
svn-id: r42259
2009-07-08 07:28:13 +00:00
Norbert Lange
a2e46b76f3 fix identation and replaced the "goto-workaround" with something simpler
svn-id: r42189
2009-07-06 18:51:22 +00:00
Torbjörn Andersson
7c155f8747 GCC thinks it's wrong to goto past variables being initialised (even if they
aren't used afterwards). Fixed that, and some warnings.

svn-id: r42187
2009-07-06 18:15:50 +00:00
Norbert Lange
e9a4800629 Implemented a few commands
Partially implemented queued Events and some related commands

svn-id: r42186
2009-07-06 17:37:54 +00:00
Norbert Lange
c0b1d10ba2 Added tons of members to MaxTrax, songs get fully loaded and stored internally
svn-id: r42096
2009-07-04 16:24:15 +00:00
Norbert Lange
9f8d9de11d added a skeleton for maxtrax modules. Not much happening yet, just reading and displaying a bit of information for maxtrax file
svn-id: r42013
2009-07-01 23:11:56 +00:00
Max Horn
a6b57dc3a9 - Added GCC_PRINTF attribute to several funcs where it makes sense
- change some constants from double to float, to avoid "loss of precision due to implicit conversion" warnings
- removed duplicate prototypes for some funcs
- fixed some "increases required alignment of target type" warnings

svn-id: r42009
2009-07-01 20:51:04 +00:00
Norbert Lange
7c7ad0d5f1 some Code-Formatting
svn-id: r41994
2009-07-01 15:15:58 +00:00
Norbert Lange
abef70f4e1 Merging in changes from trunk
svn-id: r41989
2009-07-01 14:45:24 +00:00
Norbert Lange
3b94e2488d Added kyra project
removed 1 potentially troublesome assert

svn-id: r41988
2009-07-01 13:25:48 +00:00
Norbert Lange
e3a5da7b7e engines/scumm/*: enabled choosing of the colorpalette, by setting RenderMode to EGA the "old" palette will be used
tfmx/tfmxplayer.cpp: removed some unused stuff
sound/mods/tfmx.cpp: emulating the way MI initialises new macro-programms. (Difference might not be audible at all)

svn-id: r41976
2009-06-30 17:41:24 +00:00
Norbert Lange
cf351dffe6 Modified macro-,patter-,track-step functions to loop aslong they are supposed to execute. (instead of doing that loop "outside").
Added "addBeginn" Effect, not used by MI but simple to implemt.

svn-id: r41910
2009-06-27 07:07:20 +00:00
Norbert Lange
01c3db4d76 Fixed restarting of song (hopefully thouroughly)
replaced all modulos with masks
swapped Paulas stereo output

svn-id: r41856
2009-06-25 08:57:15 +00:00