RADLib
RADical C++ application framework
RADMedia::AudioDecoderStream Class Reference

Streaming decoder facade for long audio files. More...

#include <RADMedia.h>

Public Member Functions

 AudioDecoderStream ()
 Creates a closed decoder stream. More...
 
 ~AudioDecoderStream ()
 Closes the stream if open. More...
 
 AudioDecoderStream (const AudioDecoderStream &)=delete
 Decoder streams are move-only by ownership design. More...
 
AudioDecoderStreamoperator= (const AudioDecoderStream &)=delete
 Decoder streams are move-only by ownership design. More...
 
bool open (const std::string &path, std::string *error=nullptr)
 Opens path for streaming decode. More...
 
void close ()
 Closes the stream. More...
 
bool isOpen () const
 Returns true when a stream is open. More...
 
bool eof () const
 Returns true when no decoded frames remain. More...
 
const WavFormatformat () const
 Returns the decoded stream format. More...
 
size_t readFrames (float *interleaved, size_t maxFrames)
 Reads up to maxFrames into interleaved Float32 output. More...
 

Detailed Description

Streaming decoder facade for long audio files.

Constructor & Destructor Documentation

◆ AudioDecoderStream() [1/2]

RADMedia::AudioDecoderStream::AudioDecoderStream ( )

Creates a closed decoder stream.

◆ ~AudioDecoderStream()

RADMedia::AudioDecoderStream::~AudioDecoderStream ( )

Closes the stream if open.

◆ AudioDecoderStream() [2/2]

RADMedia::AudioDecoderStream::AudioDecoderStream ( const AudioDecoderStream )
delete

Decoder streams are move-only by ownership design.

Member Function Documentation

◆ close()

void RADMedia::AudioDecoderStream::close ( )

Closes the stream.

◆ eof()

bool RADMedia::AudioDecoderStream::eof ( ) const

Returns true when no decoded frames remain.

◆ format()

const WavFormat& RADMedia::AudioDecoderStream::format ( ) const

Returns the decoded stream format.

◆ isOpen()

bool RADMedia::AudioDecoderStream::isOpen ( ) const

Returns true when a stream is open.

◆ open()

bool RADMedia::AudioDecoderStream::open ( const std::string &  path,
std::string *  error = nullptr 
)

Opens path for streaming decode.

◆ operator=()

AudioDecoderStream& RADMedia::AudioDecoderStream::operator= ( const AudioDecoderStream )
delete

Decoder streams are move-only by ownership design.

◆ readFrames()

size_t RADMedia::AudioDecoderStream::readFrames ( float *  interleaved,
size_t  maxFrames 
)

Reads up to maxFrames into interleaved Float32 output.


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