public void PlaySoundSample( ushort number, SoundAction action, byte volume, byte repeats, SoundFinishedCallback callback ) { // nada }
void IZMachineIO.PlaySoundSample(ushort number, SoundAction action, byte volume, byte repeats, SoundFinishedCallback callback) { switch (action) { case SoundAction.Prepare: Glk.glk_sound_load_hint(number, true); break; case SoundAction.FinishWith: Glk.glk_sound_load_hint(number, false); break; case SoundAction.Start: if (soundChannel.IsNull) { soundChannel = Glk.glk_schannel_create(0); } if (!soundChannel.IsNull) { volume = Math.Min(volume, (byte)8); Glk.glk_schannel_set_volume(soundChannel, (uint)(volume << 13)); soundCallback = callback; Glk.glk_schannel_play_ext(soundChannel, number, repeats, 1); } break; case SoundAction.Stop: if (!soundChannel.IsNull) { Glk.glk_schannel_stop(soundChannel); soundChannel = schanid_t.Null; soundCallback = null; } break; } }
public override void PlaySoundSample(ushort number, SoundAction action, byte volume, byte repeats, SoundFinishedCallback callback) { // nada }
public virtual void PlaySoundSample(ushort number, SoundAction action, byte volume, byte repeats, SoundFinishedCallback callback) { next.PlaySoundSample(number, action, volume, repeats, callback); }
public override void PlaySoundSample(ushort number, SoundAction action, byte volume, byte repeats, SoundFinishedCallback callback) { if (PassSound) side.PlaySoundSample(number, action, volume, repeats, callback); base.PlaySoundSample(number, action, volume, repeats, callback); }
public void PlaySoundSample(ushort num, SoundAction action, byte volume, byte repeats, SoundFinishedCallback callback) { // not supported }
public override void PlaySoundSample(ushort number, SoundAction action, byte volume, byte repeats, SoundFinishedCallback callback) { if (PassSound) { side.PlaySoundSample(number, action, volume, repeats, callback); } base.PlaySoundSample(number, action, volume, repeats, callback); }
void IZMachineIO.PlaySoundSample(ushort number, SoundAction action, byte volume, byte repeats, SoundFinishedCallback callback) { switch (action) { case SoundAction.Prepare: Glk.glk_sound_load_hint(number, true); break; case SoundAction.FinishWith: Glk.glk_sound_load_hint(number, false); break; case SoundAction.Start: if (soundChannel.IsNull) soundChannel = Glk.glk_schannel_create(0); if (!soundChannel.IsNull) { volume = Math.Min(volume, (byte)8); Glk.glk_schannel_set_volume(soundChannel, (uint)(volume << 13)); soundCallback = callback; Glk.glk_schannel_play_ext(soundChannel, number, repeats, 1); } break; case SoundAction.Stop: if (!soundChannel.IsNull) { Glk.glk_schannel_stop(soundChannel); soundChannel = schanid_t.Null; soundCallback = null; } break; } }