aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/midi.cpp
AgeCommit message (Collapse)Author
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-28JANITORIAL: Reduce header dependencies in shared codeOri Avtalion
Some backends may break as I only compiled SDL
2011-03-28AUDIO: Add Audio::MidiPlayer::createDriver(), let some engines use itMax Horn
2011-03-25AUDIO: Move more common code to Audio::MidiPlayerMax Horn
This also should fix some regressions from the previous commits, related to MidiParser's either being leaked, or being deleted and then used again (i.e., crashing). I tested as many games as I had available, but further testing of all affected engines is called for anyway.
2011-03-24M4: Change MidiPlayer to derive from Audio::MidiPlayerMax Horn
Also fix the _driver double delete regression I recently introduced
2011-03-23ENGINES: Remove unused MIDI pass-through codeMax Horn
2011-03-23ENGINES: Further simplify pseudo MidiDrivers; fix some regressionsMax Horn
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-23AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclassesMax Horn
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-22AUDIO: Add pure virtual MidiDriver::isOpen() methodMax Horn
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.
2010-11-19COMMON: Split common/stream.h into several headersMax Horn
svn-id: r54385
2010-06-12Applied fix for checking unallocated channels for All Notes Off MIDI commandPaul Gilbert
svn-id: r49613
2010-01-30Beginnings of a separation of the MADS and M4 engines into separate classes. ↵Paul Gilbert
This will be cleaner then having checks everywhere for whether the game mode is MADS or M4. svn-id: r47705
2010-01-25Strip trailing spaces/tabs.Johannes Schickel
svn-id: r47541
2010-01-03Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is nullTorbjörn Andersson
before freeing it, which isn't necessary. svn-id: r46941
2009-09-03Fix a new/free mismatch when creating a MemoryReadStream from a ↵Matthew Hoops
MemoryWriteStreamDynamic by changing MemoryWriteStreamDynamic to use malloc/free instead of new/delete[]. This could have affected ScummEngine_v4::prepareSavegame(). svn-id: r43918
2008-09-13Big patch changing the signature of various Stream methods (some ports may ↵Max Horn
need to be slightly tweaked to fix overloading errors/warnings) svn-id: r34514
2008-04-20Initial import of the work in progress M4 engineFilippos Karapetis
svn-id: r31600