#include <Bufferer.hpp>
Public Types | |
| enum | SoundFormat { SNDFMT_MONO_8 = 0, SNDFMT_MONO_16, SNDFMT_STEREO_8, SNDFMT_STEREO_16 } |
| Sound format enumeration. More... | |
Public Member Functions | |
| Bufferer (unsigned int BlockSize) | |
| Constructor. | |
| virtual | ~Bufferer () |
| Destructor. | |
| void | SetSoundFormat (SoundFormat Format, unsigned int Frequency) |
| Set sound format informations. | |
| virtual bool | IsPlaying () const =0 |
| Tell if the buffer is playing or if it is done with its content. | |
| virtual void | Play ()=0 |
| Play the content of the buffer. | |
| virtual void | Stop ()=0 |
| Stop playing the content of the buffer. | |
| virtual unsigned char | GetFreeBlocks ()=0 |
| Get number of free blocks. | |
| virtual void | BufferBlock (char *Data, unsigned int Size)=0 |
| Buffer some data. | |
Protected Attributes | |
| const unsigned char | BLOCKCOUNT |
| unsigned char | ucFreeBlocks |
| Number of free data blocks. | |
| SoundFormat | myFormat |
| Sound format of the buffer. | |
| unsigned int | uiFrequency |
| Sound frequency of the buffer (in Hz). | |
| unsigned int | uiBlockSize |
| Data block size to be used to fill the buffer. | |
This is object which allows to do bufferisation. It can be used to do streaming (see OggVorbisPlayer()). This is a pure abstract class which needs a concrete implementation (using OpenAL, DirectSound or any other sound library).
| Bufferer::Bufferer | ( | unsigned int | BlockSize | ) |
Constructor.
| BlockSize | Data block size to be used for the buffers (in bytes) |
| Bufferer::~Bufferer | ( | ) | [virtual] |
Destructor.
| void Bufferer::SetSoundFormat | ( | SoundFormat | Format, | |
| unsigned int | Frequency | |||
| ) |
Set sound format informations.
| Format | Sound format (8/16 bits, mono/stereo) | |
| Frequency | Sound frequency (in Hz) |
| virtual bool syBR::AudioCore::Bufferer::IsPlaying | ( | ) | const [pure virtual] |
Tell if the buffer is playing or if it is done with its content.
| virtual void syBR::AudioCore::Bufferer::Play | ( | ) | [pure virtual] |
Play the content of the buffer.
| virtual void syBR::AudioCore::Bufferer::Stop | ( | ) | [pure virtual] |
Stop playing the content of the buffer.
| virtual unsigned char syBR::AudioCore::Bufferer::GetFreeBlocks | ( | ) | [pure virtual] |
Get number of free blocks.
| virtual void syBR::AudioCore::Bufferer::BufferBlock | ( | char * | Data, | |
| unsigned int | Size | |||
| ) | [pure virtual] |
Buffer some data.
| Data | Data block to fill the buffer with | |
| Size | of the block |
const unsigned char syBR::AudioCore::Bufferer::BLOCKCOUNT [protected] |
unsigned char syBR::AudioCore::Bufferer::ucFreeBlocks [protected] |
Number of free data blocks.
SoundFormat syBR::AudioCore::Bufferer::myFormat [protected] |
Sound format of the buffer.
unsigned int syBR::AudioCore::Bufferer::uiFrequency [protected] |
Sound frequency of the buffer (in Hz).
unsigned int syBR::AudioCore::Bufferer::uiBlockSize [protected] |
Data block size to be used to fill the buffer.
Copyright © 2008 by Sebastien Frippiat

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