AudioDataLib
A C++ library of classes supporting a variety of audio-data tasks.
Loading...
Searching...
No Matches
AudioDataLib::DownloadableSoundFormat Class Reference

This class knows how to read (and one day write) DLS files. More...

#include <DownloadableSoundFormat.h>

Inheritance diagram for AudioDataLib::DownloadableSoundFormat:
AudioDataLib::FileFormat

Public Member Functions

 DownloadableSoundFormat ()
 
virtual ~DownloadableSoundFormat ()
 
virtual bool ReadFromStream (ByteStream &inputStream, FileData *&fileData, Error &error) override
 
virtual bool WriteToStream (ByteStream &outputStream, const FileData *fileData, Error &error) override
 
- Public Member Functions inherited from AudioDataLib::FileFormat
 FileFormat ()
 
virtual ~FileFormat ()
 

Additional Inherited Members

- Static Public Member Functions inherited from AudioDataLib::FileFormat
static std::shared_ptr< FileFormatCreateForFile (const std::string &filePath)
 

Detailed Description

This class knows how to read (and one day write) DLS files.

DLS stands for downloadable sound. It's a RIFF-based file that contains a bunch of instruments (timbers, you could say) and their associated sound samples, and details how those sounds are to be replayed as a function of the MIDI protocol.

Constructor & Destructor Documentation

◆ DownloadableSoundFormat()

DownloadableSoundFormat::DownloadableSoundFormat ( )

◆ ~DownloadableSoundFormat()

DownloadableSoundFormat::~DownloadableSoundFormat ( )
virtual

Member Function Documentation

◆ ReadFromStream()

bool DownloadableSoundFormat::ReadFromStream ( ByteStream & inputStream,
FileData *& fileData,
Error & error )
overridevirtual

The given file data pointer is assigned an instance of some derivative of the FileData class which is, in turn, populated with the data found in the given stream.

Parameters
[in,out]inputStreamThis must be a ByteStream derivative that can handle read operations.
[out]fileDataOn success, this pointer is assigned a heap allocation the user is reponsible for freeing.
[out]errorThis will contain error information if false is returned.
Returns
True is returned on success; false otherwise.

Implements AudioDataLib::FileFormat.

◆ WriteToStream()

bool DownloadableSoundFormat::WriteToStream ( ByteStream & outputStream,
const FileData * fileData,
Error & error )
overridevirtual

The given file data is written to the given stream.

Parameters
[out]outputStreamThis must be a ByteStream derivative that can accept write operations.
[in]fileDataThis is the file data to be written to the stream.
[out]errorThis will contain error information if false is returned.
Returns
True is returned on success; false otherwise.

Implements AudioDataLib::FileFormat.


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