ScummVM API documentation
Video::VideoDecoder::AudioTrack Class Referenceabstract

#include <video_decoder.h>

Inheritance diagram for Video::VideoDecoder::AudioTrack:
Video::VideoDecoder::Track Video::VideoDecoder::RewindableAudioTrack Video::VideoDecoder::SeekableAudioTrack Video::VideoDecoder::StreamFileAudioTrack

Public Member Functions

 AudioTrack (Audio::Mixer::SoundType soundType)
 
TrackType getTrackType () const
 
virtual bool endOfTrack () const
 
void start ()
 
void stop ()
 
void start (const Audio::Timestamp &limit)
 
byte getVolume () const
 
void setVolume (byte volume)
 
uint32 getRate () const
 
void setRate (uint32 rate)
 
void setRate (Common::Rational rate)
 
int8 getBalance () const
 
void setBalance (int8 balance)
 
Audio::Mixer::SoundType getSoundType () const
 
void setSoundType (Audio::Mixer::SoundType soundType)
 
uint32 getRunningTime () const
 
void setMute (bool mute)
 
- Public Member Functions inherited from Video::VideoDecoder::Track
virtual bool isRewindable () const
 
virtual bool rewind ()
 
virtual bool isSeekable () const
 
virtual bool seek (const Audio::Timestamp &time)
 
void pause (bool shouldPause)
 
bool isPaused () const
 
virtual Audio::Timestamp getDuration () const
 

Protected Member Functions

void pauseIntern (bool shouldPause)
 
virtual Audio::AudioStreamgetAudioStream () const =0
 

Additional Inherited Members

- Public Types inherited from Video::VideoDecoder::Track
enum  TrackType { kTrackTypeNone, kTrackTypeVideo, kTrackTypeAudio }
 

Detailed Description

An abstract representation of an audio track.

Member Function Documentation

◆ getTrackType()

TrackType Video::VideoDecoder::AudioTrack::getTrackType ( ) const
inlinevirtual

Get the type of track.

Implements Video::VideoDecoder::Track.

◆ endOfTrack()

virtual bool Video::VideoDecoder::AudioTrack::endOfTrack ( ) const
virtual

Return if the track has finished.

Implements Video::VideoDecoder::Track.

◆ start()

void Video::VideoDecoder::AudioTrack::start ( )

Start playing this track

◆ stop()

void Video::VideoDecoder::AudioTrack::stop ( )

Stop playing this track

◆ getVolume()

byte Video::VideoDecoder::AudioTrack::getVolume ( ) const
inline

Get the volume for this track

◆ setVolume()

void Video::VideoDecoder::AudioTrack::setVolume ( byte  volume)

Set the volume for this track

◆ getRate()

uint32 Video::VideoDecoder::AudioTrack::getRate ( ) const
inline

Get audio rate for this track (in Hz)

◆ setRate() [1/2]

void Video::VideoDecoder::AudioTrack::setRate ( uint32  rate)

Set audio rate for this track

◆ setRate() [2/2]

void Video::VideoDecoder::AudioTrack::setRate ( Common::Rational  rate)

Set audio rate using relative playback rate wrt original rate ie a rate of 2.0 will play the audio at twice the original rate

◆ getBalance()

int8 Video::VideoDecoder::AudioTrack::getBalance ( ) const
inline

Get the balance for this track

◆ setBalance()

void Video::VideoDecoder::AudioTrack::setBalance ( int8  balance)

Set the balance for this track

◆ getSoundType()

Audio::Mixer::SoundType Video::VideoDecoder::AudioTrack::getSoundType ( ) const
inline

Get the sound type for this track

◆ setSoundType()

void Video::VideoDecoder::AudioTrack::setSoundType ( Audio::Mixer::SoundType  soundType)
inline

Set the sound type for this track

◆ getRunningTime()

uint32 Video::VideoDecoder::AudioTrack::getRunningTime ( ) const

Get the time the AudioStream behind this track has been running

◆ setMute()

void Video::VideoDecoder::AudioTrack::setMute ( bool  mute)

Mute the track

◆ pauseIntern()

void Video::VideoDecoder::AudioTrack::pauseIntern ( bool  shouldPause)
protectedvirtual

Function called by pause() for subclasses to implement.

Reimplemented from Video::VideoDecoder::Track.

◆ getAudioStream()

virtual Audio::AudioStream* Video::VideoDecoder::AudioTrack::getAudioStream ( ) const
protectedpure virtual

Get the AudioStream that is the representation of this AudioTrack

Implemented in Video::VideoDecoder::SeekableAudioTrack, and Video::VideoDecoder::RewindableAudioTrack.


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