C# Class NScumm.Scumm.Audio.IMuse.IMuseInternal

SCUMM implementation of IMuse. This class implements the IMuse mixin interface for the SCUMM environment.
Inheritance: IIMuse
ファイルを表示 Open project: scemino/nscumm Class Usage Examples

Protected Properties

Property Type Description
_channel_volume ushort[]
_channel_volume_eff ushort[]
_cmd_queue NScumm.Scumm.Audio.IMuse.CommandQueue[]
_deferredCommands NScumm.Scumm.Audio.IMuse.DeferredCommand[]
_enable_gs bool
_game_id GameId
_global_instruments NScumm.Scumm.Audio.IMuse.Instrument[]
_initialized bool
_master_volume byte
_midi_adlib NScumm.Core.Audio.MidiDriver
_midi_native NScumm.Core.Audio.MidiDriver
_music_volume byte
_mutex object
_native_mt32 bool
_parts NScumm.Scumm.Audio.IMuse.Part[]
_paused bool
_player_limit int
_players Player[]
_queue_adding bool
_queue_cleared bool
_queue_end uint
_queue_marker byte
_recycle_players bool
_snm_triggers ImTrigger[]
_timer_info_adlib TimerCallbackInfo
_timer_info_native TimerCallbackInfo
_trigger_count ushort
_volchan_table ushort[]

Public Methods

Method Description
AddSysexHandler ( byte mfgID, SysExFunc handler ) : void
Create ( MidiDriver nativeMidiDriver, MidiDriver adlibMidiDriver ) : IMuseInternal
DoCommand ( int numargs, int args ) : int
GetMusicTimer ( ) : int
GetSoundActive ( int sound ) : bool
GetSoundStatus ( int sound ) : int
HandleMarker ( int id, int data ) : void
IMuseInternal ( ) : System
Pause ( bool paused ) : void
Property ( ImuseProperty prop, uint value ) : uint
SaveOrLoad ( Serializer ser ) : void
SetGlobalInstrument ( byte slot, byte data ) : void
SetMusicVolume ( int vol ) : void
StartSound ( int sound ) : void
StartSoundWithNoteOffset ( int sound, int offset ) : void
StopAllSounds ( ) : void
StopSound ( int sound ) : void

Protected Methods

Method Description
AddDeferredCommand ( int time, int a, int b, int c, int d, int e, int f ) : void
AllocatePart ( byte pri, MidiDriver midi ) : Part
AllocatePlayer ( byte priority ) : Player
ClearQueue ( ) : int
CopyGlobalInstrument ( byte slot, Instrument dest ) : void
DoCommandInternal ( int numargs, int a ) : int
DoCommandInternal ( int a, int b, int c, int d, int e, int f, int g, int h ) : int
EnqueueCommand ( int a, int b, int c, int d, int e, int f, int g ) : int
EnqueueTrigger ( int sound, int marker ) : int
FindActivePlayer ( int id ) : Player
FindStartOfSound ( int sound, ChunkType ct = ChunkType.MThd|ChunkType.FORM ) : byte[]
FixPartsAfterLoad ( ) : void
FixPlayersAfterLoad ( ScummEngine scumm ) : void
GetBestMidiDriver ( int sound ) : MidiDriver
GetChannelVolume ( uint a ) : int
GetQueueSoundStatus ( int sound ) : int
GetSoundStatusInternal ( int sound, bool ignoreFadeouts ) : int
GetVolchanEntry ( uint a ) : int
HandleDeferredCommands ( MidiDriver midi ) : void
ImClearTrigger ( int sound, int id ) : int
ImFireAllTriggers ( int sound ) : int
ImSetTrigger ( int sound, int id, int a, int b, int c, int d, int e, int f, int g, int h ) : int
InitGM ( MidiDriver midi ) : void
InitMT32 ( MidiDriver midi ) : void
InitMidiDriver ( TimerCallbackInfo info ) : void
InitParts ( ) : void
InitPlayers ( ) : void
InitQueue ( ) : void
Initialize ( MidiDriver nativeMidiDriver, MidiDriver adlibMidiDriver ) : int
IsMIDI ( int sound ) : bool
IsMT32 ( int sound ) : bool
MidiTimerCallback ( object data ) : void
OnTimer ( MidiDriver midi ) : void
QueryQueue ( int param ) : int
ReallocateMidiChannels ( MidiDriver midi ) : void
SequencerTimers ( MidiDriver midi ) : void
SetChannelVolume ( uint chan, uint vol ) : int
SetImuseMasterVolume ( uint vol ) : int
SetVolchan ( int a, int b ) : int
SetVolchanEntry ( int sound, uint volchan ) : int
StartSoundInternal ( int sound, int offset ) : bool
StopAllSoundsInternal ( ) : int
StopSoundInternal ( int sound ) : int
SupportsPercussion ( int sound ) : bool
UpdateVolumes ( ) : void

Private Methods

Method Description
IIMuse ( ) : int
IIMuse ( MidiDriver midi ) : void
IIMuse ( int id, int data ) : void

Method Details

AddDeferredCommand() protected method

protected AddDeferredCommand ( int time, int a, int b, int c, int d, int e, int f ) : void
time int
a int
b int
c int
d int
e int
f int
return void

AddSysexHandler() public method

public AddSysexHandler ( byte mfgID, SysExFunc handler ) : void
mfgID byte
handler SysExFunc
return void

AllocatePart() protected method

protected AllocatePart ( byte pri, MidiDriver midi ) : Part
pri byte
midi NScumm.Core.Audio.MidiDriver
return Part

AllocatePlayer() protected method

protected AllocatePlayer ( byte priority ) : Player
priority byte
return Player

ClearQueue() protected method

protected ClearQueue ( ) : int
return int

CopyGlobalInstrument() protected method

protected CopyGlobalInstrument ( byte slot, Instrument dest ) : void
slot byte
dest Instrument
return void

Create() public static method

public static Create ( MidiDriver nativeMidiDriver, MidiDriver adlibMidiDriver ) : IMuseInternal
nativeMidiDriver NScumm.Core.Audio.MidiDriver
adlibMidiDriver NScumm.Core.Audio.MidiDriver
return IMuseInternal

DoCommand() public method

public DoCommand ( int numargs, int args ) : int
numargs int
args int
return int

DoCommandInternal() protected method

protected DoCommandInternal ( int numargs, int a ) : int
numargs int
a int
return int

DoCommandInternal() protected method

protected DoCommandInternal ( int a, int b, int c, int d, int e, int f, int g, int h ) : int
a int
b int
c int
d int
e int
f int
g int
h int
return int

EnqueueCommand() protected method

protected EnqueueCommand ( int a, int b, int c, int d, int e, int f, int g ) : int
a int
b int
c int
d int
e int
f int
g int
return int

EnqueueTrigger() protected method

protected EnqueueTrigger ( int sound, int marker ) : int
sound int
marker int
return int

FindActivePlayer() protected method

protected FindActivePlayer ( int id ) : Player
id int
return Player

FindStartOfSound() protected method

protected FindStartOfSound ( int sound, ChunkType ct = ChunkType.MThd|ChunkType.FORM ) : byte[]
sound int
ct ChunkType
return byte[]

FixPartsAfterLoad() protected method

protected FixPartsAfterLoad ( ) : void
return void

FixPlayersAfterLoad() protected method

protected FixPlayersAfterLoad ( ScummEngine scumm ) : void
scumm ScummEngine
return void

GetBestMidiDriver() protected method

protected GetBestMidiDriver ( int sound ) : MidiDriver
sound int
return NScumm.Core.Audio.MidiDriver

GetChannelVolume() protected method

protected GetChannelVolume ( uint a ) : int
a uint
return int

GetMusicTimer() public method

public GetMusicTimer ( ) : int
return int

GetQueueSoundStatus() protected method

protected GetQueueSoundStatus ( int sound ) : int
sound int
return int

GetSoundActive() public method

public GetSoundActive ( int sound ) : bool
sound int
return bool

GetSoundStatus() public method

public GetSoundStatus ( int sound ) : int
sound int
return int

GetSoundStatusInternal() protected method

protected GetSoundStatusInternal ( int sound, bool ignoreFadeouts ) : int
sound int
ignoreFadeouts bool
return int

GetVolchanEntry() protected method

protected GetVolchanEntry ( uint a ) : int
a uint
return int

HandleDeferredCommands() protected method

protected HandleDeferredCommands ( MidiDriver midi ) : void
midi NScumm.Core.Audio.MidiDriver
return void

HandleMarker() public method

public HandleMarker ( int id, int data ) : void
id int
data int
return void

IMuseInternal() public method

public IMuseInternal ( ) : System
return System

ImClearTrigger() protected method

protected ImClearTrigger ( int sound, int id ) : int
sound int
id int
return int

ImFireAllTriggers() protected method

protected ImFireAllTriggers ( int sound ) : int
sound int
return int

ImSetTrigger() protected method

protected ImSetTrigger ( int sound, int id, int a, int b, int c, int d, int e, int f, int g, int h ) : int
sound int
id int
a int
b int
c int
d int
e int
f int
g int
h int
return int

InitGM() protected method

protected InitGM ( MidiDriver midi ) : void
midi NScumm.Core.Audio.MidiDriver
return void

InitMT32() protected method

protected InitMT32 ( MidiDriver midi ) : void
midi NScumm.Core.Audio.MidiDriver
return void

InitMidiDriver() protected method

protected InitMidiDriver ( TimerCallbackInfo info ) : void
info TimerCallbackInfo
return void

InitParts() protected method

protected InitParts ( ) : void
return void

InitPlayers() protected method

protected InitPlayers ( ) : void
return void

InitQueue() protected method

protected InitQueue ( ) : void
return void

Initialize() protected method

protected Initialize ( MidiDriver nativeMidiDriver, MidiDriver adlibMidiDriver ) : int
nativeMidiDriver NScumm.Core.Audio.MidiDriver
adlibMidiDriver NScumm.Core.Audio.MidiDriver
return int

IsMIDI() protected method

protected IsMIDI ( int sound ) : bool
sound int
return bool

IsMT32() protected method

protected IsMT32 ( int sound ) : bool
sound int
return bool

MidiTimerCallback() protected static method

protected static MidiTimerCallback ( object data ) : void
data object
return void

OnTimer() protected method

protected OnTimer ( MidiDriver midi ) : void
midi NScumm.Core.Audio.MidiDriver
return void

Pause() public method

public Pause ( bool paused ) : void
paused bool
return void

Property() public method

public Property ( ImuseProperty prop, uint value ) : uint
prop ImuseProperty
value uint
return uint

QueryQueue() protected method

protected QueryQueue ( int param ) : int
param int
return int

ReallocateMidiChannels() protected method

protected ReallocateMidiChannels ( MidiDriver midi ) : void
midi NScumm.Core.Audio.MidiDriver
return void

SaveOrLoad() public method

public SaveOrLoad ( Serializer ser ) : void
ser NScumm.Scumm.IO.Serializer
return void

SequencerTimers() protected method

protected SequencerTimers ( MidiDriver midi ) : void
midi NScumm.Core.Audio.MidiDriver
return void

SetChannelVolume() protected method

protected SetChannelVolume ( uint chan, uint vol ) : int
chan uint
vol uint
return int

SetGlobalInstrument() public method

public SetGlobalInstrument ( byte slot, byte data ) : void
slot byte
data byte
return void

SetImuseMasterVolume() protected method

protected SetImuseMasterVolume ( uint vol ) : int
vol uint
return int

SetMusicVolume() public method

public SetMusicVolume ( int vol ) : void
vol int
return void

SetVolchan() protected method

protected SetVolchan ( int a, int b ) : int
a int
b int
return int

SetVolchanEntry() protected method

protected SetVolchanEntry ( int sound, uint volchan ) : int
sound int
volchan uint
return int

StartSound() public method

public StartSound ( int sound ) : void
sound int
return void

StartSoundInternal() protected method

protected StartSoundInternal ( int sound, int offset ) : bool
sound int
offset int
return bool

StartSoundWithNoteOffset() public method

public StartSoundWithNoteOffset ( int sound, int offset ) : void
sound int
offset int
return void

StopAllSounds() public method

public StopAllSounds ( ) : void
return void

StopAllSoundsInternal() protected method

protected StopAllSoundsInternal ( ) : int
return int

StopSound() public method

public StopSound ( int sound ) : void
sound int
return void

StopSoundInternal() protected method

protected StopSoundInternal ( int sound ) : int
sound int
return int

SupportsPercussion() protected method

protected SupportsPercussion ( int sound ) : bool
sound int
return bool

UpdateVolumes() protected method

protected UpdateVolumes ( ) : void
return void

Property Details

_channel_volume protected_oe property

protected ushort[] _channel_volume
return ushort[]

_channel_volume_eff protected_oe property

protected ushort[] _channel_volume_eff
return ushort[]

_cmd_queue protected_oe property

protected CommandQueue[],NScumm.Scumm.Audio.IMuse _cmd_queue
return NScumm.Scumm.Audio.IMuse.CommandQueue[]

_deferredCommands protected_oe property

protected DeferredCommand[],NScumm.Scumm.Audio.IMuse _deferredCommands
return NScumm.Scumm.Audio.IMuse.DeferredCommand[]

_enable_gs protected_oe property

protected bool _enable_gs
return bool

_game_id protected_oe property

protected GameId _game_id
return GameId

_global_instruments protected_oe property

protected Instrument[],NScumm.Scumm.Audio.IMuse _global_instruments
return NScumm.Scumm.Audio.IMuse.Instrument[]

_initialized protected_oe property

protected bool _initialized
return bool

_master_volume protected_oe property

protected byte _master_volume
return byte

_midi_adlib protected_oe property

protected MidiDriver,NScumm.Core.Audio _midi_adlib
return NScumm.Core.Audio.MidiDriver

_midi_native protected_oe property

protected MidiDriver,NScumm.Core.Audio _midi_native
return NScumm.Core.Audio.MidiDriver

_music_volume protected_oe property

protected byte _music_volume
return byte

_mutex protected_oe property

protected object _mutex
return object

_native_mt32 protected_oe property

protected bool _native_mt32
return bool

_parts protected_oe property

protected Part[],NScumm.Scumm.Audio.IMuse _parts
return NScumm.Scumm.Audio.IMuse.Part[]

_paused protected_oe property

protected bool _paused
return bool

_player_limit protected_oe property

protected int _player_limit
return int

_players protected_oe property

protected Player[] _players
return Player[]

_queue_adding protected_oe property

protected bool _queue_adding
return bool

_queue_cleared protected_oe property

protected bool _queue_cleared
return bool

_queue_end protected_oe property

protected uint _queue_end
return uint

_queue_marker protected_oe property

protected byte _queue_marker
return byte

_recycle_players protected_oe property

protected bool _recycle_players
return bool

_snm_triggers protected_oe property

Sam & Max triggers
protected ImTrigger[] _snm_triggers
return ImTrigger[]

_timer_info_adlib protected_oe property

protected TimerCallbackInfo _timer_info_adlib
return TimerCallbackInfo

_timer_info_native protected_oe property

protected TimerCallbackInfo _timer_info_native
return TimerCallbackInfo

_trigger_count protected_oe property

protected ushort _trigger_count
return ushort

_volchan_table protected_oe property

protected ushort[] _volchan_table
return ushort[]