Xeno-rat
|
MME Wave function interop. More...
Public Types | |
enum | WaveInOutOpenFlags { CallbackNull = 0 , CallbackFunction = 0x30000 , CallbackEvent = 0x50000 , CallbackWindow = 0x10000 , CallbackThread = 0x20000 } |
enum | WaveMessage { WaveInOpen = 0x3BE , WaveInClose = 0x3BF , WaveInData = 0x3C0 , WaveOutClose = 0x3BC , WaveOutDone = 0x3BD , WaveOutOpen = 0x3BB } |
Public Member Functions | |
delegate void | WaveCallback (IntPtr hWaveOut, WaveMessage message, IntPtr dwInstance, WaveHeader wavhdr, IntPtr dwReserved) |
static Int32 | mmioStringToFOURCC ([MarshalAs(UnmanagedType.LPStr)] String s, int flags) |
Converts a string to a FOURCC value. | |
static Int32 | waveOutGetNumDevs () |
Retrieves the number of waveform-audio output devices present in the system. | |
static MmResult | waveOutPrepareHeader (IntPtr hWaveOut, WaveHeader lpWaveOutHdr, int uSize) |
Prepares the header for playback on a waveform-audio output device. | |
static MmResult | waveOutUnprepareHeader (IntPtr hWaveOut, WaveHeader lpWaveOutHdr, int uSize) |
Notifies the audio device driver that it can return a buffer to the application. | |
static MmResult | waveOutWrite (IntPtr hWaveOut, WaveHeader lpWaveOutHdr, int uSize) |
Sends a data block to the specified waveform-audio output device. | |
static MmResult | waveOutOpen (out IntPtr hWaveOut, IntPtr uDeviceID, WaveFormat lpFormat, WaveCallback dwCallback, IntPtr dwInstance, WaveInOutOpenFlags dwFlags) |
Opens a waveform output device for playback. | |
static MmResult | waveOutOpenWindow (out IntPtr hWaveOut, IntPtr uDeviceID, WaveFormat lpFormat, IntPtr callbackWindowHandle, IntPtr dwInstance, WaveInOutOpenFlags dwFlags) |
Opens a waveform-audio output device for playback. | |
static MmResult | waveOutReset (IntPtr hWaveOut) |
Resets the specified waveform-audio output device. | |
static MmResult | waveOutClose (IntPtr hWaveOut) |
Closes the specified waveform output device. | |
static MmResult | waveOutPause (IntPtr hWaveOut) |
Pauses playback on the specified waveform-audio output device. | |
static MmResult | waveOutRestart (IntPtr hWaveOut) |
Restarts playback on the specified waveform-audio output device. | |
static MmResult | waveOutGetPosition (IntPtr hWaveOut, ref MmTime mmTime, int uSize) |
Retrieves the current playback position of the specified waveform output device. | |
static MmResult | waveOutSetVolume (IntPtr hWaveOut, int dwVolume) |
Sets the volume level of the specified waveform-audio output device. | |
static MmResult | waveOutGetVolume (IntPtr hWaveOut, out int dwVolume) |
Retrieves the current volume level of the specified waveform-audio output device. | |
static MmResult | waveOutGetDevCaps (IntPtr deviceID, out WaveOutCapabilities waveOutCaps, int waveOutCapsSize) |
Retrieves the capabilities of a specified waveform-audio output device. | |
static Int32 | waveInGetNumDevs () |
Retrieves the number of waveform-audio input devices present in the system. | |
static MmResult | waveInGetDevCaps (IntPtr deviceID, out WaveInCapabilities waveInCaps, int waveInCapsSize) |
Retrieves the capabilities of a specified input device. | |
static MmResult | waveInAddBuffer (IntPtr hWaveIn, WaveHeader pwh, int cbwh) |
Adds a buffer to the specified waveform-audio input device. | |
static MmResult | waveInClose (IntPtr hWaveIn) |
Closes the specified waveform-audio input device. | |
static MmResult | waveInOpen (out IntPtr hWaveIn, IntPtr uDeviceID, WaveFormat lpFormat, WaveCallback dwCallback, IntPtr dwInstance, WaveInOutOpenFlags dwFlags) |
Opens a waveform input device for recording. | |
static MmResult | waveInOpenWindow (out IntPtr hWaveIn, IntPtr uDeviceID, WaveFormat lpFormat, IntPtr callbackWindowHandle, IntPtr dwInstance, WaveInOutOpenFlags dwFlags) |
Opens a waveform-audio input device for recording. | |
static MmResult | waveInPrepareHeader (IntPtr hWaveIn, WaveHeader lpWaveInHdr, int uSize) |
Prepares the specified waveform-audio input device for input. | |
static MmResult | waveInUnprepareHeader (IntPtr hWaveIn, WaveHeader lpWaveInHdr, int uSize) |
Unprepares the header for wave input. | |
static MmResult | waveInReset (IntPtr hWaveIn) |
Resets the specified waveform-audio input device. | |
static MmResult | waveInStart (IntPtr hWaveIn) |
Starts input on the specified waveform-audio input device. | |
static MmResult | waveInStop (IntPtr hWaveIn) |
Stops audio input on the specified waveform-audio input device. | |
static MmResult | waveInGetPosition (IntPtr hWaveIn, out MmTime mmTime, int uSize) |
Retrieves the current position in the audio stream being played or recorded. | |
MME Wave function interop.
static Int32 NAudio.Wave.WaveInterop.mmioStringToFOURCC | ( | [MarshalAs(UnmanagedType.LPStr)] String | s, |
int | flags ) |
Converts a string to a FOURCC value.
s | The string to be converted to a FOURCC value. |
flags | Additional flags for the conversion. |
This method converts the input string s to a FOURCC value using the specified flags. The FOURCC (Four Character Code) is a sequence of four bytes used to uniquely identify data formats. The conversion is performed using the winmm.dll library function mmioStringToFOURCC.
delegate void NAudio.Wave.WaveInterop.WaveCallback | ( | IntPtr | hWaveOut, |
WaveMessage | message, | ||
IntPtr | dwInstance, | ||
WaveHeader | wavhdr, | ||
IntPtr | dwReserved ) |
static MmResult NAudio.Wave.WaveInterop.waveInAddBuffer | ( | IntPtr | hWaveIn, |
WaveHeader | pwh, | ||
int | cbwh ) |
Adds a buffer to the specified waveform-audio input device.
hWaveIn | Handle to the waveform-audio input device. |
pwh | Pointer to a WaveHeader structure that identifies the buffer. |
cbwh | Size, in bytes, of the WaveHeader structure. |
MmException | Thrown when an error occurs while adding the buffer to the waveform-audio input device. |
static MmResult NAudio.Wave.WaveInterop.waveInClose | ( | IntPtr | hWaveIn | ) |
Closes the specified waveform-audio input device.
hWaveIn | Handle to the waveform-audio input device. This handle is returned by the waveInOpen function. |
static MmResult NAudio.Wave.WaveInterop.waveInGetDevCaps | ( | IntPtr | deviceID, |
out WaveInCapabilities | waveInCaps, | ||
int | waveInCapsSize ) |
Retrieves the capabilities of a specified input device.
deviceID | The identifier of the input device. |
waveInCaps | When this method returns, contains the capabilities of the input device. |
waveInCapsSize | The size, in bytes, of the waveInCaps structure. |
static Int32 NAudio.Wave.WaveInterop.waveInGetNumDevs | ( | ) |
Retrieves the number of waveform-audio input devices present in the system.
static MmResult NAudio.Wave.WaveInterop.waveInGetPosition | ( | IntPtr | hWaveIn, |
out MmTime | mmTime, | ||
int | uSize ) |
Retrieves the current position in the audio stream being played or recorded.
hWaveIn | Handle to the input device. |
mmTime | A reference to a MmTime structure that receives the current position. |
uSize | The size, in bytes, of the mmTime structure. |
static MmResult NAudio.Wave.WaveInterop.waveInOpen | ( | out IntPtr | hWaveIn, |
IntPtr | uDeviceID, | ||
WaveFormat | lpFormat, | ||
WaveCallback | dwCallback, | ||
IntPtr | dwInstance, | ||
WaveInOutOpenFlags | dwFlags ) |
Opens a waveform input device for recording.
hWaveIn | The handle of the opened waveform input device. |
uDeviceID | The device identifier of the waveform-audio input device to open. |
lpFormat | An instance of the WaveFormat class that specifies the format of the waveform-audio data to be recorded. |
dwCallback | The address of a fixed callback function, an event handle, a handle to a window, or the identifier of a thread to be called during waveform-audio recording to process messages related to the progress of recording. |
dwInstance | User-instance data passed to the callback mechanism. |
dwFlags | Flags for opening the waveform-audio input device. |
static MmResult NAudio.Wave.WaveInterop.waveInOpenWindow | ( | out IntPtr | hWaveIn, |
IntPtr | uDeviceID, | ||
WaveFormat | lpFormat, | ||
IntPtr | callbackWindowHandle, | ||
IntPtr | dwInstance, | ||
WaveInOutOpenFlags | dwFlags ) |
Opens a waveform-audio input device for recording.
hWaveIn | The handle of the opened waveform-audio input device. |
uDeviceID | The identifier of the waveform-audio input device to open. |
lpFormat | A pointer to a WaveFormat structure that identifies the desired format for recording waveform-audio data. |
callbackWindowHandle | A handle to the window that will receive callback information when waveform-audio data is recorded. |
dwInstance | User-instance data passed to the callback function. |
dwFlags | Flags for opening the waveform-audio input device. |
static MmResult NAudio.Wave.WaveInterop.waveInPrepareHeader | ( | IntPtr | hWaveIn, |
WaveHeader | lpWaveInHdr, | ||
int | uSize ) |
Prepares the specified waveform-audio input device for input.
hWaveIn | Handle to the waveform-audio input device. |
lpWaveInHdr | Pointer to a WaveHeader structure that identifies the waveform-audio data block to be prepared. |
uSize | Size, in bytes, of the WaveHeader structure. |
static MmResult NAudio.Wave.WaveInterop.waveInReset | ( | IntPtr | hWaveIn | ) |
Resets the specified waveform-audio input device.
hWaveIn | Handle to the waveform-audio input device. |
static MmResult NAudio.Wave.WaveInterop.waveInStart | ( | IntPtr | hWaveIn | ) |
Starts input on the specified waveform-audio input device.
hWaveIn | Handle to the waveform-audio input device. |
static MmResult NAudio.Wave.WaveInterop.waveInStop | ( | IntPtr | hWaveIn | ) |
Stops audio input on the specified waveform-audio input device.
hWaveIn | Handle to the waveform-audio input device. |
static MmResult NAudio.Wave.WaveInterop.waveInUnprepareHeader | ( | IntPtr | hWaveIn, |
WaveHeader | lpWaveInHdr, | ||
int | uSize ) |
Unprepares the header for wave input.
hWaveIn | Handle to the waveform-audio input device. |
lpWaveInHdr | Pointer to a WaveHeader structure that identifies the header to be unprepared. |
uSize | Size, in bytes, of the WaveHeader structure. |
This method unprepares the header for wave input on the specified waveform-audio input device.
static MmResult NAudio.Wave.WaveInterop.waveOutClose | ( | IntPtr | hWaveOut | ) |
Closes the specified waveform output device.
hWaveOut | Handle to the waveform-audio output device. This parameter can also be a device identifier. |
static MmResult NAudio.Wave.WaveInterop.waveOutGetDevCaps | ( | IntPtr | deviceID, |
out WaveOutCapabilities | waveOutCaps, | ||
int | waveOutCapsSize ) |
Retrieves the capabilities of a specified waveform-audio output device.
deviceID | The identifier of the waveform-audio output device. |
waveOutCaps | An output parameter that receives the capabilities of the specified waveform-audio output device. |
waveOutCapsSize | The size, in bytes, of the waveOutCaps parameter. |
static Int32 NAudio.Wave.WaveInterop.waveOutGetNumDevs | ( | ) |
Retrieves the number of waveform-audio output devices present in the system.
static MmResult NAudio.Wave.WaveInterop.waveOutGetPosition | ( | IntPtr | hWaveOut, |
ref MmTime | mmTime, | ||
int | uSize ) |
Retrieves the current playback position of the specified waveform output device.
hWaveOut | Handle to the waveform output device. |
mmTime | Reference to an MmTime structure that receives the current playback position. |
uSize | Size of the MmTime structure. |
This method retrieves the current playback position of the specified waveform output device and stores it in the provided MmTime structure. The MmTime structure contains timing information for various multimedia devices.
static MmResult NAudio.Wave.WaveInterop.waveOutGetVolume | ( | IntPtr | hWaveOut, |
out int | dwVolume ) |
Retrieves the current volume level of the specified waveform-audio output device.
hWaveOut | Handle to the waveform-audio output device. |
dwVolume | Receives the current volume setting of the audio device. The low-order word contains the left-channel volume setting, and the high-order word contains the right-channel setting. |
static MmResult NAudio.Wave.WaveInterop.waveOutOpen | ( | out IntPtr | hWaveOut, |
IntPtr | uDeviceID, | ||
WaveFormat | lpFormat, | ||
WaveCallback | dwCallback, | ||
IntPtr | dwInstance, | ||
WaveInOutOpenFlags | dwFlags ) |
Opens a waveform output device for playback.
hWaveOut | The handle to the opened waveform output device. |
uDeviceID | The device identifier of the waveform-audio output device. It can be a device identifier or a handle of a MIDI output device. |
lpFormat | A pointer to a WaveFormat structure that identifies the format for waveform-audio data. |
dwCallback | The address of a callback function or a handle to an event that is called when playback has finished. |
dwInstance | User-instance data passed to the callback function or event handler. |
dwFlags | Flags for opening the waveform-audio output device. |
static MmResult NAudio.Wave.WaveInterop.waveOutOpenWindow | ( | out IntPtr | hWaveOut, |
IntPtr | uDeviceID, | ||
WaveFormat | lpFormat, | ||
IntPtr | callbackWindowHandle, | ||
IntPtr | dwInstance, | ||
WaveInOutOpenFlags | dwFlags ) |
Opens a waveform-audio output device for playback.
hWaveOut | The address of a handle to be used to identify the opened waveform-audio output device. |
uDeviceID | The device identifier of the waveform-audio output device to open. |
lpFormat | A pointer to a WaveFormat structure that identifies the format of the waveform-audio data to be sent to the output device. |
callbackWindowHandle | A handle to a window that will receive callback information from the waveform-audio output device. |
dwInstance | User-instance data passed to the callback function. |
dwFlags | Flags for opening the waveform-audio output device. |
static MmResult NAudio.Wave.WaveInterop.waveOutPause | ( | IntPtr | hWaveOut | ) |
Pauses playback on the specified waveform-audio output device.
hWaveOut | Handle to the waveform-audio output device. |
This method pauses playback on the specified waveform-audio output device identified by the handle hWaveOut . If successful, the method returns MmResult.NoError; otherwise, it returns an error code indicating the cause of failure.
static MmResult NAudio.Wave.WaveInterop.waveOutPrepareHeader | ( | IntPtr | hWaveOut, |
WaveHeader | lpWaveOutHdr, | ||
int | uSize ) |
Prepares the header for playback on a waveform-audio output device.
hWaveOut | Handle to the waveform-audio output device. |
lpWaveOutHdr | Pointer to a WaveHeader structure that identifies the header to be prepared. |
uSize | Size, in bytes, of the WaveHeader structure. |
This method prepares the specified header for playback on the specified waveform-audio output device. The header must be prepared with this method before it is used in playback operations.
static MmResult NAudio.Wave.WaveInterop.waveOutReset | ( | IntPtr | hWaveOut | ) |
Resets the specified waveform-audio output device.
hWaveOut | Handle to the waveform-audio output device. |
static MmResult NAudio.Wave.WaveInterop.waveOutRestart | ( | IntPtr | hWaveOut | ) |
Restarts playback on the specified waveform-audio output device.
hWaveOut | Handle to the waveform-audio output device. |
This method restarts playback on the specified waveform-audio output device that was previously paused or stopped.
static MmResult NAudio.Wave.WaveInterop.waveOutSetVolume | ( | IntPtr | hWaveOut, |
int | dwVolume ) |
Sets the volume level of the specified waveform-audio output device.
hWaveOut | Handle to the waveform-audio output device. |
dwVolume | New volume setting for the audio device. The low-order word contains the left-channel volume setting, and the high-order word contains the right-channel setting. |
static MmResult NAudio.Wave.WaveInterop.waveOutUnprepareHeader | ( | IntPtr | hWaveOut, |
WaveHeader | lpWaveOutHdr, | ||
int | uSize ) |
Notifies the audio device driver that it can return a buffer to the application.
hWaveOut | Handle to the audio output device. |
lpWaveOutHdr | Pointer to a WaveHeader structure that identifies the buffer to be returned. |
uSize | Size, in bytes, of the WaveHeader structure. |
static MmResult NAudio.Wave.WaveInterop.waveOutWrite | ( | IntPtr | hWaveOut, |
WaveHeader | lpWaveOutHdr, | ||
int | uSize ) |
Sends a data block to the specified waveform-audio output device.
hWaveOut | Handle to the waveform-audio output device. |
lpWaveOutHdr | Pointer to a WaveHeader structure that identifies the data block to be sent. |
uSize | Size, in bytes, of the WaveHeader structure. |