xoreos  0.0.5
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Video::VideoDecoder::AudioTrack Class Referenceabstract

An abstract representation of an audio track. More...

#include <decoder.h>

Inheritance diagram for Video::VideoDecoder::AudioTrack:
Inheritance graph
[legend]
Collaboration diagram for Video::VideoDecoder::AudioTrack:
Collaboration graph
[legend]

Public Member Functions

 AudioTrack ()
 
virtual ~AudioTrack ()
 
TrackType getTrackType () const
 Get the type of track. More...
 
bool endOfTrack () const
 Return if the track has finished. More...
 
void start ()
 Start playing this track. More...
 
void stop ()
 Stop playing this track. More...
 
float getGain () const
 Get the gain for this track. More...
 
void setGain (float gain)
 Set the gain for this track. More...
 
uint32 getRunningTime () const
 Get the time the AudioStream behind this track has been running. More...
 
void setMute (bool mute)
 Mute the track. More...
 
virtual bool canBufferData () const =0
 Can more audio data be buffered? More...
 
- Public Member Functions inherited from Video::VideoDecoder::Track
 Track ()
 
virtual ~Track ()
 
void pause (bool shouldPause)
 Set the pause status of the track. More...
 
bool isPaused () const
 Return if the track is paused. More...
 
virtual Common::Timestamp getDuration () const
 Get the duration of the track. More...
 

Protected Member Functions

void pauseIntern (bool shouldPause)
 Function called by pause() for subclasses to implement. More...
 
virtual Sound::AudioStreamgetAudioStream () const =0
 Get the AudioStream that is the representation of this AudioTrack. More...
 

Private Attributes

Sound::ChannelHandle _handle
 
float _gain
 
bool _muted
 

Additional Inherited Members

- Public Types inherited from Video::VideoDecoder::Track
enum  TrackType { kTrackTypeNone, kTrackTypeAudio, kTrackTypeVideo }
 The types of tracks this class can be. More...
 

Detailed Description

An abstract representation of an audio track.

Definition at line 302 of file decoder.h.

Constructor & Destructor Documentation

◆ AudioTrack()

Video::VideoDecoder::AudioTrack::AudioTrack ( )

Definition at line 469 of file decoder.cpp.

◆ ~AudioTrack()

virtual Video::VideoDecoder::AudioTrack::~AudioTrack ( )
inlinevirtual

Definition at line 305 of file decoder.h.

Member Function Documentation

◆ canBufferData()

virtual bool Video::VideoDecoder::AudioTrack::canBufferData ( ) const
pure virtual

Can more audio data be buffered?

Implemented in Video::XboxMediaVideo::XMVAudioTrack51, and Video::XboxMediaVideo::XMVAudioTrack.

Referenced by Video::VideoDecoder::update().

Here is the caller graph for this function:

◆ endOfTrack()

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

Return if the track has finished.

Implements Video::VideoDecoder::Track.

Definition at line 472 of file decoder.cpp.

References SoundMan.

◆ getAudioStream()

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

Get the AudioStream that is the representation of this AudioTrack.

Implemented in Video::XboxMediaVideo::XMVAudioTrack51, and Video::XboxMediaVideo::XMVAudioTrack.

◆ getGain()

float Video::VideoDecoder::AudioTrack::getGain ( ) const
inline

Get the gain for this track.

Definition at line 324 of file decoder.h.

References _gain.

◆ getRunningTime()

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

Get the time the AudioStream behind this track has been running.

Definition at line 506 of file decoder.cpp.

References SoundMan.

◆ getTrackType()

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

Get the type of track.

This must not return kTrackTypeNone.

Implements Video::VideoDecoder::Track.

Definition at line 307 of file decoder.h.

References Video::VideoDecoder::Track::kTrackTypeAudio.

◆ pauseIntern()

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

Function called by pause() for subclasses to implement.

Reimplemented from Video::VideoDecoder::Track.

Definition at line 523 of file decoder.cpp.

References SoundMan.

◆ setGain()

void Video::VideoDecoder::AudioTrack::setGain ( float  gain)

Set the gain for this track.

Definition at line 476 of file decoder.cpp.

References SoundMan.

◆ setMute()

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

Mute the track.

Definition at line 513 of file decoder.cpp.

References SoundMan.

◆ start()

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

Start playing this track.

Definition at line 483 of file decoder.cpp.

References Video::VideoDecoder::isPaused(), Sound::kSoundTypeVideo, and SoundMan.

Here is the call graph for this function:

◆ stop()

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

Stop playing this track.

Definition at line 502 of file decoder.cpp.

References SoundMan.

Member Data Documentation

◆ _gain

float Video::VideoDecoder::AudioTrack::_gain
private

Definition at line 357 of file decoder.h.

Referenced by getGain().

◆ _handle

Sound::ChannelHandle Video::VideoDecoder::AudioTrack::_handle
private

Definition at line 356 of file decoder.h.

◆ _muted

bool Video::VideoDecoder::AudioTrack::_muted
private

Definition at line 358 of file decoder.h.


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