JS8Call-Improved master
Loading...
Searching...
No Matches
NotificationSoundOutput Class Reference
Inheritance diagram for NotificationSoundOutput:
Collaboration diagram for NotificationSoundOutput:

Signals

void status (QString message)
void error (QString message)

Public Member Functions

 NotificationSoundOutput (QObject *parent=nullptr)
void setDevice (QAudioDevice const &device, unsigned msBuffer)
 Sets the audio device and buffer size.
void setAttenuation (qreal a)
 Sets the attenuation in dB.
void play (QByteArray const &data, QAudioFormat const &format)
 Plays audio from the provided data and format.
void stop ()
 Stops playback and releases all resources.

Member Function Documentation

◆ play()

void NotificationSoundOutput::play ( QByteArray const & data,
QAudioFormat const & format )

Plays audio from the provided data and format.

Parameters
dataThe raw PCM audio data.
formatThe QAudioFormat describing the data.

Any currently playing notification is stopped and replaced.

◆ setAttenuation()

void NotificationSoundOutput::setAttenuation ( qreal a)

Sets the attenuation in dB.

Parameters
aThe attenuation value (0 = full volume).

◆ setDevice()

void NotificationSoundOutput::setDevice ( QAudioDevice const & device,
unsigned msBuffer )

Sets the audio device and buffer size.

Parameters
deviceThe QAudioDevice to use.
msBufferThe buffer size in milliseconds.

The documentation for this class was generated from the following files: