Loading...
Searching...
No Matches
Inheritance diagram for Media::AudioDecoder:

Public Member Functions

 AudioDecoder (int rate)
 
void decode (const QString &path, int track, audio_handle hdl)
 
void newData ()
 
void finishedDecoding (audio_handle hdl)
 
void startDecode (QString str, audio_handle hdl)
 
void on_startDecode (QString, audio_handle hdl)
 

Static Public Member Functions

static std::optional< AudioInfo > do_probe (const QString &path)
 
static std::optional< std::pair< AudioInfo, audio_array > > decode_synchronous (const QString &path, int rate)
 
static std::optional< AudioInfo > find_info (const QString &path)
 
static void store_info (const QString &path, const AudioInfo &info)
 

Public Attributes

int32_t fileSampleRate {}
 
int32_t convertedSampleRate {}
 
int32_t channels {}
 
int32_t track {-1}
 
std::atomic< std::size_t > decoded {}
 
std::size_t produced {}
 

Member Function Documentation

◆ find_info()

std::optional< AudioInfo > Media::AudioDecoder::find_info ( const QString &  path)
static

What probing a file found, by path. The threads that decode read and write it concurrently; the audio thread never does.

Member Data Documentation

◆ decoded

std::atomic<std::size_t> Media::AudioDecoder::decoded {}

Written by the decode thread once the samples below it are in place, read by the owner (newData / finishedDecoding handlers, playback) while decoding goes on.

◆ produced

std::size_t Media::AudioDecoder::produced {}

Frames the file produced: decoded without the padding decodeRemaining() adds up to the buffer size


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