Commit Graph

1547 Commits

Author SHA1 Message Date
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
Alejandro Marzini
b0409d6739 Merge trunk, from r51777 to r52105
svn-id: r52108
2010-08-16 00:21:07 +00:00
Florian Kagerer
75117d7875 FMTOWNS AUDIO: fix cda volume and balance control
svn-id: r52013
2010-08-11 22:50:13 +00:00
Eugene Sandulenko
ff8b296c29 Use tabs instead of spaces for indentation.
svn-id: r51997
2010-08-11 19:32:07 +00:00
Florian Kagerer
4a159bcb1e GUI: add music devices for c64, amiga and apple II gs
These devices are not able to create appropriate drivers.
The only purpose for now is having proper gui options and flags and music types for the device detector.
The corresponding GUIO flags for the new devices have been added, too.

svn-id: r51995
2010-08-11 18:54:56 +00:00
Florian Kagerer
054c586bcc KYRA/TOWNS: some minor sound improvements
(some cleanup to internal driver volume control, minor frequency change for fm-towns)

svn-id: r51930
2010-08-08 17:34:32 +00:00
Alejandro Marzini
33e40e1a20 Merged from trunk, from r51495 to r51775
svn-id: r51776
2010-08-06 03:21:21 +00:00
Florian Kagerer
e5ffc7847c AUDIO: Implement volume and balance control for the AudioCD manager (needed for music fading in Kyra 1 FM-Towns and probably other FM-Towns games). This addition applies to emulated CD audio only for now. I haven't found a way to implement this for real CDs yet. SDL doesn't seem to support this (but it might be just me? If anyone knows more about this, just tell me).
svn-id: r51741
2010-08-04 16:53:09 +00:00
Florian Kagerer
449927abcf FMTOWNS AUDIO: fix typo
svn-id: r51709
2010-08-03 19:06:27 +00:00
Florian Kagerer
3fc3a59139 KYRA/TOWNS: replace some music stops with fadeouts (based on original code)
svn-id: r51708
2010-08-03 18:19:25 +00:00
Florian Kagerer
5962b0bbe2 KYRA/TOWNS: implement music/sfx volume control via GUI/GMM
svn-id: r51695
2010-08-03 14:58:01 +00:00
Florian Kagerer
8e08c432da FMTOWNS AUDIO: minor layout change
svn-id: r51691
2010-08-03 13:12:42 +00:00
Max Horn
39846310d7 SOUND: Constify waveform table; slightly simplify code
svn-id: r51671
2010-08-03 00:02:46 +00:00
Florian Kagerer
20d6173ee0 TOWNS AUDIO: fix typo
svn-id: r51655
2010-08-02 20:17:05 +00:00