Commit Graph

40 Commits

Author SHA1 Message Date
Max Horn
e70fd59b35 ENGINES: Further simplify pseudo MidiDrivers; fix some regressions
The regression affected AGOS and maybe some others; specifically,
the real MidiDriver would have been deleted twice -- I previously
missed that the Engine instances takes care of freeing the real
MidiDriver, not the MidiPlayer wrapping it.

This commit should clarify the ownership of the real MidiDriver for
most pseudo MidiDrivers.
2011-03-23 16:49:41 +01:00
Max Horn
29847ea42d AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclasses
Many engines follow the advice in audio/midiparser.h and create a
"pseudo-MidiDriver" subclass. But MidiParser really only needs a tiny
subset of the MidiDriver capabilities, namely those found in
MidiDriver_BASE. So we try to subclass from that whenever possible; this
allows us to remove many stub methods, and enables further future
simplifications.
2011-03-23 15:25:47 +01:00
Max Horn
8982fff1b7 AUDIO: Add pure virtual MidiDriver::isOpen() method
This in turn enables modifying MidiDriver_MPU401::close() to allow
it to be called on a midi driver that has not yet been opened.

The specific issue that triggered me to make these changes was a
crash-upon-quit in HUGO, caused by it instantiating a midi driver,
then encountering an error (missing hugo.dat) *before* having
opened the new midi driver; the general cleanup code then tries
to close the (not yet opened) midi driver -> kaboom

Also fixed some engines which were leaking MidiDriver instances.
2011-03-22 23:51:47 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03: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
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
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
Alejandro Marzini
609e08d5db Merged from trunk, from Rev 49499 to HEAD
svn-id: r50840
2010-07-13 04:31:15 +00:00
Matthew Hoops
1a675dcd86 Add support for the 'fallback' MIDI in T7G's intro when the CD track cannot be found. The intro music in the Mac version now plays.
svn-id: r50564
2010-07-01 18:47:27 +00:00
Florian Kagerer
c35e350531 AUDIO: get rid of MDT_PREFER_MIDI since it should be sufficient to either select MDT_PREFER_MT32 or MDT_PREFER_GM
svn-id: r50288
2010-06-25 20:51:57 +00:00
Matthew Hoops
99807b8894 Fix uncompressed MIDI in T7G Mac.
svn-id: r50165
2010-06-22 19:39:30 +00:00
Jordi Vilalta Prat
33b991ee9d Groovie: Add support for the compressed MIDI files of T7G Mac.
svn-id: r50163
2010-06-22 19:21:05 +00:00
Max Horn
bbad3f333a Patch #1956501: "GUI/LAUNCHER: Midi device selection"
svn-id: r50128
2010-06-21 21:36:36 +00:00
Alejandro Marzini
e1ef3cd9fc Renamed getAudioCD to getAudioCDManager.
svn-id: r49678
2010-06-15 04:13:12 +00:00
Alejandro Marzini
e991cd8c53 - Revised abstract AudioCDManager.
- Removed AudioCDManager Singleton, and changed code for using AudioCDManager in OSystem.
- Added initialization code for new AudioCDManager in BaseBackend and OSystem_SDL.

svn-id: r49548
2010-06-09 20:09:57 +00:00
Jordi Vilalta Prat
0e95d8a5fa Groovie:
- Rewritten T7G's font code to subclass Graphics::Font and make it cleaner.
- Use theme fonts for the Mac version of T7G (which used ugly system fonts
  originally). With this the Mac version should be completable.
- Cleanup include interdependencies.

svn-id: r49487
2010-06-07 17:14:42 +00:00
Matthew Hoops
f76f64774a Add initial support for T7G Mac MIDIs. Compressed MIDI is not yet supported.
svn-id: r49119
2010-05-20 17:22:45 +00:00
Jordi Vilalta Prat
fd5000fb79 Groovie: Add support for MT-32 custom instruments
svn-id: r49117
2010-05-20 15:16:09 +00:00
Max Horn
b8f2a3a342 cleanup
svn-id: r47333
2010-01-16 21:34:36 +00:00
Johannes Schickel
0d995c5920 Rename all "Adlib" uses to "AdLib" to match the real name of the sound card / company.
Check this for reference:
http://en.wikipedia.org/wiki/Ad_Lib,_Inc.
http://www.crossfire-designs.de/images/articles/soundcards/adlib.jpg (note the upper left of the card)

This commit does not touch "adlib" and "ADLIB" uses!

Also it does not update all the SCUMM detection entries, which still use "Adlib".

svn-id: r47279
2010-01-12 21:07:56 +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
51933629d1 Changed foo(void) to foo() in almost all non-backend source files
svn-id: r45616
2009-11-02 21:54:57 +00:00
Johannes Schickel
1b68bf76ac Wording.
svn-id: r44086
2009-09-14 19:30:46 +00:00
Johannes Schickel
5ed03fcd3a Fix valgrind warning.
svn-id: r44084
2009-09-14 18:40:05 +00:00
Johannes Schickel
b33b90ecd0 Made AGOS, DRASCULA, GOB, GROOVIE, MADE, SCUMM and TINSEL properly stop CD audio playback on engine quit. (This only problem affected playback from CD, not from ripped audio files)
svn-id: r43512
2009-08-18 15:31:26 +00:00
Scott Thomas
8820b6166e T7G: Fix bug #2831041 by implementing opcode responsible for starting music partway through a video
svn-id: r43068
2009-08-05 13:57:40 +00:00
Jordi Vilalta Prat
6d3b2ec3af - Refactorized Groovie::MusicPlayer to make it extensible
- Added an empty MusicPlayerMac to let the Macintosh version of The 7th Guest start

svn-id: r42116
2009-07-05 09:34:54 +00:00
Scott Thomas
2f61d7d77b - Convert some file references from uint16 to uint32 to suit 11H
- Add some 11H opcodes

svn-id: r39313
2009-03-10 21:54:45 +00:00
Henry Bush
d7dea4ff17 T7G: Fix for #2511456. Volume is now only reset to 100 on playing a new track, and the background track starts on beginning of input loop (not at end of main track).
svn-id: r38284
2009-02-15 19:52:44 +00:00
Henry Bush
6438c40958 T7G: Fix for 2474078 (hopefully). Check if volume has fallen to correct level at end of applyfading, in case it gets set to correct level during it.
svn-id: r36173
2009-02-01 11:56:12 +00:00
Henry Bush
a0a82d911c T7G: start background music at start of input loop (0x0B). Should fix 2474078, but might break other things so I'm not going to backport it.
svn-id: r36125
2009-01-28 23:29:19 +00:00
Henry Bush
8eb7d55eca T7G: Reset midi volume to 100 on starting a track, cleanup
svn-id: r35792
2009-01-08 23:01:34 +00:00
Jordi Vilalta Prat
7122248c72 Use the proper samples file name for 11h
svn-id: r35656
2009-01-01 22:49:44 +00:00
Jordi Vilalta Prat
1162e9a035 T7G: Don't wait for the CD track to end
svn-id: r35493
2008-12-23 08:24:06 +00:00
Jordi Vilalta Prat
3f3b742cd6 T7G: Add support for custom AdLib instruments
svn-id: r35440
2008-12-19 16:55:54 +00:00
Jordi Vilalta Prat
834d2c5f27 T7G: Enhanced the Audio CD playback. Now the credits music on CD2 should play by ripping it as track 2 (not tested).
svn-id: r35167
2008-11-25 00:41:51 +00:00
Jordi Vilalta Prat
4360757236 T7G: Implemented volume fading
svn-id: r35166
2008-11-24 21:53:23 +00:00
Torbjörn Andersson
48e1316da9 Added a mutex to the Groovie MIDI player. Maybe that will fix the rare and
unpredictable crashes I've been seeing.

svn-id: r35116
2008-11-18 19:29:51 +00:00
Max Horn
bb87d39424 Patch #2271425: Groovie engine
svn-id: r35060
2008-11-14 21:32:20 +00:00