|
JS8Call-Improved master
|
Gets audio data from a QAudioSource and passes frames to a sink. More...
#include <SoundInput.h>


Public Member Functions | |
| SoundInput (QObject *parent=nullptr) | |
| Construct a SoundInput helper. | |
| ~SoundInput () | |
| Destroy the SoundInput and release resources. | |
| Q_SLOT void | start (QAudioDevice const &device, int framesPerBuffer, AudioDevice *sink, AudioDevice::Channel channel=AudioDevice::Mono) |
Start capturing audio and forward it to sink. | |
| Q_SLOT void | suspend () |
| Temporarily suspend audio capture without dropping the stream. | |
| Q_SLOT void | resume () |
| Resume a previously suspended capture session. | |
| Q_SLOT void | stop () |
| Stop audio capture and release the configured sink. | |
| Q_SIGNAL void | error (QString message) const |
| Emitted when a non-fatal error occurs during capture. | |
| Q_SIGNAL void | status (QString message) const |
| Emitted to report status messages from the capture helper. | |
Gets audio data from a QAudioSource and passes frames to a sink.
The sink must outlive the active capture session. Start/stop/suspend operations control the underlying QAudioSource stream.
|
inline |
Construct a SoundInput helper.
| parent | Optional parent QObject. |
| SoundInput::~SoundInput | ( | ) |
Destroy the SoundInput and release resources.
Destructs the SoundInput object.

| Q_SIGNAL void SoundInput::error | ( | QString | message | ) | const |
Emitted when a non-fatal error occurs during capture.
| message | Human-readable error description. |

| void SoundInput::resume | ( | ) |
Resume a previously suspended capture session.
Resumes audio input.

| void SoundInput::start | ( | QAudioDevice const & | device, |
| int | framesPerBuffer, | ||
| AudioDevice * | sink, | ||
| AudioDevice::Channel | channel = AudioDevice::Mono ) |
Start capturing audio and forward it to sink.
Starts audio input from the specified device.
| device | Input audio device to use. |
| framesPerBuffer | Number of frames to request per buffer. |
| sink | Destination AudioDevice to receive frames. Must outlive capture. |
| channel | Channel selection for the sink (default: Mono). |
| device | The QAudioDevice to use for input. |
| framesPerBuffer | The number of frames per buffer. |
| sink | The AudioDevice sink to write audio data to. |
| channel | The audio channel configuration (Mono or Stereo). |


| Q_SIGNAL void SoundInput::status | ( | QString | message | ) | const |
Emitted to report status messages from the capture helper.
| message | Informational text. |
| void SoundInput::stop | ( | ) |
Stop audio capture and release the configured sink.
Stops audio input.

| void SoundInput::suspend | ( | ) |
Temporarily suspend audio capture without dropping the stream.
Suspends audio input.
