Пример #1
0
        public XAudio2AudioSource(XAudio2Engine engine)
        {
            _engine = engine;
            WaveFormat waveFormat = new WaveFormat(44000, 16, 1);

            _sourceVoice = new SourceVoice(_engine.XAudio2, waveFormat, VoiceFlags.None, maxFrequencyRatio: 2.0f);
            _audioBuffer = new SharpDX.XAudio2.AudioBuffer();
            _emitter     = new Emitter()
            {
                OrientFront         = new RawVector3(0, 0, 1),
                OrientTop           = new RawVector3(0, 1, 0),
                CurveDistanceScaler = 1
            };

            engine.ListenerChanged += OnListenerChanged;
        }
Пример #2
0
 public XAudio2ResourceFactory(XAudio2Engine engine)
 {
     Engine = engine;
 }