public uint Property(ImuseProperty prop, uint value)
{
lock (_mutex)
{
switch (prop)
{
case ImuseProperty.TempoBase:
// This is a specified as a percentage of normal
// music speed. The number must be an integer
// ranging from 50 to 200(for 50% to 200% normal speed).
if (value >= 50 && value <= 200)
TempoFactor = (int)value;
break;
case ImuseProperty.NativeMt32:
_native_mt32 = (value > 0);
Instrument.NativeMT32(_native_mt32);
if (_midi_native != null && _native_mt32)
InitMT32(_midi_native);
break;
case ImuseProperty.Gs:
_enable_gs = (value > 0);
// GS Mode emulates MT-32 on a GS device, so _native_mt32 should always be true
if (_midi_native != null && _enable_gs)
{
_native_mt32 = true;
InitGM(_midi_native);
}
break;
case ImuseProperty.LimitPlayers:
if (value > 0 && value <= _players.Length)
_player_limit = (int)value;
break;
case ImuseProperty.RecyclePlayers:
_recycle_players = (value != 0);
break;
case ImuseProperty.GameId:
_game_id = (GameId)value;
break;
case ImuseProperty.PcSpeaker:
PcSpeaker = (value != 0);
break;
}
return 0;
}
}