Audaspace 1.5.0
A high level audio library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
IFileInput Interface Referenceabstract

The IFileInput interface represents a file input plugin that can create file input readers from filenames or buffers. More...

#include <IFileInput.h>

Inheritance diagram for IFileInput:
Inheritance graph
[legend]

Public Member Functions

virtual ~IFileInput ()
 Destroys the file input.
 
virtual std::shared_ptr< IReadercreateReader (const std::string &filename, int stream=0)=0
 Creates a reader for a file to be read.
 
virtual std::shared_ptr< IReadercreateReader (std::shared_ptr< Buffer > buffer, int stream=0)=0
 Creates a reader for a file to be read from memory.
 
virtual std::vector< StreamInfoqueryStreams (const std::string &filename)=0
 Queries the streams of a sound file.
 
virtual std::vector< StreamInfoqueryStreams (std::shared_ptr< Buffer > buffer)=0
 Queries the streams of a sound file.
 

Detailed Description

The IFileInput interface represents a file input plugin that can create file input readers from filenames or buffers.

Member Function Documentation

◆ createReader() [1/2]

virtual std::shared_ptr< IReader > IFileInput::createReader ( const std::string & filename,
int stream = 0 )
pure virtual

Creates a reader for a file to be read.

Parameters
filenamePath to the file to be read.
streamThe index of the audio stream within the file if it contains multiple audio streams.
Returns
The reader that reads the file.
Exceptions
ExceptionThrown if the file specified cannot be read.

Implemented in FFMPEG, and SndFile.

◆ createReader() [2/2]

virtual std::shared_ptr< IReader > IFileInput::createReader ( std::shared_ptr< Buffer > buffer,
int stream = 0 )
pure virtual

Creates a reader for a file to be read from memory.

Parameters
bufferThe in-memory file buffer.
streamThe index of the audio stream within the file if it contains multiple audio streams.
Returns
The reader that reads the file.
Exceptions
ExceptionThrown if the file specified cannot be read.

Implemented in FFMPEG, and SndFile.

◆ queryStreams() [1/2]

virtual std::vector< StreamInfo > IFileInput::queryStreams ( const std::string & filename)
pure virtual

Queries the streams of a sound file.

Parameters
filenamePath to the file to be read.
Returns
A vector with as many streams as there are in the file.
Exceptions
ExceptionThrown if the file specified cannot be read.

Implemented in FFMPEG, and SndFile.

◆ queryStreams() [2/2]

virtual std::vector< StreamInfo > IFileInput::queryStreams ( std::shared_ptr< Buffer > buffer)
pure virtual

Queries the streams of a sound file.

Parameters
bufferThe in-memory file buffer.
Returns
A vector with as many streams as there are in the file.
Exceptions
ExceptionThrown if the file specified cannot be read.

Implemented in FFMPEG, and SndFile.


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