Class for handling audio playback and recording using PortAudio.
More...
#include <Audio.hpp>
Class for handling audio playback and recording using PortAudio.
Definition at line 29 of file Audio.hpp.
◆ PortAudio()
◆ ~PortAudio()
| PortAudio::~PortAudio |
( |
| ) |
|
◆ getSound()
| bool PortAudio::getSound |
( |
std::vector< float > & | soundVector, |
|
|
int | packetSize ) |
Get recorded sound data.
Gets the recorded sound.
- Parameters
-
| soundVector | Vector to store the sound data. |
| packetSize | Size of the packet to retrieve. |
- Returns
- true if sound data was retrieved successfully.
-
false otherwise.
- Parameters
-
| soundVector | The vector to store the recorded sound. |
| packetSize | The size of the packet to retrieve. |
- Returns
- True if the sound was successfully retrieved, false otherwise.
Definition at line 164 of file Audio.cpp.
◆ play()
Start audio playback.
Starts playing the audio.
Definition at line 106 of file Audio.cpp.
◆ record()
| void PortAudio::record |
( |
| ) |
|
Start audio recording.
Starts recording the audio.
Definition at line 133 of file Audio.cpp.
◆ resetBuffers()
| void PortAudio::resetBuffers |
( |
| ) |
|
Reset the input and output buffers.
Resets the input and output buffers.
Definition at line 199 of file Audio.cpp.
◆ setPlaySound()
| void PortAudio::setPlaySound |
( |
const std::vector< float > & | soundVector | ) |
|
Set the sound data to be played.
Sets the sound to be played.
- Parameters
-
| soundVector | Vector containing the sound data. |
| soundVector | The vector containing the sound to be played. |
Definition at line 185 of file Audio.cpp.
◆ stopPlay()
| void PortAudio::stopPlay |
( |
| ) |
|
Stop audio playback.
Stops playing the audio.
Definition at line 120 of file Audio.cpp.
◆ stopRecord()
| void PortAudio::stopRecord |
( |
| ) |
|
Stop audio recording.
Stops recording the audio.
Definition at line 147 of file Audio.cpp.
The documentation for this class was generated from the following files: