Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SoundBank"/> class from a soundbank stream.
 /// </summary>
 /// <param name="audioEngine">The engine.</param>
 /// <param name="stream">The soundbank stream stream.</param>
 /// <unmanaged>HRESULT IXACT3Engine::CreateSoundBank([In] const void* pvBuffer,[In] unsigned int dwSize,[In] unsigned int dwFlags,[In] unsigned int dwAllocAttributes,[Out, Fast] IXACT3SoundBank** ppSoundBank)</unmanaged>
 public SoundBank(AudioEngine audioEngine, Stream stream)
 {
     this.audioEngine = audioEngine;
     isAudioEngineReadonly = true;
     soundBankSourceStream = stream as DataStream ?? DataStream.Create(Utilities.ReadStream(stream), true, true);
     audioEngine.CreateSoundBank(soundBankSourceStream.DataPointer, (int)soundBankSourceStream.Length, 0, 0, this);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SoundBank"/> class from a soundbank stream.
 /// </summary>
 /// <param name="audioEngine">The engine.</param>
 /// <param name="stream">The soundbank stream stream.</param>
 /// <unmanaged>HRESULT IXACT3Engine::CreateSoundBank([In] const void* pvBuffer,[In] unsigned int dwSize,[In] unsigned int dwFlags,[In] unsigned int dwAllocAttributes,[Out, Fast] IXACT3SoundBank** ppSoundBank)</unmanaged>
 public SoundBank(AudioEngine audioEngine, Stream stream)
 {
     this.audioEngine = audioEngine;
     isAudioEngineReadonly = true;
     soundBankSourceStream = stream as DataStream ?? DataStream.Create(Utilities.ReadStream(stream), true, true);
     audioEngine.CreateSoundBank(soundBankSourceStream.PositionPointer, (int)(soundBankSourceStream.Length - soundBankSourceStream.Position), 0, 0, this);
     callback = OnNotificationDelegate;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SoundBank"/> class from a soundbank stream.
 /// </summary>
 /// <param name="audioEngine">The engine.</param>
 /// <param name="stream">The soundbank stream stream.</param>
 /// <unmanaged>HRESULT IXACT3Engine::CreateSoundBank([In] const void* pvBuffer,[In] unsigned int dwSize,[In] unsigned int dwFlags,[In] unsigned int dwAllocAttributes,[Out, Fast] IXACT3SoundBank** ppSoundBank)</unmanaged>
 public SoundBank(AudioEngine audioEngine, Stream stream)
 {
     this.audioEngine      = audioEngine;
     isAudioEngineReadonly = true;
     soundBankSourceStream = stream as DataStream ?? DataStream.Create(Utilities.ReadStream(stream), true, true);
     audioEngine.CreateSoundBank(soundBankSourceStream.PositionPointer, (int)(soundBankSourceStream.Length - soundBankSourceStream.Position), 0, 0, this);
     callback = OnNotificationDelegate;
 }