Class AudioAnalyzerOVR
Defined in File AudioAnalyzerOVR.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public AudioAnalyzerSource
(Class AudioAnalyzerSource)
Class Documentation
-
class AudioAnalyzerOVR : public AudioAnalyzerSource
Audio Analyzer OVR Source.
This class will be used to capture the audio in real time from a Oculus microphone, can playback the captured audio too
Public Functions
-
AudioAnalyzerOVR()
Constructor
-
~AudioAnalyzerOVR()
Destructor This will unload the audio too
-
AudioAnalyzerOVR(AudioAnalyzerOVR const &x) = delete
Disable copy constructor
- Parameters:
x – —
-
void operator=(AudioAnalyzerOVR const &x) = delete
Disable copy assignment
- Parameters:
x – —
-
bool initializeAudio(uint32 sampleRate, uint8 audioFormat, float audioBufferSeconds, bool initPlaybackDevice, uint32 periodSizeInFrames, uint32 periodSizeInMilliseconds, uint32 periods)
Initializes the capturer audio info and opens the audio capture (and player) device
- Parameters:
sampleRate – Number of samples per second for the capture (and playback)
audioFormat – unsigned, signed, float indicator
audioBufferSeconds – Audio buffer size in seconds
initPlaybackDevice – Must initialize a playback device
periodSizeInFrames – Device audio buffer size in frames (power of 2), 0 to use default value
periodSizeInMilliseconds – Device audio buffer size in milliseconds, 0 to use default value
periods – Device audio buffer size multiplier
- Returns:
The audio initilization result
-
void unloadAudio()
Closes the audio capturer (and player) device
-
void start(bool playback)
Starts the audio capturer (and player playback)
- Parameters:
playback – Indicates if we want to playback the captured audio too
-
void stop()
Stops the audio capturer (and player playback)
-
bool isCapturing() const
Returns if the device is currently capturing audio
- Returns:
Device is playing
-
virtual float getPlaybackProgress(float &bufferPosTime)
Returns the total capture duration and buffer postion time
- Parameters:
bufferPosTime – [out] Current buffer position (seconds)
- Returns:
float Duration in seconds
-
float getPlaybackProgress()
Returns the total capture duration
- Returns:
float Duration in seconds
-
void setDefaultAudioDevices(const FString &capturerDeviceName, const FString &playerDeviceName)
Set default capturer and player device
- Parameters:
capturerDeviceName – New default capturer audio device name
playerDeviceName – New default player audio device name
-
void getDefaultAudioDevices(FString &capturerDeviceName, FString &playerDeviceName)
Get default capturer and player device
- Parameters:
capturerDeviceName – [out] Default audio capturer device name
playerDeviceName – [out] Default audio player device name
-
inline virtual bool hasOnlyHeader() const
Returns if only has been loaded the header data
- Returns:
Has onkly header data
-
inline virtual bool needsBufferOffset() const
Returns if the buffer needs to be offset
- Returns:
Needs buffer offset
-
const AudioAnalyzerDeviceInfo &getAudioCapturerDeviceInfo() const
(Const) Returns the capturer audio device info
- Returns:
Audio device info structure
-
const AudioAnalyzerDeviceInfo &getAudioPlayerDeviceInfo() const
(Const) Returns the player audio device info
- Returns:
Audio device info structure
-
float getCaptureVolume()
Returns the volume of the captured audio
- Returns:
Volume in range 0.0-1.0
-
void setCaptureVolume(float volume)
Sets the volume of the captured audio
- Parameters:
volume – New volume in range 0.0-1.0
-
AudioAnalyzerOVR()