コード例 #1
0
 public static T CreateAudioReverb <T>() where T : ComObject
 {
     unsafe
     {
         IntPtr reverbPtr = default;
         XAudio2Native.CreateAudioReverb(0u, &reverbPtr).CheckError();
         return(MarshallingHelpers.FromPointer <T>(reverbPtr));
     }
 }
コード例 #2
0
    public static Result CreateAudioReverb <T>(out T?reverb) where T : ComObject
    {
        unsafe
        {
            IntPtr reverbPtr = default;
            Result result    = XAudio2Native.CreateAudioReverb(0u, &reverbPtr);
            if (result.Failure)
            {
                reverb = default;
                return(result);
            }

            reverb = MarshallingHelpers.FromPointer <T>(reverbPtr);
            return(result);
        }
    }
コード例 #3
0
 public static Result CreateAudioReverb(out ComObject reverb) => XAudio2Native.CreateAudioReverb(out reverb);