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

Enumerations

enum class  NativeSampleFormat : uint8_t {
  uint8_t , int16_t , int32_t , int24_t_3b ,
  int24_t_4b_low , float32_t
}

Functions

void qMultiplySamples (float factor, const QAudioFormat &format, const void *src, void *dest, int len) noexcept QT_MM_NONBLOCKING
void applyVolume (float volume, const QAudioFormat &format, QSpan< const std::byte > source, QSpan< std::byte > destination) noexcept QT_MM_NONBLOCKING
void convertSampleFormat (QSpan< const std::byte > source, NativeSampleFormat sourceFormat, QSpan< std::byte > destination, NativeSampleFormat destinationFormat) noexcept QT_MM_NONBLOCKING
NativeSampleFormat bestNativeSampleFormat (const QAudioFormat &fmt, QSpan< const NativeSampleFormat > supportedNativeFormats)
NativeSampleFormat toNativeSampleFormat (QAudioFormat::SampleFormat fmt)
QAudioFormat::SampleFormat bestSampleFormat (const NativeSampleFormat fmt)
std::optional< float > sanitizeVolume (float volume, float lastValue)
constexpr size_t bytesPerSample (NativeSampleFormat fmt) noexcept QT_MM_NONBLOCKING

Enumeration Type Documentation

◆ NativeSampleFormat

Enumerator
uint8_t 
int16_t 
int32_t 
int24_t_3b 
int24_t_4b_low 
float32_t 

Definition at line 38 of file qaudiohelpers_p.h.

Function Documentation

◆ applyVolume()

void QAudioHelperInternal::applyVolume ( float volume,
const QAudioFormat & format,
QSpan< const std::byte > source,
QSpan< std::byte > destination )
noexcept

Definition at line 82 of file qaudiohelpers.cpp.

◆ bestNativeSampleFormat()

NativeSampleFormat QAudioHelperInternal::bestNativeSampleFormat ( const QAudioFormat & fmt,
QSpan< const NativeSampleFormat > supportedNativeFormats )

Definition at line 340 of file qaudiohelpers.cpp.

◆ bestSampleFormat()

QAudioFormat::SampleFormat QAudioHelperInternal::bestSampleFormat ( const NativeSampleFormat fmt)

Definition at line 425 of file qaudiohelpers.cpp.

◆ bytesPerSample()

size_t QAudioHelperInternal::bytesPerSample ( NativeSampleFormat fmt)
constexprnoexcept

Definition at line 59 of file qaudiohelpers_p.h.

◆ convertSampleFormat()

void QAudioHelperInternal::convertSampleFormat ( QSpan< const std::byte > source,
NativeSampleFormat sourceFormat,
QSpan< std::byte > destination,
NativeSampleFormat destinationFormat )
noexcept

Definition at line 305 of file qaudiohelpers.cpp.

◆ qMultiplySamples()

void QAudioHelperInternal::qMultiplySamples ( float factor,
const QAudioFormat & format,
const void * src,
void * dest,
int len )
noexcept

Definition at line 55 of file qaudiohelpers.cpp.

◆ sanitizeVolume()

std::optional< float > QAudioHelperInternal::sanitizeVolume ( float volume,
float lastValue )

Definition at line 443 of file qaudiohelpers.cpp.

◆ toNativeSampleFormat()

NativeSampleFormat QAudioHelperInternal::toNativeSampleFormat ( QAudioFormat::SampleFormat fmt)

Definition at line 409 of file qaudiohelpers.cpp.