コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SourceVoicePool"/> class.
        /// </summary>
        /// <param name="soundEffectInstancePool">The associated sound effect instance pool.</param>
        /// <param name="waveFormat">The wave format of this pool.</param>
        /// <param name="isShared">A value indicating whether the initialized instance is shared or not.</param>
        public SourceVoicePool(SoundEffectInstancePool soundEffectInstancePool, WaveFormat waveFormat, bool isShared)
        {
            if (soundEffectInstancePool == null)
            {
                throw new ArgumentNullException("soundEffectInstancePool");
            }

            if (waveFormat == null)
            {
                throw new ArgumentNullException("waveFormat");
            }

            instancePool  = soundEffectInstancePool;
            format        = waveFormat;
            this.isShared = isShared;
        }
コード例 #2
0
ファイル: AudioManager.cs プロジェクト: loreggia/SharpDX
        /// <summary>
        /// Initializes a new instance of the <see cref="AudioManager" /> class.
        /// </summary>
        /// <param name="game">The game.</param>
        public AudioManager(Game game)
            : base(game)
        {
            Services.AddService(this);
            masterVolume = 1.0f;
            Speakers     = Speakers.None;
            masteringLimiterParameters = new MasteringLimiterParameters {
                Loudness = MasteringLimiter.DefaultLoudness, Release = MasteringLimiter.DefaultRelease
            };
            reverbParameters = (ReverbParameters)ReverbI3DL2Parameters.Presets.Default;

            InstancePool = new SoundEffectInstancePool(this);

            // register the audio manager as game system
            game.GameSystems.Add(this);
        }