Exemplo n.º 1
0
 public DSResult SetFxNative(int effectsCount, IntPtr effectDescriptions, IntPtr resultCodes)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, effectsCount, (void *)effectDescriptions, (void *)resultCodes,
                                        ((void **)(*(void **)UnsafeBasePtr))[21]));
 }
Exemplo n.º 2
0
 public DSResult AcquireResourcesNative(int flags, int effectsCount, IntPtr resultCodes)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, effectsCount, (void *)resultCodes,
                                        ((void **)(*(void **)UnsafeBasePtr))[22]));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Sets the relative volume of the left and right channels.
 /// </summary>
 /// <param name="pan">Relative volume between the left and right channels. Must be between <see cref="PanLeft"/> and <see cref="PanRight"/>.</param>
 /// <returns>DSResult</returns>
 /// <remarks>For more information, see <see href="https://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.idirectsoundbuffer8.idirectsoundbuffer8.setpan(v=vs.85).aspx"/>.</remarks>
 public DSResult SetPanNative(int pan)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, pan, ((void **)(*(void **)UnsafeBasePtr))[16]));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Sets the attenuation of the sound.
 /// </summary>
 /// <param name="volume">Attenuation, in hundredths of a decibel (dB).</param>
 /// <returns>DSResult</returns>
 public DSResult SetVolumeNative(int volume)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, volume, ((void **)(*(void **)UnsafeBasePtr))[15]));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a sound buffer object if it has not yet been initialized.
 /// </summary>
 /// <param name="directSound">The device object associated with this buffer.</param>
 /// <param name="bufferDescription">A <see cref="DSBufferDescription"/> structure that contains the values used to initialize this sound buffer.</param>
 /// <returns>DSResult</returns>
 public DSResult InitializeNative(DirectSoundBase directSound, DSBufferDescription bufferDescription)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, directSound.BasePtr.ToPointer(), &bufferDescription, ((void **)(*(void **)UnsafeBasePtr))[10]));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Sets the frequency at which the audio samples are played.
 /// </summary>
 /// <param name="frequency">Frequency, in hertz (Hz), at which to play the audio samples. A value of <see cref="FrequencyOriginal"/> resets the frequency to the default value of the buffer format.</param>
 /// <returns>DSResult</returns>
 /// <remarks>Before setting the frequency, you should ascertain whether the frequency is supported by checking the <see cref="DirectSoundCapabilities.MinSecondarySampleRate"/> and <see cref="DirectSoundCapabilities.MaxSecondarySampleRate"/> members of the <see cref="DirectSoundCapabilities"/> structure for the device. Some operating systems do not support frequencies greater than 100,000 Hz.</remarks>
 public DSResult SetFrequencyNative(int frequency)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, frequency, ((void **)(*(void **)UnsafeBasePtr))[17]));
 }
Exemplo n.º 7
0
 /// <summary>
 /// Sets the position of the play cursor, which is the point at which the next byte of data is read from the buffer.
 /// </summary>
 /// <param name="playPosition">Offset of the play cursor, in bytes, from the beginning of the buffer.</param>
 /// <returns>DSResult</returns>
 public DSResult SetCurrentPositionNative(int playPosition)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, playPosition, ((void **)(*(void **)UnsafeBasePtr))[13]));
 }
Exemplo n.º 8
0
 /// <summary>
 /// Releases a locked sound buffer.
 /// </summary>
 /// <param name="audioPtr1">Address of the value retrieved in the <c>audioPtr1</c> parameter of the <see cref="Lock"/> method.</param>
 /// <param name="audioBytes1">Number of bytes written to the portion of the buffer at <c>audioPtr1</c>.</param>
 /// <param name="audioPtr2">Address of the value retrieved in the <c>audioPtr2</c> parameter of the <see cref="Lock"/> method.</param>
 /// <param name="audioBytes2">Number of bytes written to the portion of the buffer at <c>audioPtr2</c>.</param>
 /// <returns>DSResult</returns>
 public DSResult UnlockNative(IntPtr audioPtr1, int audioBytes1, IntPtr audioPtr2, int audioBytes2)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, (void *)audioPtr1, audioBytes1, (void *)audioPtr2, audioBytes2, ((void **)(*(void **)UnsafeBasePtr))[19]));
 }
Exemplo n.º 9
0
 /// <summary>
 /// Restores the memory allocation for a lost sound buffer.
 /// </summary>
 /// <returns>DSResult</returns>
 /// <remarks>For more information, see <see href="https://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.idirectsoundbuffer8.idirectsoundbuffer8.restore(v=vs.85).aspx"/>.</remarks>
 public DSResult RestoreNative()
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, ((void **)(*(void **)UnsafeBasePtr))[20]));
 }
Exemplo n.º 10
0
 /// <summary>
 /// Causes the sound buffer to stop playing.
 /// </summary>
 /// <returns>DSResult</returns>
 /// <remarks>For more information, see <see href="https://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.idirectsoundbuffer8.idirectsoundbuffer8.stop(v=vs.85).aspx"/>.</remarks>
 public DSResult StopNative()
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, ((void **)(*(void **)UnsafeBasePtr))[18]));
 }
Exemplo n.º 11
0
 /// <summary>
 /// Causes the sound buffer to play, starting at the play cursor.
 /// </summary>
 /// <param name="flags">Flags specifying how to play the buffer.</param>
 /// <param name="priority">Priority for the sound, used by the voice manager when assigning hardware mixing resources. The lowest priority is 0, and the highest priority is 0xFFFFFFFF. If the buffer was not created with the <see cref="DSBufferCapsFlags.LocDefer"/> flag, this value must be 0.</param>
 /// <returns>DSResult</returns>
 public DSResult PlayNative(DSBPlayFlags flags, int priority)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, 0, priority, unchecked ((int)flags), ((void **)(*(void **)UnsafeBasePtr))[12]));
 }