internal protected bool IsMIDI(int sound)
{
var ptr = ScummEngine.Instance.ResourceManager.GetSound(ScummEngine.Instance.Sound.MusicType, sound);
if (ptr == null)
return false;
var tag = System.Text.Encoding.UTF8.GetString(ptr, 0, 4);
switch (tag)
{
case "ADL ":
case "ASFX": // Special AD class for old AdLib sound effects
case "SPK ":
return false;
case "AMI ":
case "ROL ":
return true;
case "MAC ": // Occurs in the Mac version of FOA and MI2
return true;
case "GMD ":
case "MIDI": // Occurs in Sam & Max
return true;
}
// Old style 'RO' has equivalent properties to 'ROL'
if (System.Text.Encoding.UTF8.GetString(ptr, 0, 2) == "RO")
return true;
// Euphony tracks show as 'SO' and have equivalent properties to 'ADL'
// FIXME: Right now we're pretending it's GM.
if (System.Text.Encoding.UTF8.GetString(ptr, 4, 2) == "SO")
return true;
// Console.Error.WriteLine("Unknown music type: '{0}'", tag);
return false;
}