|
|
This class is the interface for an audio reader.
~AudioReaderInterface () |
Virtual destructor.
bool openMedia (const char* name) |
Open media.
Parameters:
name | Name of media, e.g. a file name. |
Returns: true, if AudioReader is ready for reading; false otherwise.
void closeMedia () |
Close media, if opened.
bool ready () |
Check, if AudioReader is ready for reading.
Returns: true, if AudioReader is ready; false otherwise.
void getMediaInfo (MediaInfo& mediaInfo) |
Get MediaInfo.
Parameters:
mediaInfo | Reference to store media info. |
MediaError getErrorCode () |
Get error code.
Returns: Error code.
card64 getPosition () |
Get current position.
Returns: Position in nanoseconds.
card64 getMaxPosition () |
Get maximum position.
Returns: maximum position in nanoseconds.
void setPosition (const card64 position) |
Get position.
Parameters:
position | Position in nanoseconds. |
cardinal getNextBlock (void* buffer, const cardinal blockSize) |
Read next block. In case of an error, getNextBlock() should return 0 and set ready to false.
Parameters:
buffer | Buffer for block to read. |
blockSize | Size of block in bytes. |
Returns: Number of bytes read.