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

#include <qaudiosystem_platform_stream_support_p.h>

Inheritance diagram for QPlatformAudioSinkStream:
Collaboration diagram for QPlatformAudioSinkStream:

Public Types

using AudioCallback = QPlatformAudioSink::AudioCallback
enum class  ShutdownPolicy

Public Member Functions

void requestStop ()

Protected Member Functions

 QPlatformAudioSinkStream (QAudioDevice, const QAudioFormat &, std::optional< int > ringbufferSize, std::optional< NativePeriodFrames > nativePeriodFrames, float volume)
 ~QPlatformAudioSinkStream ()
uint64_t process (QSpan< std::byte > hostBuffer, qsizetype totalNumberOfFrames, std::optional< NativeSampleFormat >={}) noexcept Q_DECL_NONBLOCKING_FUNCTION
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< NativePeriodFrames > nativePeriodFrames, 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< NativePeriodFrames > &nativePeriodFrames, const QAudioFormat &)
static qsizetype inferRingbufferBytes (const std::optional< int > &ringbufferSize, const std::optional< NativePeriodFrames > &nativePeriodFrames, const QAudioFormat &)
Protected Attributes inherited from QtMultimediaPrivate::QPlatformAudioIOStream
const QAudioDevice m_audioDevice
const QAudioFormat m_format
const std::optional< NativePeriodFramesm_nativePeriodFrames

Detailed Description

Definition at line 119 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< NativePeriodFrames > nativePeriodFrames,
float volume )
protected

Definition at line 119 of file qaudiosystem_platform_stream_support.cpp.

◆ ~QPlatformAudioSinkStream()

Member Function Documentation

◆ bytesFree()

◆ connectIdleHandler()

Definition at line 162 of file qaudiosystem_platform_stream_support_p.h.

◆ createQIODeviceConnections()

◆ createRingbufferWriterDevice()

◆ disconnectQIODeviceConnections()

◆ handleIOError()

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

Definition at line 168 of file qaudiosystem_platform_stream_support_p.h.

◆ invokeOnAppThread()

◆ isIdle()

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

Definition at line 155 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 151 of file qaudiosystem_platform_stream_support.cpp.

◆ processedDuration()

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

Definition at line 217 of file qaudiosystem_platform_stream_support.cpp.

◆ pullFromQIODevice()

◆ requestStop()

◆ setIdleState()

◆ setQIODevice()

◆ stopIdleDetection()

◆ thread()

◆ updateStreamIdle()

Member Data Documentation

◆ notificationThresholdBytes


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