コード例 #1
0
        /// <summary>
        ///     Returns the voice's current cursor position data.
        /// </summary>
        /// <param name="flags">
        ///     <b>XAudio2.8 only:</b> Flags controlling which voice state data should be returned.
        ///     Valid values are <see cref="GetVoiceStateFlags.Default" /> or <see cref="GetVoiceStateFlags.NoSamplesPlayed" />.
        ///     The default value is <see cref="GetVoiceStateFlags.Default" />. If you specify
        ///     <see cref="GetVoiceStateFlags.NoSamplesPlayed" />, GetState
        ///     returns only the buffer state, not the sampler state.
        ///     GetState takes roughly one-third as much time to complete when you specify
        ///     <see cref="GetVoiceStateFlags.NoSamplesPlayed" />.
        /// </param>
        /// <returns><see cref="VoiceState" /> structure containing the state of the voice.</returns>
        /// <remarks>If the <see cref="XAudio2Voice.Version"/> is not <see cref="XAudio2Version.XAudio2_8"/> the <paramref name="flags"/> parameter will be ignored.</remarks>
        public unsafe VoiceState GetState(GetVoiceStateFlags flags)
        {
            if (Version == XAudio2Version.XAudio2_7)
            {
                VoiceState voiceState = default(VoiceState);
                InteropCalls.CallI1(UnsafeBasePtr, &voiceState, ((void **)(*(void **)UnsafeBasePtr))[25]);
                return(voiceState);
            }
            if (Version == XAudio2Version.XAudio2_8)
            {
                VoiceState voiceState = default(VoiceState);
                InteropCalls.CallI1(UnsafeBasePtr, &voiceState, flags, ((void **)(*(void **)UnsafeBasePtr))[25]);
                return(voiceState);
            }

            throw new Exception("Invalid XAudio2 Version.");
        }
コード例 #2
0
ファイル: InteropCalls.cs プロジェクト: HakanL/cscore
 internal static unsafe void CallI1(void *_basePtr, void *voiceState, GetVoiceStateFlags flags, void *p)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
        /// <summary>
        ///     Returns the voice's current cursor position data.
        /// </summary>
        /// <param name="flags">
        ///     <b>XAudio2.8 only:</b> Flags controlling which voice state data should be returned.
        ///     Valid values are <see cref="GetVoiceStateFlags.Default" /> or <see cref="GetVoiceStateFlags.NoSamplesPlayed" />.
        ///     The default value is <see cref="GetVoiceStateFlags.Default" />. If you specify
        ///     <see cref="GetVoiceStateFlags.NoSamplesPlayed" />, GetState
        ///     returns only the buffer state, not the sampler state.
        ///     GetState takes roughly one-third as much time to complete when you specify
        ///     <see cref="GetVoiceStateFlags.NoSamplesPlayed" />.
        /// </param>
        /// <returns><see cref="VoiceState" /> structure containing the state of the voice.</returns>
        /// <remarks>If the <see cref="XAudio2Voice.Version"/> is not <see cref="XAudio2Version.XAudio2_8"/> the <paramref name="flags"/> parameter will be ignored.</remarks>
        public unsafe VoiceState GetState(GetVoiceStateFlags flags)
        {
            if (Version == XAudio2Version.XAudio2_7)
            {
                VoiceState voiceState = default(VoiceState);
                InteropCalls.CallI1(UnsafeBasePtr, &voiceState, ((void**)(*(void**)UnsafeBasePtr))[25]);
                return voiceState;
            }
            if (Version == XAudio2Version.XAudio2_8)
            {
                VoiceState voiceState = default(VoiceState);
                InteropCalls.CallI1(UnsafeBasePtr, &voiceState, flags, ((void**)(*(void**)UnsafeBasePtr))[25]);
                return voiceState;
            }

            throw new Exception("Invalid XAudio2 Version.");
        }
コード例 #4
0
ファイル: InteropCalls.cs プロジェクト: hoangduit/cscore
 internal static unsafe void CallI1(void* _basePtr, void* voiceState, GetVoiceStateFlags flags, void* p)
 {
     throw new NotImplementedException();
 }