ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Audio::SeekableAudioStream Class Reference

A seekable audio stream. More...

#include <audiostream.h>

Inheritance diagram for Audio::SeekableAudioStream:
Collaboration diagram for Audio::SeekableAudioStream:

List of all members.

Public Member Functions

bool seek (uint32 where)
 Seeks to a given offset in the stream.
virtual bool seek (const Timestamp &where)=0
 Seeks to a given offset in the stream.
virtual Timestamp getLength () const =0
 Returns the length of the stream.
virtual bool rewind ()
 Rewinds the stream to its start.

Static Public Member Functions

static SeekableAudioStreamopenStreamFile (const Common::String &basename)
 Tries to load a file by trying all available formats.

Detailed Description

A seekable audio stream.

Subclasses of this class implement an interface for seeking. The seeking itself is not required to be working while the stream is being played by Mixer!

Definition at line 160 of file audiostream.h.


Member Function Documentation

virtual Timestamp Audio::SeekableAudioStream::getLength (  )  const [pure virtual]
SeekableAudioStream * Audio::SeekableAudioStream::openStreamFile ( const Common::String basename  )  [static]

Tries to load a file by trying all available formats.

In case of an error, the file handle will be closed, but deleting it is still the responsibility of the caller.

Parameters:
basename a filename without an extension
Returns:
an SeekableAudioStream ready to use in case of success; NULL in case of an error (e.g. invalid/nonexisting file)

Definition at line 67 of file audiostream.cpp.

virtual bool Audio::SeekableAudioStream::rewind (  )  [inline, virtual]

Rewinds the stream to its start.

Returns:
true on success, false otherwise.

Implements Audio::RewindableAudioStream.

Reimplemented in Audio::ADPCMStream, and Audio::ASFStream.

Definition at line 198 of file audiostream.h.

virtual bool Audio::SeekableAudioStream::seek ( const Timestamp where  )  [pure virtual]

Seeks to a given offset in the stream.

Parameters:
where offset as timestamp
Returns:
true on success, false on failure.

Implemented in AudioCDStream, Audio::SubSeekableAudioStream, Audio::ADPCMStream, Audio::ASFStream, Audio::FLACStream, Audio::MP3Stream, Audio::QuickTimeAudioDecoder::QuickTimeAudioTrack, Audio::RawStream< is16Bit, isUnsigned, isLE >, and Audio::VorbisStream.

bool Audio::SeekableAudioStream::seek ( uint32  where  )  [inline]

Seeks to a given offset in the stream.

Parameters:
where offset in milliseconds
Returns:
true on success, false on failure.

Definition at line 179 of file audiostream.h.


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


Generated on Sat May 18 2019 05:05:39 for ResidualVM by doxygen 1.7.1
curved edge   curved edge