/// <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.");
        }
Beispiel #2
0
 internal static unsafe void CallI1(void* UnsafeBasePtr, VoiceState* voiceState, void* p)
 {
     throw new NotImplementedException();
 }