Commit Graph

573 Commits

Author SHA1 Message Date
Max Horn
0df319e952 #include cleanup (explicityl specify the location for headers from common/, so that we at some point can get rid of -Icommon; exception is made for stdafx.h, since a) we might want to rename it and b) might want to move it to the top level)
svn-id: r9359
2003-08-01 12:21:04 +00:00
Max Horn
643e88b04c get rid of BUGGY_NEW_MP3_PLAYER
svn-id: r9347
2003-07-31 20:28:11 +00:00
Max Horn
0b4e48b59e revamped MP3/Vorbis CD 'emulation' code to use a PlayingSoundHandle -> this allows to finally get rid of the hackish isChannelActive/isChannelUsed methods in SoundMixer
svn-id: r9346
2003-07-31 20:24:10 +00:00
Max Horn
d8494d658b fixed MP3InputStream, now seems to work properly (kind of a surprise)
svn-id: r9345
2003-07-31 19:32:38 +00:00
Max Horn
16425977b7 icur was not being saved between rate conversion calls
svn-id: r9344
2003-07-31 19:08:57 +00:00
Paweł Kołodziejski
e5e117006a back disable warnings into stdafx.h, vc6 is lack of warnings support
svn-id: r9337
2003-07-31 18:35:01 +00:00
Max Horn
1b52e9f19c added new header file backends/intern.h; removed some stuff from common/system.h which is either only of interest to backends or code instantiating a backend (->backends/intern.h); also removed fmopl specific enums (->sound/fmopl.h)
svn-id: r9327
2003-07-31 12:33:33 +00:00
Jamieson Christian
7c16006cc7 Fix for RC bug [780675] MI2: Reoccuring crash
Tightened up OOB track selection handling in
MidiParser. Apparently some SMFs in the Mac
version of MI2 (and other games?) specify
track -1 in their jump commands to indicate
a jump within the same track.

svn-id: r9321
2003-07-31 06:50:13 +00:00
Jamieson Christian
c5de745580 Disabled unknown pragma warning in MSVC-6.
svn-id: r9320
2003-07-31 06:47:05 +00:00
Max Horn
f74197ce8b make use of the new MP3InputStream in ChannelMP3CDMusic - but disabled by default, because it is still quite buggy (e.g. crashes at end of stream etc)
svn-id: r9314
2003-07-31 01:36:24 +00:00
Max Horn
9b2d4f92aa removed the AudioInputStream::size method -> only eof() is really needed, and this can be implemented more efficiently stand-alone; implemented MP3InputStream (work in progress)
svn-id: r9313
2003-07-31 01:21:38 +00:00
Max Horn
5225597d85 cleanup
svn-id: r9312
2003-07-31 01:06:01 +00:00
Max Horn
6143058422 fixed incorrect MSVC fixes; simplified readSample code (bugs #780167 and #780420)
svn-id: r9302
2003-07-30 19:43:51 +00:00
Max Horn
26d05c0190 the VC warning for unknown pragmas is now gloabally disabled, no need to work around it locally
svn-id: r9300
2003-07-30 18:40:28 +00:00
Torbjörn Andersson
15378172cd Partial fix for bug #780167 ("SIMON1/2: Sound problems"). It seems to fix
the crash, but the sounds play at the wrong rate, I believe.

svn-id: r9298
2003-07-30 18:20:45 +00:00
Jamieson Christian
20d06e2c3d Fixed MSVC errors
svn-id: r9288
2003-07-30 09:26:54 +00:00
Max Horn
aa6c99b5da removed some debug output
svn-id: r9282
2003-07-29 13:36:06 +00:00
Max Horn
6b470390f7 cleanup
svn-id: r9281
2003-07-29 12:39:41 +00:00
Max Horn
45ebcdbde1 account for the data in the _buffer, too
svn-id: r9276
2003-07-29 03:02:25 +00:00
Max Horn
fb7deafaef after looking at SAM and DOTT, it seems the actor-voice sync actually is *worse* with a non-zero _silenceCut value - setting it to 0 gives perfect sync for me... odd, when did this change? Anyway, removing _silenceCut. If you notice sync problems, tell me
svn-id: r9275
2003-07-29 02:48:38 +00:00
Max Horn
04843469eb some cleanup; moved around some stuff, preparing to unify more code of ChannelMP3CDMusic and ChannelMP3
svn-id: r9274
2003-07-29 02:21:07 +00:00
Max Horn
bb35528f43 return immediately after commiting suicide; enable new rate conversion code
svn-id: r9273
2003-07-29 01:43:35 +00:00
Max Horn
021a701827 hooked up ChannelVorbis to the new rate converter system, using VorbisInputStream
svn-id: r9272
2003-07-29 01:37:50 +00:00
Max Horn
77eb284062 added VorbisInputStream
svn-id: r9271
2003-07-29 01:37:03 +00:00
Max Horn
1be944755f added makeRateConverter factory function
svn-id: r9270
2003-07-29 01:36:10 +00:00
Travis Howell
3f99e8d1d4 Fix mingw compile
svn-id: r9269
2003-07-29 01:35:37 +00:00
Max Horn
4e7c115681 cleanup
svn-id: r9266
2003-07-29 00:05:36 +00:00
Max Horn
57a413f028 experimental new rate conversion code (use SOX_HACK to en-/disable it); note that right now only the linear filter works, the high quality resample in resample.cpp is in flux; right now the top priority for me is to get MP3/Vorbis resampling working
svn-id: r9261
2003-07-28 20:42:54 +00:00
Max Horn
ed6521f332 fix for bug #776169
svn-id: r9259
2003-07-28 20:25:09 +00:00
Max Horn
c6a4a1d37d make wrapped stream work (I can hear some music in CoMI now before it segfaults :-)
svn-id: r9258
2003-07-28 18:01:56 +00:00
Max Horn
475bc72277 moved st_gcd to resample.cpp
svn-id: r9257
2003-07-28 18:01:00 +00:00
Max Horn
13eee4b06f rewrote the input streams, this should be more straightforward and inline slightly better (the fact that the main AudioInputStream methods are virtual still means that no inlining can take place there; but of course, if we did change that, all the rate converters would have to exist in 8, instead of currently 2, compiled versions)
svn-id: r9256
2003-07-28 17:28:29 +00:00
Max Horn
7ea67048c1 more work on WrappedMemoryStream (not yet tested)
svn-id: r9253
2003-07-28 16:55:43 +00:00
Max Horn
9e051fa507 instead of 'int channels', use 'bool stereo' (less extensible, but then I don't think we'll ever support 5.1 sound :-)); fixed a bug in st_rate_flow where it sometimes would overflow the output buffer; made CopyRateConverter a template, too, increasing efficency
svn-id: r9239
2003-07-28 11:13:01 +00:00
Max Horn
81baae7ddc added CopyRateConverter (used if inrate == outrate)
svn-id: r9214
2003-07-28 01:50:46 +00:00
Max Horn
e87bc6d89e use a single converter for both channels (if input data is stereo), for improved efficency; renamed MemoryAudioInputStream -> LinearMemoryStream and use some template voodoo to make the baseclass of Input8bitSignedStream etc. variable; added (commented out) draf of WrappedMemoryStream
svn-id: r9209
2003-07-28 01:13:31 +00:00
Jamieson Christian
be898b414f For for Bug [775654] DOTT: Hanging notes
Corrected active notes tracking when switching
between Type 2 SMF tracks. Although Note Off
events from the previous track are properly
simulated, those sustaining notes are cleared
from the active notes list so that jumps
within the new track will not attempt to
sustain them again.

svn-id: r9194
2003-07-26 19:37:54 +00:00
Max Horn
226ee61f71 oops accidentally broke the 'old' 8bit resampling code :-(
svn-id: r9192
2003-07-26 01:44:37 +00:00
Max Horn
c520d2d423 move AudioInputStream implementations & makeInputStream into separate .cpp file
svn-id: r9190
2003-07-25 13:42:05 +00:00
Max Horn
2ae3e45aea reduced source code duplication
svn-id: r9189
2003-07-25 13:34:25 +00:00
Max Horn
791efd853a lots of mixer changes: replaced _volumeTable by _globalVolume (applying volume after resampling is more accurate); made more member vars of SoundMixer protected (and thus added some new getter methods); added (untested) support for a second (stereo) channel when playing MP3
svn-id: r9184
2003-07-25 01:19:14 +00:00
Max Horn
95bb74e2b8 round to nearest
svn-id: r9183
2003-07-25 01:05:08 +00:00
Max Horn
f086ab5a05 whitespace
svn-id: r9181
2003-07-24 21:26:46 +00:00
Max Horn
09263a1feb added volume support; some cleanup; provided exactly as many samples as were requested in the 'resample' algorithm (if possible)
svn-id: r9180
2003-07-24 21:26:00 +00:00
Max Horn
1622ac31da added RateConverter classes as thin wrappers around st_* functions; renamed InputStream -> AudioInputStream and cleaned up the hierarchy of its subclasses; added makeInputStream() auxillary function
svn-id: r9179
2003-07-24 18:20:12 +00:00
Max Horn
b9d380bba4 new files, based on SoX (http://sox.sf.net): better resampling code. Note that my mixer.cpp changes are on purpose not yet in CVS since they are not complete. Only reasons I checkin these files is that it's much more comfortable to have CVS, since I need to rewrite parts of resample.cpp now (I already have lots of modifications in). Also expect more OO in the future
svn-id: r9176
2003-07-24 17:46:38 +00:00
Torbjörn Andersson
a327f805ac Fixed regression in clamped_add_16() that kept it from clamping. This was
quite noticeable in the BASS floppy intro.

Of course, if it turns out that 'int' is also only 16 bits it still won't
work, but in that case we run into problems even before this function is
called.

svn-id: r9145
2003-07-23 13:16:58 +00:00
Max Horn
0c47e125af simplified code
svn-id: r9061
2003-07-17 20:44:36 +00:00
Max Horn
d31942c898 oops
svn-id: r9023
2003-07-14 20:45:33 +00:00
Max Horn
33e6989944 removed whitespaces at line ends; added stopHandle
svn-id: r9022
2003-07-14 20:09:14 +00:00
Chris Apers
8b27f60434 Fixed RTTI warnings with PalmOS port
svn-id: r8951
2003-07-12 17:43:39 +00:00
Max Horn
1e0b7aaa16 verify chan != 0 even on WinCE
svn-id: r8940
2003-07-12 11:33:13 +00:00
Nicolas Bacca
72c8e0d96b Give sample rate to channel classes (WinCE downsampling) / Do not use dynamic cast with EVC 3 / Fix Tremor Ogg support
svn-id: r8937
2003-07-12 10:12:41 +00:00
Jamieson Christian
8b8b964aad Reverted to "old" YM3812 (FMOPL) emulator code.
Until specific information regarding the benefits
of migrating to the new emulator can be made
available, the "old" code will remain in effect
for the benefit of slower hardware platforms such
as some WinCE-based devices.

svn-id: r8903
2003-07-11 07:14:21 +00:00
Jamieson Christian
4ac4d76718 Fix for Bug [766426]: V5 Games: Adlib SFX not looped
Modified Smart Jump logic to deal with active notes
whose Note On and Note Off events BOTH occur OUTSIDE
the range of the jump. While this is not a thorough
way to deal with Note On events that occur outside
jump points, it at least deals with the issue of
long, unchanging Adlib SFX used by some earlier
SCUMM games.

svn-id: r8892
2003-07-10 04:34:44 +00:00
Max Horn
d25041859d #include scummsys.h so that our custome free() gets used
svn-id: r8849
2003-07-07 23:11:09 +00:00
Max Horn
7e4fa4a1da mix() is really a private method, only to be called by the audio thread; cover setupPremix by the mutex, too (that helps preventing race conditions upon exit)
svn-id: r8809
2003-07-06 17:00:09 +00:00
Max Horn
b6c3d440b5 now that we mutex-protect everything properly, we can get rid of _toBeDestroyed; also, instead of keeping a global _handles array in the mixer, let each Channel manage its own handle
svn-id: r8808
2003-07-06 16:52:09 +00:00
Max Horn
77b9a4f61e the mutex must be locked by everything which might access _channels while the mixer thread is running, because the mixer thread may modify _channels
svn-id: r8805
2003-07-06 15:57:33 +00:00
Travis Howell
817d600d8e More fixes from Hibernatus
svn-id: r8792
2003-07-06 06:36:26 +00:00
Max Horn
5c17c0f7a7 cleanup to the mixer helper proc interface and to ChannelStream
svn-id: r8785
2003-07-06 01:43:40 +00:00
Max Horn
e993f1d231 protect calls to insertChannel with mutex, too (and switch to using StackLock)
svn-id: r8782
2003-07-05 16:01:55 +00:00
Max Horn
d098334fe6 updated code to use type MutexRef; added class StackLock (from sdl backend, now in util.*)
svn-id: r8777
2003-07-05 15:19:11 +00:00
Paweł Kołodziejski
1ed639aedb hack for proper compile for vc6, why I need this ?
svn-id: r8763
2003-07-05 05:31:04 +00:00
Robert Göffringmann
3aa048d710 make SoundMixer::playRaw only check sound IDs if you actually pass one
svn-id: r8746
2003-07-04 20:08:02 +00:00
James Brown
a4b61ddaba Prevent apparantly possible race condition. I don't get this stuff, and I don't see why the next call to insertChannel is immune to the same theoretical problem :)
svn-id: r8742
2003-07-04 14:49:51 +00:00
James Brown
093a31839b Insert preliminary Zak256 sound looping support. It's not perfect, as some Zak256 sounds only loop a part of the sample - which our mixer API doesn't yet support.
svn-id: r8741
2003-07-04 14:10:44 +00:00
Max Horn
c60e1aeb86 cleanup for -Wundef
svn-id: r8726
2003-07-03 22:05:22 +00:00
Max Horn
01f992db9b cleanup (code easier to read; slightly less rounding errors for the volume; and on BE systems, READ_BE_UINT16 is actually faster ;-)
svn-id: r8706
2003-07-02 10:50:04 +00:00
Paweł Kołodziejski
9385979376 fixed warning
svn-id: r8664
2003-06-27 05:02:01 +00:00
Max Horn
0efc3b2adb cleanup
svn-id: r8645
2003-06-24 23:36:05 +00:00
Paweł Kołodziejski
9d09b77f21 fixed warnings
svn-id: r8613
2003-06-22 14:30:32 +00:00
Max Horn
3883de39a9 d'oh
svn-id: r8611
2003-06-22 14:17:44 +00:00
Max Horn
c03fb13a0b fixed Vorbis CD track code
svn-id: r8610
2003-06-22 13:52:40 +00:00
Max Horn
b4ce216327 don't memset the output buffer to 0 if _eof_flag is set; rather, we should 'add 0' to every byte in the output buffer, i.e.: do nothing
svn-id: r8609
2003-06-22 13:50:46 +00:00
Max Horn
d2b61e9bef properly init member vars instead of using memset
svn-id: r8608
2003-06-22 13:48:47 +00:00
Max Horn
4ead10e4d5 Change names of the stream API in the mixer; added endStream method (stop() halts stream immediately; endStream() lets it first finish playing)
svn-id: r8603
2003-06-22 11:47:03 +00:00
Jonathan Gray
0a6b7ad6ac fix compile when vorbis is enabled, loomcd is now broken with vorbis after recent changes :/
svn-id: r8598
2003-06-22 03:54:43 +00:00
Max Horn
4ad5a183ce renamed SoundMixer::hasActiveChannel->hasActiveSFXChannel, and fixed the regression in it caused by removing _beginSlots (I hope); added isActiveChannel method used by scumm/sound.cpp (this allowed me to move the Channel class from mixer.h into mixer.cpp); replaced Channel::soundFinished method by isActive
svn-id: r8597
2003-06-22 01:55:53 +00:00
Max Horn
573a1e3e99 remove the realDestroy methods and instead use destructors; renamed insertAt to insertChannel and simplified/unified its usage; delete the mutex when exiting; cleanup
svn-id: r8596
2003-06-22 01:34:28 +00:00
Max Horn
bd4370c251 lots of mixer cleanup / refactoring / reengineering
svn-id: r8594
2003-06-21 23:29:34 +00:00
Max Horn
7c332d7fdb modified & cleaned up the playStream/append code a bit; but this API really could stand some refinement
svn-id: r8592
2003-06-21 21:17:08 +00:00
Max Horn
11b2961fdb cleanup
svn-id: r8584
2003-06-21 19:52:12 +00:00
Jonathan Gray
2ba86fd0e5 make gcc happy
svn-id: r8583
2003-06-21 15:55:08 +00:00
Jamieson Christian
f83a32464c Fix for bug [756555] ALL: With '-ewindows' notes don't stop at quit
and bug [755176] SIMON2: Hanging notes

More cleanup of the thread issues associated with iMuse and MidiParser
shutdown. Untested.

svn-id: r8546
2003-06-18 22:46:17 +00:00
Marcus Comstedt
2aed2d9284 Use stdafx.h instead of manually including system headers.
svn-id: r8541
2003-06-18 21:10:05 +00:00
Max Horn
fcc46ac891 more cleanup
svn-id: r8497
2003-06-15 01:56:47 +00:00
Max Horn
6f50feb359 fixed cast warnings
svn-id: r8435
2003-06-11 07:14:39 +00:00
Jamieson Christian
01ba60ccef Fixed post-mortem attempts to transmit MIDI data
svn-id: r8433
2003-06-11 06:43:24 +00:00
Jamieson Christian
d2c952b315 Fixed race condition in MPU401 shutdown
svn-id: r8432
2003-06-11 05:54:46 +00:00
Max Horn
f7e85af552 use clear_sound_proc to properly deinit the mixer (this fixes a crash-on-exit)
svn-id: r8410
2003-06-09 01:19:44 +00:00
Bertrand Augereau
17e6779b65 Made some conversions explicit to prevent VC.NET 2003 from complaining
svn-id: r8254
2003-06-01 21:52:53 +00:00
Jamieson Christian
42f6d10581 Fixed hanging notes on Smart Jump when Note Off event cannot be found.
(I'm not sure why the Note Off would not be found,
but at least we're properly dealing with such notes now.)

svn-id: r8250
2003-06-01 18:24:10 +00:00
Jamieson Christian
86138eda44 Documentation corrections
svn-id: r8224
2003-06-01 04:06:24 +00:00
Jamieson Christian
452735e320 Some last SysEx cleanup.
svn-id: r8223
2003-06-01 04:05:13 +00:00
Jamieson Christian
6aba98450b Some Doxygen documentation. Just to test.
svn-id: r8195
2003-05-31 22:04:21 +00:00
Max Horn
e08d4f072e more OSystem docs & cleanup
svn-id: r8118
2003-05-29 22:34:35 +00:00
Max Horn
417ec3a588 added TODO: get rid of create_thread
svn-id: r8115
2003-05-29 21:29:54 +00:00
Jamieson Christian
11e59488ef Fixed occassional music crashes when loading games.
Thanks to eriktorbjorn for finding this issue.

svn-id: r7959
2003-05-25 15:47:06 +00:00
Jamieson Christian
f8e9e55fba allNotesOff() now sends to all 16 channels, not just the first 15. Duh.
svn-id: r7899
2003-05-24 19:11:49 +00:00
Max Horn
0439e0fe58 fixed nasty deadlock I recently introduced
svn-id: r7867
2003-05-23 16:47:45 +00:00
Jamieson Christian
982883c637 Fixed problem with hanging notes on some synth modules.
Various little MidiParser fixes.

svn-id: r7863
2003-05-23 15:04:41 +00:00
Jamieson Christian
7bcdf0d568 Fixed tempo problems in Simon games
svn-id: r7853
2003-05-23 04:54:45 +00:00
Jamieson Christian
0be2b4673c Removed annoying warning
svn-id: r7851
2003-05-23 04:35:50 +00:00
Jamieson Christian
08b5337b20 Fixed gcc warning
svn-id: r7850
2003-05-23 04:30:50 +00:00
Jamieson Christian
c6568530bd Revamped iMuse and Player classes. Player now uses MidiParser to parse its data, which will allow it to parse other MIDI formats. To receive parsed data, Player now derives from MidiDriver to act as a "fake MIDI driver".
Miscellaneous upgrades and fixes to MidiParser, including the Smart Jump (which could not be tested before iMuse started making use of the MidiParser).

*** THIS IS A BIG UPGRADE! EXTENSIVE REGRESSION TESTING IS NEEDED! ***

This has been tested through the intros and a number of other scenes from MI2, FOA and S&M.

NOTE! This upgrade introduces savegame format version V19. Earlier version savegames will load, but the music will simply start over from the beginning. Only V19 and later games will properly restore the position of the music! Don't say you weren't warned....

svn-id: r7849
2003-05-23 04:19:47 +00:00
Max Horn
1383ccbdbe make sure that the mutex protects everything that affects the buffer
svn-id: r7835
2003-05-22 21:34:20 +00:00
Jamieson Christian
1918dc555f Added "smart-jump" capability to MidiParser.
svn-id: r7831
2003-05-22 15:34:30 +00:00
Max Horn
b4c94e4aee pedantic warning fix
svn-id: r7792
2003-05-21 17:33:32 +00:00
Jamieson Christian
622e3578b4 More Simon music fixes
svn-id: r7769
2003-05-21 06:14:14 +00:00
Jamieson Christian
4584cb9616 Corrections to SMF Type 1 compression to Type 0.
Fixes simon2win title music.

svn-id: r7755
2003-05-20 20:58:59 +00:00
Jamieson Christian
a768deb83f Simon music fixes
svn-id: r7744
2003-05-20 16:43:53 +00:00
Max Horn
d1391702ea init member vars to 0
svn-id: r7732
2003-05-20 14:55:47 +00:00
Jamieson Christian
46a0be5ae8 Fixed regression in XMIDI parsing.
svn-id: r7706
2003-05-20 03:27:45 +00:00
Jamieson Christian
996614936a Fixed anonymous structs warning.
svn-id: r7696
2003-05-19 19:24:22 +00:00
Jamieson Christian
3dc788da63 Moved common parsing logic into MidiParser base class.
Added auto-loop capability.

svn-id: r7692
2003-05-19 18:48:18 +00:00
Jamieson Christian
e8771e7684 Fixed problem updating callback
svn-id: r7691
2003-05-19 17:45:21 +00:00
Max Horn
3d14e5305e fix shadow warning; removed unused var
svn-id: r7677
2003-05-19 09:04:50 +00:00
Max Horn
682d88cf71 fix shadow warning
svn-id: r7675
2003-05-19 09:01:25 +00:00
Jamieson Christian
ff41896480 Fixed Simon 1 music regression.
SMF parser now supports malformed Simon pitch bend events.
Implemented SMF parser jump method.

svn-id: r7669
2003-05-19 05:00:13 +00:00
Jamieson Christian
40ce9cdcc3 MidiStreamer goes away, replaced by MidiParser
svn-id: r7663
2003-05-19 00:50:30 +00:00
Jamieson Christian
9cbc6904a0 Fixed gcc warnings, virtual destructor problem
svn-id: r7656
2003-05-19 00:12:16 +00:00
Jonathan Gray
1b410c50dd remove dup object
svn-id: r7655
2003-05-19 00:02:50 +00:00
Jamieson Christian
c81b58d38e Implemented new Simon MIDI module, switching from MidiStreamer to MidiParser. Restructuring enables XMIDI support and vc_72 implementation. Various cleanup on MidiParser's and MidiDriver's.
svn-id: r7654
2003-05-18 23:55:53 +00:00
Jamieson Christian
febf19cb3f SMF/GMF implementation of MidiParser
svn-id: r7650
2003-05-18 23:36:38 +00:00
Jamieson Christian
ad548faeb6 MIDI Meta event Tx for virtual MidiDriver's
svn-id: r7638
2003-05-18 14:50:10 +00:00
Jonathan Gray
d9dd0c5300 update
svn-id: r7637
2003-05-18 14:43:50 +00:00
Jamieson Christian
79be84af36 New plug-in MIDI parser modules, INCOMPLETE.
svn-id: r7636
2003-05-18 14:25:33 +00:00
Jonathan Gray
cf54a63639 HAVE_CONFIG_H
svn-id: r7632
2003-05-18 13:39:02 +00:00
Jamieson Christian
c88e0b5301 Fixed Adlib sound problem on old (small header) games. Thanks for eriktorbjorn for the material that led to the solution.
svn-id: r7610
2003-05-17 17:20:27 +00:00
Jamieson Christian
d157b48876 Removed mididrv.cpp, added seq.cpp
svn-id: r7608
2003-05-17 14:31:21 +00:00
Jamieson Christian
e880007175 Absorbed last tidbits of mididrv.cpp into other files
svn-id: r7606
2003-05-17 14:27:58 +00:00
Jamieson Christian
61c2430a98 Moved SEQ to its own file
svn-id: r7604
2003-05-17 14:24:19 +00:00
Jamieson Christian
9540497263 Added SysEx hooks
svn-id: r7579
2003-05-16 21:05:58 +00:00
Max Horn
325c9b321c new fmopl (from adplug, which has it from mame; we can use it under the LGPL should we ever have to)
svn-id: r7328
2003-05-04 21:17:42 +00:00
Max Horn
01d3067b7d PalmOS changes
svn-id: r7222
2003-04-30 12:51:07 +00:00
Paweł Kołodziejski
7edc0abd5b changed messages from warning to debug
svn-id: r6888
2003-03-30 16:54:03 +00:00
Max Horn
80e3c23482 cleanup; add stopID method to stop a currently playing sound via its ID
svn-id: r6835
2003-03-18 21:46:44 +00:00
Paweł Kołodziejski
aa3766018f updated copyrights headers
svn-id: r6726
2003-03-06 21:46:56 +00:00
Paweł Kołodziejski
a8c3057875 and more cleanup ....
svn-id: r6719
2003-03-06 18:30:44 +00:00
Max Horn
20589cd886 fixed warning
svn-id: r6604
2003-02-13 23:59:41 +00:00
Oliver Kiehl
d63d62c29a Bug 683544
svn-id: r6603
2003-02-13 18:25:32 +00:00
Max Horn
ee047a0fa8 fix warning
svn-id: r6579
2003-01-30 23:33:22 +00:00
Nicolas Bacca
2c755a1f31 Change AdLib emulation quality for slower devices - added PROP_GET_FMOPL_ENV_BITS and PROP_GET_FMOPL_EG_ENT
svn-id: r6573
2003-01-29 21:28:37 +00:00
Ruediger Hanke
9e0e918397 Fix midi driver thread for MorphOS
svn-id: r6123
2002-12-25 12:36:29 +00:00
Ruediger Hanke
580df4d2d0 Moved MorphOS midi driver to backends/midi
svn-id: r6120
2002-12-25 12:02:27 +00:00
Max Horn
2c01dc8536 even more -peantic fixes
svn-id: r6111
2002-12-25 00:48:13 +00:00
Max Horn
ce6913cf36 fix -pedantic warnings
svn-id: r6108
2002-12-25 00:36:04 +00:00
Jamieson Christian
e4b1a7e709 MidiStreamer no longer derives from MidiDriver.
Removed MidiStreamer methods that weren't actually needed.
That's one layer of indirection removed from Simon music.

svn-id: r6050
2002-12-21 21:32:45 +00:00
Jamieson Christian
b708c7dd64 Miscellaneous cleanup.
svn-id: r6021
2002-12-18 17:14:05 +00:00
Jamieson Christian
fe671615de Initial iMuse SysEx implementation.
svn-id: r6013
2002-12-18 07:48:35 +00:00
Jamieson Christian
71e7d1512f message.log
svn-id: r6012
2002-12-18 07:48:02 +00:00
Jamieson Christian
7078326809 Experimental SysEx implementation for the -eseq driver.
svn-id: r6011
2002-12-18 07:37:47 +00:00
Jamieson Christian
b327bd178b Initial framework for SysEx output support.
svn-id: r6010
2002-12-18 07:13:42 +00:00
Max Horn
bf62494fd5 ripped out obsolete midi streaming code from backends (this may break Alsa/SEQ/Windows/Morphos compile, I tried my best, but you'll have to clean up after me)
svn-id: r5905
2002-12-11 16:09:58 +00:00
Jamieson Christian
7d3a423df7 Separated Windows MIDI driver into its own file
svn-id: r5901
2002-12-11 02:08:32 +00:00
Oliver Kiehl
a112545d7e split alsa from mididrv
svn-id: r5890
2002-12-08 20:47:42 +00:00
Max Horn
0ac3214fd5 started to split out the midi drivers
svn-id: r5889
2002-12-08 20:19:01 +00:00
Max Horn
3a9ab20092 removed obsolete stuff
svn-id: r5888
2002-12-08 19:50:36 +00:00
Max Horn
bdd479f47d ignore more weird MIDI events, this time for Simon
svn-id: r5886
2002-12-08 19:36:20 +00:00
Max Horn
7e2391fce2 Patch #641607: Louder MP3 sound effects
svn-id: r5882
2002-12-08 14:18:41 +00:00
Max Horn
b7c5a77717 Ignore weird MIDI messages for now; maybe Jamieson knows more?
svn-id: r5880
2002-12-08 14:09:35 +00:00
Jamieson Christian
cc6c37e1ad Fixed Adlib instrument setup in old (GF_SMALL_HEADER) games.
Restored MT-32 emulation lost during restructuring.

svn-id: r5786
2002-12-01 15:51:29 +00:00
Jamieson Christian
56d16cf920 Fixed pitch bend AGAIN.
(Broke it in the new MidiChannel_MPU401.)

svn-id: r5757
2002-11-30 01:15:48 +00:00
Jamieson Christian
10beae6417 Fixed mingw compile warnings
svn-id: r5729
2002-11-27 15:16:06 +00:00
Oliver Kiehl
5215379191 fixed compile problems
svn-id: r5724
2002-11-26 20:14:12 +00:00
Jamieson Christian
973164a741 Restructured MIDI channel allocation architecture.
Adlib no longer suffers from 16-channel MIDI restrictions.
Fixes a regression in the MI2 intro music under Adlib.

svn-id: r5721
2002-11-26 16:54:58 +00:00
Jamieson Christian
85ff022aa4 Added midistreamer.cpp
svn-id: r5685
2002-11-21 19:49:03 +00:00
Jamieson Christian
e68d425cdc Broke MidiStreamer into .h and .cpp components.
svn-id: r5682
2002-11-21 19:26:44 +00:00
Jamieson Christian
c9ed09e7df Revamped Adlib functionality.
IMuseAdlib is defunct.
New MidiDriver_ADLIB device.
Simon 1/2 now supports Adlib.

svn-id: r5677
2002-11-21 19:06:42 +00:00
Nicolas Bacca
cb160cfbf3 Adapt MAD sampling rate to the real sampling rate for WinCE
svn-id: r5657
2002-11-21 08:46:01 +00:00
Max Horn
69bceafc6e revamped build system somewhat: 'modules' like scumm, simon, gui etc. now all build into a lib, and all have a module.mk file that lists all their file. Advantage: further modularizes the build system, seperating all parts of ScummVM
svn-id: r5653
2002-11-21 04:08:37 +00:00
Jamieson Christian
618ab97f26 And one more fix to make it actually compile. :)
svn-id: r5626
2002-11-19 17:54:17 +00:00
Jamieson Christian
25637e6f39 Corrected a previous fix the broke pitch bending yet again....
svn-id: r5625
2002-11-19 17:49:35 +00:00
Max Horn
49d6b10fc3 Patch #639931: ALL: Fix for possible mixer distortion
svn-id: r5602
2002-11-19 01:50:15 +00:00
Jamieson Christian
5214cb3463 Added support for volume and pause control to Simon music.
Note that MidiStreamer is now used as a streaming wrapper
for ALL MidiDriver types, even those that natively support
streaming. This is because MidiStreamer supports a hybrid
of streamed and non-streamed MIDI, which is necessary to
support interactive events.

svn-id: r5596
2002-11-18 09:08:45 +00:00
Jonathan Gray
cec1a5a2cd patch 638246 Fix for ALSA and SEQ MIDI drivers with simon, by jamieson
svn-id: r5579
2002-11-16 01:16:53 +00:00
James Brown
ffa6e2c87f 637471: Hack to work-around 'bad sound in stream' problem.
svn-id: r5560
2002-11-15 10:47:36 +00:00
Max Horn
66a6a1cbd5 removed my non functional attempt at streaming in the CoreAudio driver, now that we a have a streaming wrapper
svn-id: r5524
2002-11-13 01:03:24 +00:00
Travis Howell
5f8cfd62e8 Add midi streaming support from Jamieson630
svn-id: r5522
2002-11-13 00:24:48 +00:00
Jonathan Gray
5d0c9aa33e another readme location updating
svn-id: r5520
2002-11-12 15:08:53 +00:00
Oliver Kiehl
a413779432 oops
svn-id: r5504
2002-11-10 17:01:51 +00:00
Oliver Kiehl
fb8f8c6105 added looping support to playRaw
svn-id: r5501
2002-11-10 16:23:02 +00:00
Jamieson Christian
c10287988e Increased GM channel resource to full spectrum (0-15, instead of 0-8 Base MIDI config); misc. pitchbend cleanups
svn-id: r5403
2002-11-04 18:29:26 +00:00
Max Horn
8ac61bee6d disabled reverb effect in QuickTime / CoreAudio drivers until we figure out why they bog down the system so much; added experimental streaming mode to CoreAudio driver, which is not tested at all due to bugs in the Simon code (which right now prevent me from playing any music in Simon type games)
svn-id: r5353
2002-10-30 23:18:52 +00:00
James Brown
63ee97b1ee Fix using MAD -without- Vorbis, and remove COMPRESSED_SOUND_FILE define.
Please keep in mind that if you put an 'else' statement in an if clause, keep in mind that if the code it's supposed to
'else' is in another define.... and that isn't set... the NEXT statement of code will be used as the 'if..else'
condition.

svn-id: r5344
2002-10-28 12:56:42 +00:00
Paweł Kołodziejski
bf3505da5c don't put samples into stream SoundMixer if sound card is disabled
svn-id: r5338
2002-10-27 19:32:36 +00:00
Travis Howell
a0734ef3f9 Add monster.sog support, patch #629362
Enable ogg support by default in mingw builds and link in ogg lib

svn-id: r5333
2002-10-27 11:41:08 +00:00
Jonathan Gray
d93e639086 patch #628997 support for ogg vorbis instead of cd tracks by Daniel Schepler. Uncomment the relevant lines in the makefile to use
svn-id: r5320
2002-10-27 01:12:10 +00:00
Max Horn
367b27b373 QuickTime midi driver will now not error out on pitch bend changes. Still, pitch bending is very wrong
svn-id: r5293
2002-10-24 01:35:31 +00:00
Paweł Kołodziejski
99ec620c58 changing warnings to debug level 2
svn-id: r5273
2002-10-23 06:48:10 +00:00
Max Horn
ab13e67b09 fix -Wshadow warnings
svn-id: r5270
2002-10-23 00:24:43 +00:00
Jamieson Christian
afc8f3710e Fixing the ALSA fix. ;)
svn-id: r5220
2002-10-21 16:55:26 +00:00
Jamieson Christian
532dec3c57 Pitch bend fix for ALSA driver
svn-id: r5219
2002-10-21 16:49:29 +00:00
Max Horn
d4558a5d3b oops forgot this file
svn-id: r5213
2002-10-21 12:47:06 +00:00
Max Horn
6f1da52a64 fixed compilation on MacOS
svn-id: r5212
2002-10-21 12:43:18 +00:00
Jamieson Christian
7677e42ffe Pitch bend fixes for QTMA
svn-id: r5208
2002-10-21 09:32:38 +00:00
Max Horn
6631df898c compilation fix
svn-id: r5158
2002-10-16 00:24:45 +00:00
Paweł Kołodziejski
09225027f1 changes to imuse
svn-id: r5157
2002-10-15 21:55:04 +00:00
Paweł Kołodziejski
15ac1c1ee9 fix
svn-id: r5156
2002-10-15 18:08:20 +00:00
James Brown
bc6d4f130b Sanity checking to fix crash caused by latest sound commits
svn-id: r5151
2002-10-15 14:17:59 +00:00
Paweł Kołodziejski
dc87eff416 changes to soundmixer - added timeout param to stream
svn-id: r5149
2002-10-15 07:01:34 +00:00
Jamieson Christian
40cf2ad639 Removed hard-coded pitch bend setup, now being handled on-the-fly in imuse.cpp
svn-id: r5146
2002-10-14 16:19:19 +00:00
Max Horn
cdb7b13789 revised options dialog
svn-id: r5130
2002-10-12 00:26:24 +00:00
Ruediger Hanke
8ea56e58a8 Close Etude midi driver on exit in the ugghliest way possible
svn-id: r5129
2002-10-11 13:08:02 +00:00
Jonathan Gray
1f41180f94 default port for alsa if env var isn't set
svn-id: r5119
2002-10-10 08:26:00 +00:00
Ruediger Hanke
2fd0a3d458 Renamed new AMidi to Etude
svn-id: r5079
2002-10-02 23:31:40 +00:00
Paweł Kołodziejski
98d90696ad added panning control in imuse and reverse stereo support
svn-id: r5076
2002-10-02 17:31:55 +00:00
James Brown
b7e83decd7 Fix 'isSoundRunning' for Creative samples (eg, Full Throttle)
svn-id: r5072
2002-10-02 10:12:19 +00:00
Paweł Kołodziejski
bff43de73a changes for stoping sounds
svn-id: r5062
2002-10-01 18:11:30 +00:00
Max Horn
31daec5e1c temporary pitch bend fix for the QuickTime midi driver. not quite perfect... hrm
svn-id: r5041
2002-09-29 18:27:48 +00:00
James Brown
dfdb1f7547 Merge in 615745: GMD via AdLib emulation
Remove MIDIEMU driver obsoleted by patch.
Change functionality to fallback to AdLib/AdLibGMD Emulation where MIDI init fails
Switch to NewGUI by default (old code retained 'Just in case')

svn-id: r5033
2002-09-29 11:11:42 +00:00
Max Horn
1bfaa3c02f removed even the last traces of Scumm dependencies from NewGUI. Yes, you heard right NewGUI is now 100% Scumm free and we can go for the launcher/message dialogs!
svn-id: r5016
2002-09-24 23:45:25 +00:00
James Brown
e4ce428bdd Patch 610257jamieson630/Windows MMSYSTEM error reclassification
svn-id: r4955
2002-09-17 04:41:46 +00:00
Paweł Kołodziejski
e6751d0d8f new smush player need bigger buffer
svn-id: r4942
2002-09-15 06:19:33 +00:00
Paweł Kołodziejski
2f91c18b22 speed changes to play smush movies
svn-id: r4941
2002-09-15 05:38:04 +00:00
Paweł Kołodziejski
fb91bdd21d fixed stream in mixer, not completed yet - bad wrap around.
svn-id: r4940
2002-09-14 12:12:25 +00:00
Max Horn
523d8e64c0 rewrote config class; cleanup; code restructuring
svn-id: r4903
2002-09-08 01:08:12 +00:00
Paweł Kołodziejski
687e82c0fa fixes
svn-id: r4897
2002-09-02 20:15:14 +00:00
Paweł Kołodziejski
ca03c9b5fc changed file io in sounds to class File
svn-id: r4896
2002-09-02 07:53:43 +00:00
Max Horn
41c2d6fba3 sound system cleanup
svn-id: r4867
2002-08-29 23:45:15 +00:00
Paweł Kołodziejski
0ad222a7ad better SFX suport in the Dig
svn-id: r4852
2002-08-25 15:06:53 +00:00
Paweł Kołodziejski
9f993a1d29 synced with scummvm
svn-id: r4821
2002-08-24 15:31:37 +00:00
Max Horn
08b161f113 fix for bug #598938: sfx/music volume set 0 is not mute; some cleanup
svn-id: r4805
2002-08-23 20:33:29 +00:00
Paweł Kołodziejski
0a520b237b fix for music loop, I think :)
svn-id: r4804
2002-08-23 20:27:42 +00:00
Ruediger Hanke
3b09051727 Changed MorphOS MIDI code so that data sent from different threads are no longer a problem. Ensure Midi driver is closed, otherwise no other MIDI application will run after ScummVM has exited.
svn-id: r4801
2002-08-22 12:09:06 +00:00
Max Horn
c0324a9e6d fixed one-off-error (I hope this fix is right?); use calloc instead of malloc to ensure struct is zeroed
svn-id: r4795
2002-08-21 17:13:17 +00:00
Max Horn
7aac293726 fixed the 'intelligent' GCC build rules; added .cvsignore files
svn-id: r4790
2002-08-21 16:28:19 +00:00
Max Horn
ce46866403 Initial revision
svn-id: r4785
2002-08-21 16:07:07 +00:00
James Brown
662256f25d Add missing iMUSE midi effect
svn-id: r4784
2002-08-21 11:24:33 +00:00
Paweł Kołodziejski
f3ceaf7f81 applied patch 597414, thanks Xavier
svn-id: r4778
2002-08-20 06:36:50 +00:00
Max Horn
8786311655 move _volume_table creation into constructor, and discard it in destructor
svn-id: r4764
2002-08-18 21:42:22 +00:00
Max Horn
edae5b06db MAJOR change to the way how Engine objects are instantiated
svn-id: r4758
2002-08-18 17:48:18 +00:00
Max Horn
89cf95ce34 pedantic #define rename :-)
svn-id: r4755
2002-08-18 16:10:38 +00:00
Ruediger Hanke
b6091fd7c5 Removing some system ifdef's that won't be required anymore soon
svn-id: r4726
2002-08-11 11:56:06 +00:00
Paweł Kołodziejski
99e11501f4 this remove clicks end of sounds in smush
svn-id: r4724
2002-08-10 13:59:40 +00:00
Ruediger Hanke
e6b0eb5057 Got rid of annoying blips and scratches on my system. It's just for MorphOS not to annoy Ender (see his comment in the source). Happens probably only here.
svn-id: r4723
2002-08-09 13:35:01 +00:00
Ruediger Hanke
0e2f835d1f Fixed Mixer full warnings, Dig music plays much better now on MorphOS
svn-id: r4722
2002-08-09 11:23:14 +00:00
Max Horn
30a2f9b23b fixed compile error
svn-id: r4702
2002-08-04 16:54:59 +00:00
Paweł Kołodziejski
9fa6145d90 DIG: preliminarily support for music in the game
svn-id: r4701
2002-08-04 16:30:59 +00:00
Max Horn
c56c8ea5e6 patch 587769 by Fridvin Logi (supposedly helps with Nexus in The Dig)
svn-id: r4678
2002-07-29 16:18:32 +00:00
Max Horn
a99fe80d4b fixed imuse volume bug introduced recently by me and painelf - iMuse internally does require the 0-127 change
svn-id: r4677
2002-07-29 16:12:15 +00:00
Max Horn
7117f5aec1 fixed volume table (that was a neat trick, that int8 cast, really got me; but I prefer readability over the 5 ns time saved <g>)
svn-id: r4675
2002-07-28 20:46:07 +00:00
Paweł Kołodziejski
0b3c263857 moved file bundle stuff into class Bundle
svn-id: r4671
2002-07-28 15:35:26 +00:00
Max Horn
6dd5de48f9 added constants for the default volumes; changed the volume ranges from 0-255 to 0-256
svn-id: r4670
2002-07-28 15:03:45 +00:00
Max Horn
7fb8139210 fixed some warnings, fixed clamped_add_16 to do the right thing now (wow, nobody noticed this.. :-)
svn-id: r4652
2002-07-27 13:16:32 +00:00
Max Horn
072ed82a37 when mixing data, clamp the addition - otherwise we might get overflows for high volumes
svn-id: r4647
2002-07-26 23:30:35 +00:00
Max Horn
84c8d4b689 added painelf's (still unfinished) sound dialog in NewGUI. Beware, this is work in progress, don't report problems with it just yet, we already know they are there :-)
svn-id: r4635
2002-07-26 00:41:07 +00:00
Max Horn
d6e1332f49 fixed Channel_MP3::mix to deal correctly with _silence_cut (this improves lip sync); put cubic interpolation code into a utility class, CubicInterpolator; now three mixers use this, converting the other ones should be simple
svn-id: r4623
2002-07-23 14:54:02 +00:00
Max Horn
07966f6ccc renamed SPECIAL_CHANNEL to PERCUSSION_CHANNEL; don't apply MT32->GM conversion on percussion channel; some indention fixes
svn-id: r4621
2002-07-23 10:29:11 +00:00