syBR::AudioCore::OggVorbisPlayer Class Reference

Ogg Vorbis player class. More...

#include <OggVorbis.hpp>

List of all members.

Public Member Functions

 OggVorbisPlayer (Bufferer *Bufferer, unsigned int BlockSize)
 Constructor.
 ~OggVorbisPlayer ()
 Destructor.
bool PlayLoad (const Core::String &File)
 Play a file (load file).
bool PlayStart ()
 Play a file (start playback).
bool PlayUpdate ()
 Play a file (update playback).
bool PlayStop ()
 Play a file (stop playback).
const Core::String & GetArtist () const
 Get the artist of the loaded music.
const Core::String & GetTitle () const
 Get the title of the loaded music.
const Core::String & GetAlbum () const
 Get the album of the loaded music.
const Core::String & GetDate () const
 Get the date of the loaded music.
const Core::String & GetTrack () const
 Get the track number of the loaded music.
const Core::String & GetGenre () const
 Get the genre of the loaded music.

Private Member Functions

void LoadComments ()
 Load comments.

Private Attributes

BuffererptrBufferer
 Sound system bufferer (for streaming).
Core::String sFilename
 Music file name.
FILE * hFile
 Music file pointer.
void * oggStream
 Ogg stream.
void * vorbisInfo
 Informations about the file.
void * vorbisComment
 Comments about the file.
SOUNDFORMAT Format
 Audio format of the file.
unsigned int uiBlockSize
 Data block size to be used to fill the buffer.
Core::String sArtist
 Music's artist name.
Core::String sTitle
 Music's title name.
Core::String sAlbum
 Music's album name.
Core::String sDate
 Music's date value.
Core::String sTrackNum
 Music's track number.
Core::String sGenre
 Music's genre name.


Detailed Description

Ogg Vorbis player class.

This is the main object which allows to play an Ogg Vorbis sound file.


Constructor & Destructor Documentation

AudioCore::OggVorbisPlayer::OggVorbisPlayer ( Bufferer Bufferer,
unsigned int  BlockSize 
)

Constructor.

Initialize the buffer size to (4096 * 8) bytes

Parameters:
Bufferer Bufferer object to be used in order to stream the file content
BlockSize Block size to be used to fill the buffer (in bytes)

AudioCore::OggVorbisPlayer::~OggVorbisPlayer (  ) 

Destructor.


Member Function Documentation

bool AudioCore::OggVorbisPlayer::PlayLoad ( const Core::String &  File  ) 

Play a file (load file).

Initialize Ogg Vorbis structures and get file information.

Parameters:
File Filename
Returns:
Boolean indicating if the file has been succesfully loaded

bool AudioCore::OggVorbisPlayer::PlayStart (  ) 

Play a file (start playback).

Returns:
Boolean indicating if the playback has been succesfully started

bool AudioCore::OggVorbisPlayer::PlayUpdate (  ) 

Play a file (update playback).

Returns:
Boolean indicating if the music is still playing or if it's done

bool AudioCore::OggVorbisPlayer::PlayStop (  ) 

Play a file (stop playback).

Stop playing and clear Ogg Vorbis structures.

Returns:
Always true
See also:
RLBufferer::Stop()

const Core::String & AudioCore::OggVorbisPlayer::GetArtist (  )  const

Get the artist of the loaded music.

Returns:
Artist name

const Core::String & AudioCore::OggVorbisPlayer::GetTitle (  )  const

Get the title of the loaded music.

Returns:
Title name

const Core::String & AudioCore::OggVorbisPlayer::GetAlbum (  )  const

Get the album of the loaded music.

Returns:
Album name

const Core::String & AudioCore::OggVorbisPlayer::GetDate (  )  const

Get the date of the loaded music.

The date is retrieved as it is set in the comments of the file and, therefore, its format is unknown.

Returns:
Date value

const Core::String & AudioCore::OggVorbisPlayer::GetTrack (  )  const

Get the track number of the loaded music.

The track number is retrieved as it is set in the comments of the file and, therefore, its format is unknown.

Returns:
Track number

const Core::String & AudioCore::OggVorbisPlayer::GetGenre (  )  const

Get the genre of the loaded music.

Returns:
Genre of the music file

void AudioCore::OggVorbisPlayer::LoadComments (  )  [private]

Load comments.


Member Data Documentation

Bufferer* syBR::AudioCore::OggVorbisPlayer::ptrBufferer [private]

Sound system bufferer (for streaming).

Core::String syBR::AudioCore::OggVorbisPlayer::sFilename [private]

Music file name.

FILE* syBR::AudioCore::OggVorbisPlayer::hFile [private]

Music file pointer.

The file is opened by PlayLoad() but it is automatically closed by Ogg Vorbis

void* syBR::AudioCore::OggVorbisPlayer::oggStream [private]

Ogg stream.

void* syBR::AudioCore::OggVorbisPlayer::vorbisInfo [private]

Informations about the file.

void* syBR::AudioCore::OggVorbisPlayer::vorbisComment [private]

Comments about the file.

SOUNDFORMAT syBR::AudioCore::OggVorbisPlayer::Format [private]

Audio format of the file.

unsigned int syBR::AudioCore::OggVorbisPlayer::uiBlockSize [private]

Data block size to be used to fill the buffer.

Core::String syBR::AudioCore::OggVorbisPlayer::sArtist [private]

Music's artist name.

Core::String syBR::AudioCore::OggVorbisPlayer::sTitle [private]

Music's title name.

Core::String syBR::AudioCore::OggVorbisPlayer::sAlbum [private]

Music's album name.

Core::String syBR::AudioCore::OggVorbisPlayer::sDate [private]

Music's date value.

Core::String syBR::AudioCore::OggVorbisPlayer::sTrackNum [private]

Music's track number.

Core::String syBR::AudioCore::OggVorbisPlayer::sGenre [private]

Music's genre name.


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

Copyright © 2008 by Sebastien Frippiat
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:33 2008