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
QnxSndHelpers Namespace Reference

Classes

class  WakePipe
struct  HintsDeleter
struct  PcmOpenConfig
struct  PcmOpenResult

Typedefs

using HintsGuard = std::unique_ptr<void *, HintsDeleter>

Enumerations

enum class  PollOutcome { Ready , Woken , Error }

Functions

PollOutcome pollPcm (snd_pcm_t *handle, const WakePipe &wake)
snd_pcm_format_t mapSampleFormat (QAudioFormat::SampleFormat) noexcept
int recoverFromXrun (snd_pcm_t *handle, int err)
int startPcm (snd_pcm_t *handle)
void setWorkerRealtimePriority (const QLoggingCategory &category)
PcmOpenResult openConfiguredPcm (const PcmOpenConfig &config)

Variables

constexpr int kSuspendResumeRetryLimit = 5
constexpr std::chrono::milliseconds kSuspendResumeRetryDelay { 100 }
constexpr unsigned kDefaultPeriodCount = 3
constexpr unsigned kMinPeriodCount = 2
constexpr unsigned kMaxPeriodCount = 16
constexpr snd_pcm_uframes_t kDefaultPeriodFrames = 1024
constexpr int kMinWorkerPriority = 11
constexpr int kMaxWorkerPriority = 23
constexpr int kDefaultWorkerPriority = 20

Typedef Documentation

◆ HintsGuard

using QnxSndHelpers::HintsGuard = std::unique_ptr<void *, HintsDeleter>

Definition at line 96 of file qqnxsndhelpers_p.h.

Enumeration Type Documentation

◆ PollOutcome

enum class QnxSndHelpers::PollOutcome
strong
Enumerator
Ready 
Woken 
Error 

Definition at line 84 of file qqnxsndhelpers_p.h.

Function Documentation

◆ mapSampleFormat()

snd_pcm_format_t QnxSndHelpers::mapSampleFormat ( QAudioFormat::SampleFormat fmt)
noexcept

Definition at line 121 of file qqnxsndhelpers.cpp.

◆ openConfiguredPcm()

◆ pollPcm()

PollOutcome QnxSndHelpers::pollPcm ( snd_pcm_t * handle,
const WakePipe & wake )

Definition at line 78 of file qqnxsndhelpers.cpp.

References QnxSndHelpers::WakePipe::drain(), Error, QnxSndHelpers::WakePipe::readFd(), Ready, and Woken.

Here is the call graph for this function:

◆ recoverFromXrun()

int QnxSndHelpers::recoverFromXrun ( snd_pcm_t * handle,
int err )

Definition at line 203 of file qqnxsndhelpers.cpp.

References kSuspendResumeRetryLimit.

◆ setWorkerRealtimePriority()

void QnxSndHelpers::setWorkerRealtimePriority ( const QLoggingCategory & category)

◆ startPcm()

int QnxSndHelpers::startPcm ( snd_pcm_t * handle)

Definition at line 245 of file qqnxsndhelpers.cpp.

Variable Documentation

◆ kDefaultPeriodCount

unsigned QnxSndHelpers::kDefaultPeriodCount = 3
inlineconstexpr

Definition at line 41 of file qqnxsndhelpers_p.h.

◆ kDefaultPeriodFrames

snd_pcm_uframes_t QnxSndHelpers::kDefaultPeriodFrames = 1024
inlineconstexpr

Definition at line 47 of file qqnxsndhelpers_p.h.

Referenced by openConfiguredPcm().

◆ kDefaultWorkerPriority

int QnxSndHelpers::kDefaultWorkerPriority = 20
inlineconstexpr

Definition at line 55 of file qqnxsndhelpers_p.h.

Referenced by setWorkerRealtimePriority().

◆ kMaxPeriodCount

unsigned QnxSndHelpers::kMaxPeriodCount = 16
inlineconstexpr

Definition at line 44 of file qqnxsndhelpers_p.h.

◆ kMaxWorkerPriority

int QnxSndHelpers::kMaxWorkerPriority = 23
inlineconstexpr

Definition at line 54 of file qqnxsndhelpers_p.h.

Referenced by setWorkerRealtimePriority().

◆ kMinPeriodCount

unsigned QnxSndHelpers::kMinPeriodCount = 2
inlineconstexpr

Definition at line 43 of file qqnxsndhelpers_p.h.

◆ kMinWorkerPriority

int QnxSndHelpers::kMinWorkerPriority = 11
inlineconstexpr

Definition at line 53 of file qqnxsndhelpers_p.h.

Referenced by setWorkerRealtimePriority().

◆ kSuspendResumeRetryDelay

std::chrono::milliseconds QnxSndHelpers::kSuspendResumeRetryDelay { 100 }
inlineconstexpr

Definition at line 38 of file qqnxsndhelpers_p.h.

◆ kSuspendResumeRetryLimit

int QnxSndHelpers::kSuspendResumeRetryLimit = 5
inlineconstexpr

Definition at line 36 of file qqnxsndhelpers_p.h.

Referenced by recoverFromXrun().