コード例 #1
0
 public XSoundGroup(SharpDX.XAudio2.XAudio2 device, IEnumerable <string> fileNames, int groupId)
 {
     _device  = device;
     _groupId = groupId;
     _sounds  = new List <XSound>();
     foreach (var fileName in fileNames)
     {
         var snd = new XSound(device, fileName, groupId);
         _sounds.Add(snd);
     }
 }
コード例 #2
0
 /// <summary>
 /// <p>Creates a new <strong>XAudio2</strong> object and returns a reference to its <strong><see cref="SharpDX.XAudio2.XAudio2"/></strong> interface.</p>
 /// </summary>
 /// <param name="xAudio2Out">No documentation.</param>
 /// <param name="flags">No documentation.</param>
 /// <param name="xAudio2Processor">No documentation.</param>
 /// <returns><p>Returns <see cref="SharpDX.Result.Ok"/> if successful, an error code otherwise. See <strong>XAudio2 Error Codes</strong> for descriptions of XAudio2 specific error codes. </p></returns>
 /// <remarks>
 /// <p>The DirectX SDK versions of XAUDIO2 supported a flag <strong><see cref="SharpDX.XAudio2.XAudio2Flags.DebugEngine"/></strong> to select between the release and 'checked' version. This flag is not supported or defined in the Windows 8 version of XAUDIO2. </p><p><strong>Note</strong>??No versions of the DirectX SDK contain the xaudio2.lib import library. DirectX SDK versions use COM to create a new <strong>XAudio2</strong> object.</p>
 /// </remarks>
 /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='XAudio2Create']/*"/>
 /// <msdn-id>microsoft.directx_sdk.xaudio2.xaudio2create</msdn-id>
 /// <unmanaged>HRESULT XAudio2Create([Out, Fast] IXAudio2** ppXAudio2,[In] unsigned int Flags,[In] unsigned int XAudio2Processor)</unmanaged>
 /// <unmanaged-short>XAudio2Create</unmanaged-short>
 public static void XAudio2Create(SharpDX.XAudio2.XAudio2 xAudio2Out, int flags, int xAudio2Processor)
 {
     unsafe {
         IntPtr         xAudio2Out_ = IntPtr.Zero;
         SharpDX.Result __result__;
         __result__ =
             XAudio2Create_(&xAudio2Out_, flags, xAudio2Processor);
         ((SharpDX.XAudio2.XAudio2)xAudio2Out).NativePointer = xAudio2Out_;
         __result__.CheckError();
     }
 }
コード例 #3
0
ファイル: SoundDevice.cs プロジェクト: smack0007/Snowball_v1
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (this.InternalMasteringVoice != null)
                {
                    this.InternalMasteringVoice.Dispose();
                    this.InternalMasteringVoice = null;
                }

                if (this.InternalDevice != null)
                {
                    this.InternalDevice.Dispose();
                    this.InternalDevice = null;
                }
            }
        }
コード例 #4
0
ファイル: Echo.cs プロジェクト: zmtzawqlp/SharpDX
 /// <summary>
 /// Initializes a new instance of the <see cref="Echo"/> class.
 /// </summary>
 public Echo(SharpDX.XAudio2.XAudio2 device)
     : base(device)
 {
     XAPOFx.CreateFX(device, XAPOFx.CLSID_FXEcho, this);
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Reverb"/> class.
 /// </summary>
 public Reverb(SharpDX.XAudio2.XAudio2 device)
     : base(device)
 {
     XAPOFx.CreateFX(device, XAPOFx.CLSID_FXReverb, this);
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Equalizer"/> class.
 /// </summary>
 public Equalizer(SharpDX.XAudio2.XAudio2 device)
     : base(device)
 {
     XAPOFx.CreateFX(device, XAPOFx.CLSID_FXEQ, this);
 }
コード例 #7
0
 static AudioDevice()
 {
     mEngine = new SharpDX.XAudio2.XAudio2();
     mDevice = new SharpDX.XAudio2.MasteringVoice(mEngine);
 }
コード例 #8
0
ファイル: SoundDevice.cs プロジェクト: smack0007/Snowball_v1
 public void CreateDevice()
 {
     this.InternalDevice = new SharpDX.XAudio2.XAudio2();
     this.InternalMasteringVoice = new SharpDX.XAudio2.MasteringVoice(this.InternalDevice);
 }
コード例 #9
0
ファイル: MasteringLimiter.cs プロジェクト: zmtzawqlp/SharpDX
 /// <summary>
 /// Initializes a new instance of the <see cref="MasteringLimiter"/> class.
 /// </summary>
 public MasteringLimiter(SharpDX.XAudio2.XAudio2 device) : base(device)
 {
     XAPOFx.CreateFX(device, XAPOFx.CLSID_FXMasteringLimiter, this);
 }
コード例 #10
0
ファイル: AudioDevice.cs プロジェクト: Daramkun/Misty
 public AudioDevice()
 {
     audio = new SharpDX.XAudio2.XAudio2 ();
     audio.StartEngine ();
 }
コード例 #11
0
 public XSoundGroup(IList <XSound> sounds, int groupId)
 {
     _device  = sounds.First().Device;
     _groupId = groupId;
     _sounds  = sounds;
 }