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::QPlatformAudioSinkStream Class Referenceabstract

#include <qaudiosystem_platform_stream_support_p.h>

Inheritance diagram for QtMultimediaPrivate::QPlatformAudioSinkStream:
Collaboration diagram for QtMultimediaPrivate::QPlatformAudioSinkStream:

Public Types

using AudioCallback = QPlatformAudioSink::AudioCallback
enum class  ShutdownPolicy

Protected Member Functions

 QPlatformAudioSinkStream (QAudioDevice, const QAudioFormat &, std::optional< int > ringbufferSize, std::optional< int32_t > hardwareBufferFrames, float volume)
 ~QPlatformAudioSinkStream ()
uint64_t process (QSpan< std::byte > hostBuffer, qsizetype totalNumberOfFrames, std::optional< NativeSampleFormat >={}) noexcept QT_MM_NONBLOCKING
quint64 bytesFree () const
std::chrono::microseconds processedDuration () const
virtual void updateStreamIdle (bool)=0
QIODevicecreateRingbufferWriterDevice ()
void setQIODevice (QIODevice *device)
void createQIODeviceConnections (QIODevice *device)
void disconnectQIODeviceConnections ()
void pullFromQIODevice ()
void setIdleState (bool)
bool isIdle (std::memory_order order=std::memory_order_relaxed) const
void stopIdleDetection ()
template<typename Functor>
auto connectIdleHandler (Functor &&f)
template<typename ParentType>
void handleIOError (ParentType *parent)
QThreadthread () const
template<typename Functor>
void invokeOnAppThread (Functor &&f)
Protected Member Functions inherited from QtMultimediaPrivate::QPlatformAudioIOStream
 QPlatformAudioIOStream (QAudioDevice m_audioDevice, QAudioFormat m_format, std::optional< int > ringbufferSize, std::optional< int32_t > hardwareBufferFrames, float volume)
 ~QPlatformAudioIOStream ()
void setVolume (float)
float volume () const
template<typename Functor>
auto visitRingbuffer (Functor &&f)
template<typename Functor>
auto visitRingbuffer (Functor &&f) const
void prepareRingbuffer (std::optional< int > ringbufferSize)
int ringbufferSizeInBytes ()
void requestStop ()
bool isStopRequested (std::memory_order memory_order=std::memory_order_relaxed) const

Static Protected Attributes

static constexpr int notificationThresholdBytes = 0

Additional Inherited Members

Protected Types inherited from QtMultimediaPrivate::QPlatformAudioIOStream
using NativeSampleFormat = QAudioHelperInternal::NativeSampleFormat
using QAutoResetEvent = QtPrivate::QAutoResetEvent
enum class  ShutdownPolicy : uint8_t { DrainRingbuffer , DiscardRingbuffer }
Static Protected Member Functions inherited from QtMultimediaPrivate::QPlatformAudioIOStream
static qsizetype inferRingbufferFrames (const std::optional< int > &ringbufferSize, const std::optional< int32_t > &hardwareBufferFrames, const QAudioFormat &)
static qsizetype inferRingbufferBytes (const std::optional< int > &ringbufferSize, const std::optional< int32_t > &hardwareBufferFrames, const QAudioFormat &)
Protected Attributes inherited from QtMultimediaPrivate::QPlatformAudioIOStream
const QAudioDevice m_audioDevice
const QAudioFormat m_format
const std::optional< int32_t > m_hardwareBufferFrames

Detailed Description

Definition at line 120 of file qaudiosystem_platform_stream_support_p.h.

Member Typedef Documentation

◆ AudioCallback

Member Enumeration Documentation

◆ ShutdownPolicy

Constructor & Destructor Documentation

◆ QPlatformAudioSinkStream()

QtMultimediaPrivate::QPlatformAudioSinkStream::QPlatformAudioSinkStream ( QAudioDevice audioDevice,
const QAudioFormat & format,
std::optional< int > ringbufferSize,
std::optional< int32_t > hardwareBufferFrames,
float volume )
protected

Definition at line 130 of file qaudiosystem_platform_stream_support.cpp.

◆ ~QPlatformAudioSinkStream()

QtMultimediaPrivate::QPlatformAudioSinkStream::~QPlatformAudioSinkStream ( )
protecteddefault

Member Function Documentation

◆ bytesFree()

quint64 QtMultimediaPrivate::QPlatformAudioSinkStream::bytesFree ( ) const
protected

Definition at line 216 of file qaudiosystem_platform_stream_support.cpp.

◆ connectIdleHandler()

template<typename Functor>
auto QtMultimediaPrivate::QPlatformAudioSinkStream::connectIdleHandler ( Functor && f)
inlineprotected

Definition at line 161 of file qaudiosystem_platform_stream_support_p.h.

◆ createQIODeviceConnections()

void QtMultimediaPrivate::QPlatformAudioSinkStream::createQIODeviceConnections ( QIODevice * device)
protected

Definition at line 251 of file qaudiosystem_platform_stream_support.cpp.

◆ createRingbufferWriterDevice()

QIODevice * QtMultimediaPrivate::QPlatformAudioSinkStream::createRingbufferWriterDevice ( )
protected

Definition at line 274 of file qaudiosystem_platform_stream_support.cpp.

◆ disconnectQIODeviceConnections()

void QtMultimediaPrivate::QPlatformAudioSinkStream::disconnectQIODeviceConnections ( )
protected

Definition at line 268 of file qaudiosystem_platform_stream_support.cpp.

◆ handleIOError()

template<typename ParentType>
void QtMultimediaPrivate::QPlatformAudioSinkStream::handleIOError ( ParentType * parent)
inlineprotected

Definition at line 167 of file qaudiosystem_platform_stream_support_p.h.

◆ invokeOnAppThread()

template<typename Functor>
void QtMultimediaPrivate::QPlatformAudioSinkStream::invokeOnAppThread ( Functor && f)
inlineprotected

Definition at line 181 of file qaudiosystem_platform_stream_support_p.h.

◆ isIdle()

bool QtMultimediaPrivate::QPlatformAudioSinkStream::isIdle ( std::memory_order order = std::memory_order_relaxed) const
inlineprotected

Definition at line 154 of file qaudiosystem_platform_stream_support_p.h.

◆ process()

uint64_t QtMultimediaPrivate::QPlatformAudioSinkStream::process ( QSpan< std::byte > hostBuffer,
qsizetype totalNumberOfFrames,
std::optional< NativeSampleFormat > nativeFormat = {} )
protectednoexcept

Definition at line 162 of file qaudiosystem_platform_stream_support.cpp.

◆ processedDuration()

std::chrono::microseconds QtMultimediaPrivate::QPlatformAudioSinkStream::processedDuration ( ) const
protected

Definition at line 224 of file qaudiosystem_platform_stream_support.cpp.

◆ pullFromQIODevice()

void QtMultimediaPrivate::QPlatformAudioSinkStream::pullFromQIODevice ( )
protected

Definition at line 231 of file qaudiosystem_platform_stream_support.cpp.

◆ setIdleState()

void QtMultimediaPrivate::QPlatformAudioSinkStream::setIdleState ( bool x)
protected

Definition at line 290 of file qaudiosystem_platform_stream_support.cpp.

◆ setQIODevice()

void QtMultimediaPrivate::QPlatformAudioSinkStream::setQIODevice ( QIODevice * device)
protected

Definition at line 285 of file qaudiosystem_platform_stream_support.cpp.

◆ stopIdleDetection()

void QtMultimediaPrivate::QPlatformAudioSinkStream::stopIdleDetection ( )
protected

Definition at line 295 of file qaudiosystem_platform_stream_support.cpp.

◆ thread()

QThread * QtMultimediaPrivate::QPlatformAudioSinkStream::thread ( ) const
protected

Definition at line 300 of file qaudiosystem_platform_stream_support.cpp.

◆ updateStreamIdle()

virtual void QtMultimediaPrivate::QPlatformAudioSinkStream::updateStreamIdle ( bool )
protectedpure virtual

Member Data Documentation

◆ notificationThresholdBytes

int QtMultimediaPrivate::QPlatformAudioSinkStream::notificationThresholdBytes = 0
staticconstexprprotected

Definition at line 150 of file qaudiosystem_platform_stream_support_p.h.


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