![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <WasapiStreamManager.h>
Public Types | |
| using | FDeviceInfo = FWasapiDeviceEnumeration::FDeviceInfo |
FWasapiStreamManager - Top level object for managing audio captures. It is composed of a device enumerator, capture thread, input stream and state machine. In the future, additional input streams may be managed here in support of multi-track capture.
| Audio::FWasapiStreamManager::FWasapiStreamManager | ( | ) |
|
delete |
|
delete |
|
inlinevirtual |
| void Audio::FWasapiStreamManager::AbortStream | ( | ) |
Brute force stops the capture thread.
| void Audio::FWasapiStreamManager::CloseStream | ( | ) |
Releases resources related to the capture thread and input streams.
| FString Audio::FWasapiStreamManager::GetDefaultInputDeviceId | ( | ) |
Returns the default input device Id.
| FString Audio::FWasapiStreamManager::GetDefaultOutputDeviceId | ( | ) |
Returns the default output device Id.
| bool Audio::FWasapiStreamManager::GetDeviceIdFromIndex | ( | int32 | InDeviceIndex, |
| EDataFlow | InDataFlow, | ||
| FString & | OutDeviceId | ||
| ) |
GetDeviceIdFromIndex - Convienence method for FWasapiDeviceEnumeration::GetDeviceIdFromIndex()
| bool Audio::FWasapiStreamManager::GetDeviceIndexFromId | ( | const FString & | InDeviceId, |
| int32 & | OutDeviceIndex | ||
| ) |
GetDeviceIndexFromId - Convienence method for FWasapiDeviceEnumeration::GetDeviceIndexFromId()
| bool Audio::FWasapiStreamManager::GetDeviceInfo | ( | const FString & | InDeviceId, |
| FDeviceInfo & | OutDeviceInfo | ||
| ) |
GetDeviceInfo - Convienence method for FWasapiDeviceEnumeration::GetDeviceInfo()
| bool Audio::FWasapiStreamManager::GetInputDevicesAvailable | ( | TArray< FDeviceInfo > & | OutDevices | ) |
GetInputDevicesAvailable - Convienence method for FWasapiDeviceEnumeration::GetInputDevicesAvailable()
| uint32 Audio::FWasapiStreamManager::GetStreamBufferSizeBytes | ( | ) | const |
Returns the buffer size in bytes of the callback buffer.
| double Audio::FWasapiStreamManager::GetStreamPosition | ( | ) | const |
Returns the current position (in seconds) of the input stream.
| bool Audio::FWasapiStreamManager::IsCapturing | ( | ) | const |
Indicates if the stream was successfully started and is capturing data.
| bool Audio::FWasapiStreamManager::IsStreamOpen | ( | ) | const |
Returns whether or not this object has been successfully initialized.
| bool Audio::FWasapiStreamManager::OpenStream | ( | const FString & | InDeviceId, |
| const FWasapiAudioFormat & | InFormat, | ||
| uint32 | InNumFramesDesired, | ||
| FWasapiOnAudioCaptureFunction | InCallback | ||
| ) |
OpenStream - Finds the device for the given Id and prepares it for capturing audio. It also spawns a capture thread.
| InDeviceId | - Id of the device to use for capturing audio. |
| InFormat | - The audio format to use for the capture. |
| InNumFramesDesired | - The number of audio frames desired when audio is delivered via the capture callback. |
| InCallback | - The callback which is called periodically during capture with audio data. |
|
delete |
|
delete |
| void Audio::FWasapiStreamManager::StartStream | ( | ) |
Starts the audio capture which triggers periodic callbacks with new audio data.
| void Audio::FWasapiStreamManager::StopStream | ( | ) |
Stops the capture thread which, in turn, completes the runnable and stops the input stream.