nCine::AudioReaderMpt class

Audio reader for tracker module formats, backed by libopenmpt.

Base classes

class IAudioReader
Interface for an audio reader.

Constructors, destructors, conversion operators

AudioReaderMpt(std::unique_ptr<Death::IO::Stream> fileHandle, std::int32_t frequency)
~AudioReaderMpt()
AudioReaderMpt(const AudioReaderMpt&) deleted

Public functions

auto operator=(const AudioReaderMpt&) -> AudioReaderMpt& deleted
auto read(void* buffer, std::int32_t bufferSize) const -> std::int32_t override
Decodes audio data into the specified buffer.
void rewind() const override
Rewinds the reader back to the beginning.
void setLooping(bool value) override
Enables native stream looping if the format supports it.

Function documentation

std::int32_t nCine::AudioReaderMpt::read(void* buffer, std::int32_t bufferSize) const override

Decodes audio data into the specified buffer.

Parameters
buffer Destination buffer
bufferSize Buffer size in bytes
Returns Number of bytes actually written