TDME2 1.9.121
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
VorbisAudioStream Class Referencefinal

Vorbis audio stream. More...

#include <tdme/audio/VorbisAudioStream.h>

Inheritance diagram for VorbisAudioStream:
Inheritance graph
Collaboration diagram for VorbisAudioStream:
Collaboration graph

Public Member Functions

 VorbisAudioStream (const string &id, const string &pathName, const string &fileName)
 Protected constructor. More...
 
void rewind () override
 Rewinds this audio entity. More...
 
- Public Member Functions inherited from AudioStream
virtual void setParameters (uint32_t sampleRate, uint8_t channels, const uint32_t bufferSize=32768)
 Set audio initialization parameters. More...
 
virtual bool isPlaying () override
 
virtual void rewind () override
 Rewinds this audio entity. More...
 
virtual void play () override
 Plays this audio entity. More...
 
virtual void pause () override
 Pauses this audio entity. More...
 
virtual void stop () override
 Stops this audio entity. More...
 
- Public Member Functions inherited from AudioEntity
virtual const string & getId () const
 
virtual const bool isLooping () const
 
virtual void setLooping (bool looping)
 Set looping. More...
 
virtual const bool isFixed () const
 
virtual void setFixed (bool fixed)
 Set this entity fixed, means the sound will always played no matter where the position and listener is located. More...
 
virtual const float getPitch () const
 
virtual void setPitch (float pitch)
 Set up pitch. More...
 
virtual const float getGain () const
 
virtual void setGain (float gain)
 Set up gain. More...
 
virtual const Vector3getSourcePosition () const
 
virtual void setSourcePosition (const Vector3 &sourcePosition)
 Set source position. More...
 
virtual const Vector3getSourceDirection () const
 
virtual void setSourceDirection (const Vector3 &sourceDirection)
 Set source direction. More...
 
virtual const Vector3getSourceVelocity () const
 
virtual void getSourceVelocity (const Vector3 &sourceVelocity)
 Set source velocity. More...
 
virtual bool isPlaying ()=0
 
virtual void rewind ()=0
 Rewinds this audio entity. More...
 
virtual void play ()=0
 Plays this audio entity. More...
 
virtual void pause ()=0
 Pauses this audio entity. More...
 
virtual void stop ()=0
 Stops this audio entity. More...
 

Protected Member Functions

bool initialize () override
 Initiates this OpenAL entity to OpenAl. More...
 
void dispose () override
 Dispose this entity from OpenAL. More...
 
virtual ~VorbisAudioStream ()
 Destructor. More...
 
void fillBuffer (ByteBuffer *data) override
 Fill buffer. More...
 
- Protected Member Functions inherited from AudioStream
 AudioStream (const string &id)
 Protected constructor. More...
 
virtual ~AudioStream ()
 Destructor. More...
 
virtual bool initialize () override
 Initiates this OpenAL entity to OpenAl. More...
 
virtual void update () override
 Commits properties to OpenAl. More...
 
virtual void dispose () override
 Dispose this entity from OpenAL. More...
 
virtual void fillBuffer (ByteBuffer *data)=0
 Fill buffer. More...
 
- Protected Member Functions inherited from AudioEntity
 AudioEntity (const string &id)
 Constructor. More...
 
virtual ~AudioEntity ()
 Constructor. More...
 
virtual bool initialize ()=0
 Initiates this OpenAL entity to OpenAl. More...
 
virtual void update ()=0
 Commits properties to OpenAl. More...
 
virtual void dispose ()=0
 Dispose this entity from OpenAL. More...
 

Private Attributes

string pathName
 
string fileName
 
VorbisDecoder decoder
 
bool initiated { false }
 

Friends

class Audio
 

Additional Inherited Members

- Protected Attributes inherited from AudioEntity
string id
 
bool looping
 
bool fixed
 
float pitch
 
float gain
 
Vector3 sourcePosition
 
Vector3 sourceDirection
 
Vector3 sourceVelocity
 

Detailed Description

Vorbis audio stream.

Author
Andreas Drewke
Version
$Id$

Definition at line 23 of file VorbisAudioStream.h.

Constructor & Destructor Documentation

◆ VorbisAudioStream()

VorbisAudioStream ( const string &  id,
const string &  pathName,
const string &  fileName 
)

Protected constructor.

Parameters
idid
pathNamepath name
fileNamefile name

Definition at line 22 of file VorbisAudioStream.cpp.

◆ ~VorbisAudioStream()

~VorbisAudioStream ( )
protectedvirtual

Destructor.

Definition at line 29 of file VorbisAudioStream.cpp.

Member Function Documentation

◆ dispose()

void dispose ( )
overrideprotectedvirtual

Dispose this entity from OpenAL.

Reimplemented from AudioStream.

Definition at line 113 of file VorbisAudioStream.cpp.

◆ fillBuffer()

void fillBuffer ( ByteBuffer data)
overrideprotectedvirtual

Fill buffer.

Parameters
datadata

Implements AudioStream.

Definition at line 99 of file VorbisAudioStream.cpp.

◆ initialize()

bool initialize ( )
overrideprotectedvirtual

Initiates this OpenAL entity to OpenAl.

Reimplemented from AudioStream.

Definition at line 45 of file VorbisAudioStream.cpp.

◆ rewind()

void rewind ( )
overridevirtual

Rewinds this audio entity.

Reimplemented from AudioStream.

Definition at line 32 of file VorbisAudioStream.cpp.

Friends And Related Function Documentation

◆ Audio

friend class Audio
friend

Definition at line 26 of file VorbisAudioStream.h.

Member Data Documentation

◆ decoder

VorbisDecoder decoder
private

Definition at line 31 of file VorbisAudioStream.h.

◆ fileName

string fileName
private

Definition at line 30 of file VorbisAudioStream.h.

◆ initiated

bool initiated { false }
private

Definition at line 32 of file VorbisAudioStream.h.

◆ pathName

string pathName
private

Definition at line 29 of file VorbisAudioStream.h.


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