aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/imuse/imuse.cpp
AgeCommit message (Collapse)Author
2018-05-07SCUMM: Remove superfluous 'else' in IMuseInternal::ImSetTrigger()Adrian Frühwirth
Both means to calculate `diff` are essentially equal because wraparound of unsigned integers is well-defined and does what the 'else' branch is simulating manually. Because of this, gcc complains when compiling with -Wduplicated-branches.
2018-01-31SCUMM: Rename iMUSE save/load function to avoid confusing function hidingColin Snover
2018-01-31COMMON: Move VER macro for serializer into common codeColin Snover
2018-01-31SCUMM: Replace UB-triggering serialization code with Common::SerializerColin Snover
Fixes Trac#10342.
2017-07-30SCUMM: MI2 kill tune 113 on start of next, Fixes bug #1410 / Booty IslandBen Castricum
Fix the "MI2: Two soundtracks playing at once" bug from the bug tracker. It's triggered when the player enters the kiosk for the second time and leaves before tune 113 is started.
2017-07-30SCUMM: MI2 kill tune 107 on start of next, Fixes bug #1410 / Scabb IslandBen Castricum
Fix the "MI2: Two soundtracks playing at once" bug from the forum. It's triggered when the player is moving faster then the scripts expect causing the "stop tune 117" command be executed before the start of the tune. Effectily creating a hanging tune 107. This patch kills the tune when this sitation is detected.
2014-02-18SCUMM: Make GPL headers consistent in themselves.Johannes Schickel
2013-07-14JANITORIAL: Remove trailing whitespaceSven Hesse
2013-07-06SCUMM: Fix initGM() buffer overflow (CID 1032513)Torbjörn Andersson
We're clearly using 12 bytes, not 11.
2013-05-11SCUMM: Clean-up of Roland GS codetcarey
1. Remove _sc55 bool. All Roland GS-capable devices have MT-32 sound/drum maps, so they should always be used when _enable_gs is set. 2. Always enable _native_mt32 if Roland GS mode is selected. I don't know why I never did this originally, since _enable_gs is automatically disabled for SCUMM v6+ games that use General MIDI tracks instead of MT-32 music. 3. Set master tune for GS devices to 442.0kHz. This is the master tune setting for the MT-32.
2013-02-23ALL: Fix typo (existant->existent)Willem Jan Palenstijn
2012-11-16SCUMM: Add hack to preserve savegame compatibility with Mac MI1Torbjörn Andersson
For old savegames, we now use a "dummy" iMUSE objet to skip the old iMUSE save state. I had hoped to be able to do this without making any changes to the iMUSE code itself, but I was unable to. Also added note about how the save state for the new music will not quite work if the mixer output rate changes. Personally, I'm not too worried about that. It breaks, but it shouldn't break badly.
2012-09-20SCUMM: Implement support for Monkey Island 2 Mac music.Johannes Schickel
This is a initial RE of the audio output Monkey Island 2 Mac uses. Support for special sound effects is not in there yet.
2011-07-14SCUMM: Add debug output in case the code tries to set up a non-existant ↵Johannes Schickel
iMuse instrument.
2011-07-14SCUMM: Handle default instrument set up in iMuse like the original.Johannes Schickel
2011-07-11SCUMM: Adapt iMuse code formatting to our standards.Johannes Schickel
2011-07-10SCUMM: Minor clean up in iMuse instrument handling code.Johannes Schickel
2011-07-10SCUMM: Limit iMuse default instrument load to PC Speaker output.Johannes Schickel
Albeit the code is marked as a hack inside the source, the original behaved exaclty the same. If the code is removed the PC Speaker output will miss notes, since unlike the original we only output to parts, which have an instrument set up.
2011-07-08SCUMM: Initial PC Speaker output implementation for SCUMM v5.Johannes Schickel
This is *not* complete yet.
2011-06-20ALL: Remove trailing whitespacesMax Horn
This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-15SCUMM: fix possible portability issueathrxx
2011-05-29SCUMM: implement some missing (very low relevance) imuse codeathrxx
1) Don't skip transpose setting in sysex command 0. There are only a few sounds where this setting is used (mainly sfx). 2) Make MI2 and INDY4 read certain player start parameters from the sound resource. The start parameters usually match our default parameters (exception: e.g. LeChuck's Fortress). The use of these parameters has been dropped in DOTT (they use default parameters like we do).
2011-05-16SCUMM: fix regressionathrxx
2011-05-16SCUMM: formattingathrxx
2011-05-15SCUMM: fix imuse bugs #1315950 and #761637athrxx
- Revert guesswork fix for bug #761637 which caused bug #1315950 - Add missing clear_queue() call to stopAllSounds_internal(). This is taken from INDY4 / MONKEY2 disasm. Someone with a SAMXMAX or DOTT disasm might want to check whether this is correct for these targets, too. - Old FOA savegames saved after the Dr. Ubermann death scene (= during the ending sequence) will still be bugged, since the messed up imuse trigger/command queue gets restored from the savegame.
2011-05-13SCUMM: Turned ResTypeData into a Common::Array<Resource>, subsuming its ↵Max Horn
_resource member
2011-05-13SCUMM: Add a Resource class, refactor res code around itMax Horn
2011-05-13SCUMM: Get rid of the MemBlkHeader hackMax Horn
This uncovered at least one potentially serious bug in the inventory code, which still needs to be investigated and fixed.
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-12COMMON: Replace MKID_BE by MKTAGMax Horn
MKID_BE relied on unspecified behavior of the C++ compiler, and as such was always a bit unsafe. The new MKTAG macro is slightly less elegant, but does no longer depend on the behavior of the compiler. Inspired by FFmpeg, which has an almost identical macro.
2011-03-23SCUMM: Remove unused iMuse MIDI 'passthrough' codeMax Horn
2010-12-01SCUMM: Fix GM initialization when "enable_gs" is set.Johannes Schickel
This is a regression from r25630, which caused the code to send some garbage data to the GS device, which resulted in some devices to fail with an "Address Error." (like the Roland SC-55). This might also fix bug #1927501 "GS option is broken". Even though actually the device there failed with another error it is likely to be caused by the same code. At least it is the only iMuse MIDI code change between 0.9.0 and 0.12.0, which might result in such a problem. svn-id: r54727
2010-11-01COMMON: Rename String::printf() to String::format()Max Horn
This is a first step towards getting rid of all uses of regular printf, fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase. The name format() reflects the purpose of the function, and parallels String.format() in Java, boost::format, and others. svn-id: r54004
2010-01-12Rename all "Adlib" uses to "AdLib" to match the real name of the sound card ↵Johannes Schickel
/ 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
2009-11-26Add patch #2839048 - MM C64 sound/music player, with minor changes.Travis Howell
svn-id: r46143
2009-11-22Add patch #2876221 - FBEAR: Fix for MIDI piano notes (DOS version), with ↵Travis Howell
minor change. svn-id: r46081
2009-08-24Fixed iMuse regression: IMuseInternal::terminate() was never called, because ↵Andre Heider
the base class does not have that virtual function anymore. Code moved to the destructor. svn-id: r43714
2009-08-16Fix warning caused by -Wformat-security, also fixed a possible buffer ↵Johannes Schickel
overflow along with it. svn-id: r43445
2008-01-11Work around bug #1324106 again. Apparently, I was mistaken the other day when ITorbjörn Andersson
said the timer changes fixed it. This time, I've made the workaround a bit simpler to understand, though. svn-id: r30429
2008-01-11The SCUMM timer fix makes the workaround for bug #1324106 obsoleteMax Horn
svn-id: r30419
2007-09-19Merged common/stdafx.h into common/scummsys.h. All referencing files have ↵Nicola Mettifogo
been updated. svn-id: r28966
2007-05-30Updated legal headers in source files, based on what Pidgin (the IM client ↵Max Horn
formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots svn-id: r27024
2007-02-16Unified how we deal with (and how we generate) MIDI sysex messages -- in ↵Max Horn
particular, we now always do so w/o framing the message (documented this with a Doxygen comment in the MidiDriver class) svn-id: r25630
2006-11-16Applied my own patch #1594924 to work around bug #1324106 ("MI2 VGA: Music asTorbjörn Andersson
Rapp is instantiating isn't synchronized"). I don't know if our timing is off, or if it's just a case of overly optimistic scripting, but the pause / unpause music instructions are issued in the wrong order. svn-id: r24726
2006-11-12More whitespace.Torbjörn Andersson
svn-id: r24682
2006-11-12WhitespaceTorbjörn Andersson
svn-id: r24680
2006-04-04Since our debug() adds an exclamation mark at the message end, removeEugene Sandulenko
it in several calls to avoid duplication!!11! svn-id: r21607
2006-03-24Fix MSVC warnings #2Andrew Kurushin
svn-id: r21441
2006-03-12IMuse SysEx processing now handled by client-specified callbacks. This ↵Jamieson Christian
removes all game-specific references from the Player class. Bloodshed Dev-C++ project file updated. svn-id: r21241
2006-03-05Removed tag2str usage, which eliminates scumm/util.h dependency.Jamieson Christian
svn-id: r21107