Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtMultimediaPrivate::QSoundEffectVoice Class Referencefinal

#include <qsoundeffectwithplayer_p.h>

Inheritance diagram for QtMultimediaPrivate::QSoundEffectVoice:
Collaboration diagram for QtMultimediaPrivate::QSoundEffectVoice:

Public Member Functions

Q_MULTIMEDIA_EXPORT QSoundEffectVoice (VoiceId voiceId, std::shared_ptr< const QSample > sample, float volume, bool muted, int totalLoopCount, QAudioFormat engineFormat)
Q_MULTIMEDIA_EXPORT ~QSoundEffectVoice ()
Q_MULTIMEDIA_EXPORT VoicePlayResult play (QSpan< float >) noexcept QT_MM_NONBLOCKING override
bool isActive () noexcept QT_MM_NONBLOCKING override
const QAudioFormatformat () noexcept override
int loopsRemaining () const
std::shared_ptr< QSoundEffectVoiceclone (std::optional< QAudioFormat > newEngineFormat={}) const
Q_MULTIMEDIA_EXPORT qsizetype playVoice (QSpan< float >) noexcept QT_MM_NONBLOCKING
Public Member Functions inherited from QtMultimediaPrivate::QRtAudioEngineVoice
 QRtAudioEngineVoice (VoiceId id)
virtual ~QRtAudioEngineVoice ()=default
VoiceId voiceId () const

Public Attributes

const std::shared_ptr< const QSamplem_sample
const int m_totalFrames
const QAudioFormat m_engineFormat
float m_volume {}
bool m_muted {}
std::atomic_int m_loopsRemaining
int m_currentFrame {}
QAutoResetEvent m_currentLoopChanged

Additional Inherited Members

Public Types inherited from QtMultimediaPrivate::QRtAudioEngineVoice
using VoicePlayResult = QtMultimediaPrivate::VoicePlayResult
using VoiceId = QtMultimediaPrivate::VoiceId

Detailed Description

Definition at line 32 of file qsoundeffectwithplayer_p.h.

Constructor & Destructor Documentation

◆ QSoundEffectVoice()

QtMultimediaPrivate::QSoundEffectVoice::QSoundEffectVoice ( VoiceId voiceId,
std::shared_ptr< const QSample > sample,
float volume,
bool muted,
int totalLoopCount,
QAudioFormat engineFormat )

Definition at line 29 of file qsoundeffectwithplayer.cpp.

◆ ~QSoundEffectVoice()

QtMultimediaPrivate::QSoundEffectVoice::~QSoundEffectVoice ( )
default

Member Function Documentation

◆ clone()

std::shared_ptr< QSoundEffectVoice > QtMultimediaPrivate::QSoundEffectVoice::clone ( std::optional< QAudioFormat > newEngineFormat = {}) const

Definition at line 146 of file qsoundeffectwithplayer.cpp.

◆ format()

const QAudioFormat & QtMultimediaPrivate::QSoundEffectVoice::format ( )
inlineoverridevirtualnoexcept

◆ isActive()

bool QtMultimediaPrivate::QSoundEffectVoice::isActive ( )
overridevirtualnoexcept

◆ loopsRemaining()

int QtMultimediaPrivate::QSoundEffectVoice::loopsRemaining ( ) const
inline

Definition at line 46 of file qsoundeffectwithplayer_p.h.

◆ play()

VoicePlayResult QtMultimediaPrivate::QSoundEffectVoice::play ( QSpan< float > outputBuffer)
overridevirtualnoexcept

◆ playVoice()

qsizetype QtMultimediaPrivate::QSoundEffectVoice::playVoice ( QSpan< float > outputBuffer)
noexcept

Definition at line 68 of file qsoundeffectwithplayer.cpp.

Member Data Documentation

◆ m_currentFrame

int QtMultimediaPrivate::QSoundEffectVoice::m_currentFrame {}

Definition at line 63 of file qsoundeffectwithplayer_p.h.

◆ m_currentLoopChanged

QAutoResetEvent QtMultimediaPrivate::QSoundEffectVoice::m_currentLoopChanged

Definition at line 65 of file qsoundeffectwithplayer_p.h.

◆ m_engineFormat

const QAudioFormat QtMultimediaPrivate::QSoundEffectVoice::m_engineFormat

Definition at line 57 of file qsoundeffectwithplayer_p.h.

◆ m_loopsRemaining

std::atomic_int QtMultimediaPrivate::QSoundEffectVoice::m_loopsRemaining

Definition at line 62 of file qsoundeffectwithplayer_p.h.

◆ m_muted

bool QtMultimediaPrivate::QSoundEffectVoice::m_muted {}

Definition at line 60 of file qsoundeffectwithplayer_p.h.

◆ m_sample

const std::shared_ptr<const QSample> QtMultimediaPrivate::QSoundEffectVoice::m_sample

Definition at line 52 of file qsoundeffectwithplayer_p.h.

◆ m_totalFrames

const int QtMultimediaPrivate::QSoundEffectVoice::m_totalFrames
Initial value:
{
m_sample->format().framesForBytes(m_sample->data().size()),
}
const std::shared_ptr< const QSample > m_sample

Definition at line 53 of file qsoundeffectwithplayer_p.h.

◆ m_volume

float QtMultimediaPrivate::QSoundEffectVoice::m_volume {}

Definition at line 59 of file qsoundeffectwithplayer_p.h.


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