public PlaySongCommand(Song song, Volume volume)
        {
            song.ThrowIfNull("song");

            _song = song;
            _volume = volume;
        }
        public PlaySoundEffectCommand(SoundEffect soundEffect, Volume volume)
        {
            soundEffect.ThrowIfNull("soundEffect");

            _soundEffect = soundEffect;
            _volume = volume;
        }
        public void PlaySoundEffect(Guid id, byte[] data, Volume volume)
        {
            data.ThrowIfNull("data");

            var adjustedParameters = new SoundParameters(volume * _volumeConfiguration.SoundEffects, _soundEffectsMuted);

            _soundEffectManager.Play(id, data, adjustedParameters);
        }
示例#4
0
 public static PlaySongCommand PlaySong(Song song, Volume volume)
 {
     return new PlaySongCommand(song, volume);
 }
示例#5
0
 public static PlaySoundEffectCommand PlaySoundEffect(SoundEffect soundEffect, Volume volume)
 {
     return new PlaySoundEffectCommand(soundEffect, volume);
 }
 public SoundParameters(Volume volume, bool muted)
 {
     _volume = volume;
     _muted = muted;
 }