Audaspace  1.3.0
A high level audio library.
Public Member Functions | List of all members
File Class Reference

The File sound tries to read a sound file via all available file inputs that have been registered in the FileManager class. More...

#include <File.h>

Inheritance diagram for File:
Inheritance graph
[legend]

Public Member Functions

 File (std::string filename)
 Creates a new sound. More...
 
 File (const data_t *buffer, int size)
 Creates a new sound. More...
 
virtual std::shared_ptr< IReadercreateReader ()
 Creates a reader for playback of the sound source. More...
 
- Public Member Functions inherited from ISound
virtual ~ISound ()
 Destroys the sound.
 

Detailed Description

The File sound tries to read a sound file via all available file inputs that have been registered in the FileManager class.

Constructor & Destructor Documentation

◆ File() [1/2]

File::File ( std::string  filename)

Creates a new sound.

The file is read from the file system using the given path.

Parameters
filenameThe sound file path.

◆ File() [2/2]

File::File ( const data_t buffer,
int  size 
)

Creates a new sound.

The file is read from memory using the supplied buffer.

Parameters
bufferThe buffer to read from.
sizeThe size of the buffer.

Member Function Documentation

◆ createReader()

virtual std::shared_ptr<IReader> File::createReader ( )
virtual

Creates a reader for playback of the sound source.

Returns
A pointer to an IReader object or nullptr if there has been an error.
Exceptions
ExceptionAn exception may be thrown if there has been a more unexpected error during reader creation.

Implements ISound.


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