Xeno-rat
Loading...
Searching...
No Matches
NAudio.Wave.WaveInBuffer Class Reference

A buffer of Wave samples. More...

Inheritance diagram for NAudio.Wave.WaveInBuffer:
Collaboration diagram for NAudio.Wave.WaveInBuffer:

Public Member Functions

 WaveInBuffer (IntPtr waveInHandle, Int32 bufferSize)
 creates a new wavebuffer
 
void Reuse ()
 Reuses the wave header for audio input.
 
void Dispose ()
 Releases the managed and unmanaged resources used by the WaveInRecorder.
 

Protected Member Functions

void Dispose (bool disposing)
 Releases resources held by this WaveBuffer.
 

Properties

byte[] Data [get]
 Provides access to the actual record buffer (for reading only)
 
bool Done [get]
 Indicates whether the Done flag is set on this buffer.
 
bool InQueue [get]
 Indicates whether the InQueue flag is set on this buffer.
 
int BytesRecorded [get]
 Number of bytes recorded.
 
Int32 BufferSize [get]
 The buffer size in bytes.
 

Private Member Functions

 ~WaveInBuffer ()
 Finalizer for this wave buffer.
 

Private Attributes

readonly WaveHeader header
 
readonly Int32 bufferSize
 
readonly byte[] buffer
 
GCHandle hBuffer
 
IntPtr waveInHandle
 
GCHandle hHeader
 
GCHandle hThis
 

Detailed Description

A buffer of Wave samples.

Constructor & Destructor Documentation

◆ WaveInBuffer()

NAudio.Wave.WaveInBuffer.WaveInBuffer ( IntPtr waveInHandle,
Int32 bufferSize )
inline

creates a new wavebuffer

Parameters
waveInHandleWaveIn device to write to
bufferSizeBuffer size in bytes
Here is the call graph for this function:

◆ ~WaveInBuffer()

NAudio.Wave.WaveInBuffer.~WaveInBuffer ( )
inlineprivate

Finalizer for this wave buffer.

Here is the call graph for this function:

Member Function Documentation

◆ Dispose() [1/2]

void NAudio.Wave.WaveInBuffer.Dispose ( )
inline

Releases the managed and unmanaged resources used by the WaveInRecorder.

Parameters
disposingTrue to release both managed and unmanaged resources; false to release only unmanaged resources.

This method releases the managed resources if disposing is true. It also releases the unmanaged resources used by the WaveInRecorder, including the waveInHandle, header, hHeader, hBuffer, and hThis.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dispose() [2/2]

void NAudio.Wave.WaveInBuffer.Dispose ( bool disposing)
inlineprotected

Releases resources held by this WaveBuffer.

Here is the call graph for this function:

◆ Reuse()

void NAudio.Wave.WaveInBuffer.Reuse ( )
inline

Reuses the wave header for audio input.

This method unprepares and reprepares the wave header for audio input. It first tries to unprepare the header using WaveInterop.waveInUnprepareHeader and then prepares the header using WaveInterop.waveInPrepareHeader. After that, it adds the buffer using WaveInterop.waveInAddBuffer.

Exceptions
MmExceptionThrown when an error occurs during unpreparing, preparing, or adding the buffer.
Here is the call graph for this function:

Member Data Documentation

◆ buffer

readonly byte [] NAudio.Wave.WaveInBuffer.buffer
private

◆ bufferSize

readonly Int32 NAudio.Wave.WaveInBuffer.bufferSize
private

◆ hBuffer

GCHandle NAudio.Wave.WaveInBuffer.hBuffer
private

◆ header

readonly WaveHeader NAudio.Wave.WaveInBuffer.header
private

◆ hHeader

GCHandle NAudio.Wave.WaveInBuffer.hHeader
private

◆ hThis

GCHandle NAudio.Wave.WaveInBuffer.hThis
private

◆ waveInHandle

IntPtr NAudio.Wave.WaveInBuffer.waveInHandle
private

Property Documentation

◆ BufferSize

Int32 NAudio.Wave.WaveInBuffer.BufferSize
get

The buffer size in bytes.

◆ BytesRecorded

int NAudio.Wave.WaveInBuffer.BytesRecorded
get

Number of bytes recorded.

◆ Data

byte [] NAudio.Wave.WaveInBuffer.Data
get

Provides access to the actual record buffer (for reading only)

◆ Done

bool NAudio.Wave.WaveInBuffer.Done
get

Indicates whether the Done flag is set on this buffer.

◆ InQueue

bool NAudio.Wave.WaveInBuffer.InQueue
get

Indicates whether the InQueue flag is set on this buffer.


The documentation for this class was generated from the following file: