|
| AcmStreamHeader (IntPtr streamHandle, int sourceBufferLength, int destBufferLength) |
|
void | Reposition () |
| Sets the flag 'firstTime' to true, indicating that the repositioning is being performed for the first time.
|
|
int | Convert (int bytesToConvert, out int sourceBytesConverted) |
| Converts the specified number of bytes using the Audio Compression Manager (ACM) and returns the number of bytes converted.
|
|
void | Dispose () |
| Disposes of the allocated resources.
|
|
|
virtual void | Dispose (bool disposing) |
|
|
void | Prepare () |
| Prepares the audio stream header for processing.
|
|
void | Unprepare () |
| Unprepares the audio stream for conversion by updating the stream header and unpreparing the header using ACM interop.
|
|
| ~AcmStreamHeader () |
|
◆ AcmStreamHeader()
NAudio.Wave.Compression.AcmStreamHeader.AcmStreamHeader |
( |
IntPtr | streamHandle, |
|
|
int | sourceBufferLength, |
|
|
int | destBufferLength ) |
|
inline |
◆ ~AcmStreamHeader()
NAudio.Wave.Compression.AcmStreamHeader.~AcmStreamHeader |
( |
| ) |
|
|
inlineprivate |
◆ Convert()
int NAudio.Wave.Compression.AcmStreamHeader.Convert |
( |
int | bytesToConvert, |
|
|
out int | sourceBytesConverted ) |
|
inline |
Converts the specified number of bytes using the Audio Compression Manager (ACM) and returns the number of bytes converted.
- Parameters
-
bytesToConvert | The number of bytes to convert. |
sourceBytesConverted | When this method returns, contains the actual number of bytes converted from the source buffer. |
- Returns
- The number of bytes converted from the destination buffer.
This method prepares for the conversion, sets the source buffer length, and performs the ACM stream conversion using the specified flags. It then checks if the codec has changed the destination buffer length and updates the sourceBytesConverted parameter with the actual number of bytes converted. Finally, it unprepares for the conversion and returns the number of bytes converted from the destination buffer.
- Exceptions
-
MmException | Thrown when an error occurs during the ACM stream conversion. |
◆ Dispose() [1/2]
void NAudio.Wave.Compression.AcmStreamHeader.Dispose |
( |
| ) |
|
|
inline |
Disposes of the allocated resources.
- Parameters
-
disposing | A boolean value indicating whether the method is being called from the Dispose method or the finalizer. |
This method releases the allocated resources if disposing is true
. The allocated resources include the source buffer, destination buffer, and their corresponding handles. Once the resources are disposed, the method sets the disposed flag to true
.
◆ Dispose() [2/2]
virtual void NAudio.Wave.Compression.AcmStreamHeader.Dispose |
( |
bool | disposing | ) |
|
|
inlineprotectedvirtual |
◆ Prepare()
void NAudio.Wave.Compression.AcmStreamHeader.Prepare |
( |
| ) |
|
|
inlineprivate |
Prepares the audio stream header for processing.
This method prepares the audio stream header for processing by setting the structure size and buffer pointers. It also calls the acmStreamPrepareHeader function from the AcmInterop library to prepare the audio stream header for processing.
- Exceptions
-
MmException | Thrown when an error occurs during the preparation of the audio stream header. |
◆ Reposition()
void NAudio.Wave.Compression.AcmStreamHeader.Reposition |
( |
| ) |
|
|
inline |
Sets the flag 'firstTime' to true, indicating that the repositioning is being performed for the first time.
◆ Unprepare()
void NAudio.Wave.Compression.AcmStreamHeader.Unprepare |
( |
| ) |
|
|
inlineprivate |
Unprepares the audio stream for conversion by updating the stream header and unpreparing the header using ACM interop.
This method updates the source and destination buffer lengths and pointers in the stream header, then unprepares the header using ACM interop. If an error occurs during unpreparing the header, a MmException is thrown with the corresponding error message.
- Exceptions
-
MmException | Thrown when an error occurs during unpreparing the header. |
◆ disposed
bool NAudio.Wave.Compression.AcmStreamHeader.disposed = false |
|
private |
◆ firstTime
bool NAudio.Wave.Compression.AcmStreamHeader.firstTime |
|
private |
◆ hDestBuffer
GCHandle NAudio.Wave.Compression.AcmStreamHeader.hDestBuffer |
|
private |
◆ hSourceBuffer
GCHandle NAudio.Wave.Compression.AcmStreamHeader.hSourceBuffer |
|
private |
◆ streamHandle
IntPtr NAudio.Wave.Compression.AcmStreamHeader.streamHandle |
|
private |
◆ streamHeader
◆ DestBuffer
byte [] NAudio.Wave.Compression.AcmStreamHeader.DestBuffer |
|
getprivate set |
◆ SourceBuffer
byte [] NAudio.Wave.Compression.AcmStreamHeader.SourceBuffer |
|
getprivate set |
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.WinMM/Compression/AcmStreamHeader.cs