Commit Graph

1560 Commits

Author SHA1 Message Date
Filippos Karapetis
9b8c04045b MIDI: Fix for bug #3170988 - "MONKEY2: Messed up MT-32 music"
This is a regression from r55256. Apparently, SCUMM has issues when sending a sustain
off on a notes off event. Thus, this has been turned into a feature, which is disabled
by default. Since MADE, SAGA and tinsel all share the same music code and play regular
MIDI files, and this feature fixes hanging notes for them, it has been enabled for them.
Also, applied a patch for a bug regarding the notes off event in MADE and tinsel,
which has been applied in SAGA already

svn-id: r55746
2011-02-02 23:27:59 +00:00
Matthew Hoops
e55ac4f419 SOUND: Update which engines use what decoder
svn-id: r55381
2011-01-21 14:37:46 +00:00
Filippos Karapetis
9339428fc1 MIDI parser: Stop hanging notes when a notes off event is called
This is the same fix as the one in r54429 for the MIDI parser of the SCI engine, based
on patch #3116608. Probably fixes (or is indirectly related to) bugs #2825928 (for
MADE), #2948281 (for SAGA), #2797283 (for tinsel), #2016549 (for SCUMM) and #2138118
(for kyra), as these engines are all using the MidiParser class internally.

svn-id: r55256
2011-01-16 11:02:49 +00:00
Johannes Schickel
645ba4c379 SOUND: Get rid of unused forward declarations in mixer.h.
svn-id: r55197
2011-01-10 22:20:51 +00:00
Marcus Comstedt
2001719241 MT32: Fixed compilation warnings
The conversion specification "%f" converts a double, not a float,
so floats need to be converted to doubles before passing them to
vprintf().

svn-id: r55175
2011-01-08 21:11:31 +00:00
Torbjörn Andersson
9f9035c3df FMOPL: Fix GCC warnings when DBOPL_WAVE is not WAVE_TABLEMUL.
svn-id: r55069
2010-12-30 22:43:20 +00:00
Florian Kagerer
41acf18a53 FMTOWNS AUDIO: formatting
svn-id: r54950
2010-12-18 12:17:33 +00:00
David Turner
3a5c8e6cfa SOUND: Fix Un-initialised Memory Reads in MT-32 Emulator, reported by Valgrind.
svn-id: r54909
2010-12-14 22:25:10 +00:00
Johannes Schickel
d451084fb4 MT32: Get rid of ANSIFile.
svn-id: r54827
2010-12-08 01:35:12 +00:00
Filippos Karapetis
0d4ef4854a MidiParser: updated comment concerning note on events in jumpToTick()
svn-id: r54508
2010-11-27 17:23:24 +00:00
Filippos Karapetis
1ebae78ff1 SCI/SOUND: Applied patch #3117577 - "SCI: MT-32 plays "warble" of notes when music resumes", with some slight modifications
This is only used by SCI for now, but it is probably correct to apply this for
all engines, thus an appropriate TODO has been added

svn-id: r54460
2010-11-24 15:12:43 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00
Matthew Hoops
876e38ca92 SOUND: Add DK3 IMA ADPCM decoder for duck videos
svn-id: r54204
2010-11-11 17:04:07 +00:00
Max Horn
059944e59c COMMON: Push #include audiocd.h in system.h out to .cpp files
svn-id: r54148
2010-11-08 23:07:42 +00:00
Max Horn
82e473bc3b BACKENDS: Partial merge of gsoc2010-opengl: Audio CD changes only
This commit contains the AudioCDManager changes from the gsoc2010-opengl
branch. The other changes in that branch are restricted to the backends
directory only (plus configure).

The Nintendo DS and Dreamcast ports still need to be ported over to
the new Audio CD system, but that should be fairly easy to do.

svn-id: r54147
2010-11-08 22:53:36 +00:00
Johannes Schickel
49b3635181 AUDIO: Remove obsolete comment.
svn-id: r54098
2010-11-05 15:38:31 +00:00
Max Horn
ebb7ed2b8a SOUND: Convert some (f)printf + fflush to debug
svn-id: r54022
2010-11-01 20:41:03 +00:00
Max Horn
44393b2dc8 ALL: Add code to help stop people from accidentally using "bad" APIs
A new header file common/forbidden.h is included by scummsys.h and it
re-#defines numerous symbols like fopen(), fread(), system(), etc. with
garbage, in order to provoke compile errors in any code using them.

If a .cpp file really *must* use any of these (e.g. because it is a
backend file), then these redefinitions can be disabled by #defining
FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever
this is done, an explanatory comment should be added.

Note that this system cannot catch all "bad" usages (notably the Lua
code in the sword25 engine), as it can only work if scummsys.h is
included.

svn-id: r53961
2010-10-30 21:27:42 +00:00
Johannes Schickel
62c5f4f8e5 MT32: Remove useless cast.
svn-id: r53916
2010-10-29 00:40:57 +00:00
Florian Kagerer
0db700a3dc GUI/LAUNCHER: improved MIDI device selection (also #3088438)
This fixes an issue with the <default> setting in the GM and MT-32 device tabs that has caused some complaints and discussions on -devel. It might also be what bug #3088438 is about.

With a <default> setting ScummVM would just use the first available MIDI device (even if this is the not really well working MT-32 emulator). This <default> setting was also indeed set by default - making it even more annoying.

Now there is a new setting for both the GM and MT-32 device tabs ("Don't use GM/MT-32 music").
This will cause MIDI device detection to be skipped and the best of the other devices (Adlib etc.) to be used. This new setting is used as default. So users who haven't specified anything will get Adlib, PC Speaker etc. (if supported by the engine) even if the engine prefers Midi.

There is a new "Use first available device" setting which will have the same effect as the "<default>" setting we had before.

svn-id: r53771
2010-10-24 19:15:17 +00:00
Max Horn
b446a7dcc2 ALL: code formatting fixes
svn-id: r53764
2010-10-24 13:09:56 +00:00
Max Horn
c975ed11a1 ALL: Fix various typos (patch #3093266)
svn-id: r53762
2010-10-24 13:04:33 +00:00
Florian Kagerer
5ff68b49d7 FM-TOWNS AUDIO: improve thread safety
svn-id: r53589
2010-10-18 21:16:58 +00:00
Eugene Sandulenko
c92d2bc234 SOUND: Add support for LastExpress version of IMA ADPCM sound.
Patch by littleboy.

svn-id: r53578
2010-10-18 19:10:57 +00:00
Johannes Schickel
75e8452b6e OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.

Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.

svn-id: r53399
2010-10-13 03:57:44 +00:00
Torbjörn Andersson
54b2a8c98d JANITORIAL: Cleanup (mostly whitespace)
svn-id: r53161
2010-10-12 04:19:58 +00:00
Jordi Vilalta Prat
8388e0dfea JANITORAL: Clean trailing whitespaces.
svn-id: r53160
2010-10-12 02:18:11 +00:00
Florian Kagerer
67c68afa6d FM-TOWNS AUDIO: improve thread safety
svn-id: r53126
2010-10-10 16:44:09 +00:00
Torbjörn Andersson
582bd9a395 MIDIDRV: Prefer PCjr over PC Speaker
If I understand this correctly, if the player's desired music driver
isn't supported (e.g. if you have MIDI as default, and haven't said
anything specifically for Maniac Mansion), it tries to pick the
"best" supported music driver instead. In this case, check if PCjr is
supported before picking PC Speaker.

svn-id: r53105
2010-10-10 07:43:12 +00:00
Florian Kagerer
b58bbd719c SCUMM/FM-TOWNS: fixed threading issue in sfx code
svn-id: r53074
2010-10-08 16:31:08 +00:00
Florian Kagerer
01c9b17068 SCUMM/FM-TOWNS: improved sfx support for indy4 and monkey2
svn-id: r53052
2010-10-07 19:23:49 +00:00
Florian Kagerer
0e0ab8b402 PC98 AUDIO: cleanup as suggested by sev (see devel)
svn-id: r53031
2010-10-05 16:22:55 +00:00
Florian Kagerer
1161714d72 FM-TOWNS AUDIO: minor fix
svn-id: r53017
2010-10-04 17:30:23 +00:00
Florian Kagerer
718fe1d18f PC-98 AUDIO: some code size reduction for the NDS port
svn-id: r52994
2010-10-03 16:28:31 +00:00
Florian Kagerer
b11263be90 KYRA PC-98: fix endianess in music frequency
svn-id: r52855
2010-09-22 19:39:54 +00:00
Torbjörn Andersson
c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Johannes Schickel
5abbe7204e CMS: Some constification.
svn-id: r52782
2010-09-17 20:03:41 +00:00
Johannes Schickel
a6a49b284a CMS: Change an incorrect error into debug output.
svn-id: r52780
2010-09-17 20:02:49 +00:00
Johannes Schickel
d477d66f49 SOUND: Properly add CMS as plugin.
svn-id: r52779
2010-09-17 20:02:29 +00:00
Johannes Schickel
cc764cb8ec SOUND: Move CMS emulator to sound/softsynth.
svn-id: r52778
2010-09-17 20:02:03 +00:00
Johannes Schickel
6588398ce6 MIDI: Send a reset MIDI device signal on startup.
This is currently done in the engine code. I adapted AGI, AGOS, DRACI,
GROOVIE, LURE, MADE, QUEEN, SAGA, SKY, TINSEL and TOUCHE to send a reset
device on startup. The sound output still works fine (started up a game
from every engine), so this should hopefully not introduce any regressions.

As far as I can tell it seems that SCUMM does send a proper device reset, so
I did not touch it. KYRA only sends a proper reset for MT-32 currently. I am
not sure about SCI though.

This fixes bug #3066826 "SIMON: MIDI notes off when using RTL after SCI".

svn-id: r52736
2010-09-15 22:00:20 +00:00
Johannes Schickel
15b57549ad COMMON: Some style fixes.
svn-id: r52609
2010-09-06 21:04:33 +00:00
Ori Avtalion
b876527014 SOUND: Remove semicolon
svn-id: r52522
2010-09-04 13:19:49 +00:00
Florian Kagerer
37d28b2fe5 FM-TOWNS AUDIO: minor fix in cd audio volume setting
svn-id: r52521
2010-09-04 11:40:24 +00:00
Yotam Barnoy
fd23ab2e17 FMTOWNS AUDIO: fixed divide by zero exception from commit 52013
Also removed 1 or 2 float operations.

svn-id: r52492
2010-09-02 10:41:26 +00:00
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
Johannes Schickel
5969138eda MP3: Fix seeking.
Formerly we did not read the first chunk of MP3 data after seeking. This
resulted in incorrect sound output in the Freddy Pharkas demo when the
sound was compressed with MP3 for example.

svn-id: r52272
2010-08-22 12:04:44 +00:00
Florian Kagerer
74b6fdcae4 FM-TOWNS AUDIO: fix possible crash
(This crash might have occured on very slow machines or when using valgrind)

svn-id: r52245
2010-08-20 22:10:15 +00:00
Florian Kagerer
b55a70acb8 KYRA/TOWNS: fix memory leak and some cleanup
svn-id: r52232
2010-08-20 17:04:32 +00:00
Florian Kagerer
29a5c6a45b SCUMM/FM-TOWNS: start rewriting audio code
- Start rewriting audio code for FM-TOWNS versions of Loom, Indy3 and Monkey Island 1 using the recently added code in towns_audio.cpp (Zak should work the same way, but I can't test, since I don't own that one).
- All sound types (pcm, euphony and cd audio) now support volume and balance control (e.g. try walking into/out of the kitchen and opening/closing the door in the Scumm Bar in Monkey Island 1 or walking into/out of the circus tent).
- Pcm sounds now support proper loop start/end and note offsets (e.g. try out the hammer sound in the forge in LOOM for example).
- some other minor improvements
- The FM-Towns versions of Indy 4 and Monkey Island 2 are not affected. I don't have Monkey Island 2, but I presume that it will work like Indy 4. Adding support for these will be a separate task, since they work quite differently.

svn-id: r52198
2010-08-18 21:38:43 +00:00