Class hierarchy Compound list File list Compound Members File Members
SoundBuffer Class Reference
Generic SoundBuffer class implements the sound generics 3D methods are not a must. More...
Inherits Interface.
List of all members.
Public Members
- virtual long setPosition (float x, float y, float z) = 0
- Sets the Position in the 3D World.
- virtual long setDirection (float x, float y, float z, float Speed) = 0
- Sets the direction and speed in the 3D World.
- virtual long set3DParameters (float MinDistance=15.0f, float MaxDistance=5000.0f, float ConeInside=60, float ConeOutside=360, int VolumeOutside=-5000) = 0
- Set 3D Buffer parameters.
- virtual long set3DMode (int Mode) = 0
- Determines whether this sound is a 3D sound or not Note: if a buffer was not created with the Sound3D flag it cannot be set to 3D mode.
- virtual long destroyOnStop () = 0
- Detaches the sound buffer, and lets it play until it stops.
- virtual int isPlaying () const = 0
- Returns non zero if the buffer is currently playing.
- virtual long setVolume (int Volume) = 0
- Volume must be between -10000 (silence) and 0 (Full).
- virtual long play (int Loop) = 0
- Play the sound.
- virtual long stop () = 0
- Stop playing.
- virtual long status () const = 0
- Returns non zero if an error occured.
Related Functions
(Note that these are not member functions.)
- DLLExport SoundClip* newSoundClip (char* AudioData, int Size, int Freq=44100, int Bits=16, int Channels=2, int HW=SoundAccel)
- Create a new sound clip from raw data.
- DLLExport SoundClip* newSoundClip (istream* AudioData, int Size, int Freq=44100, int Bits=16, int Channels=2, int HW=SoundAccel)
- Create a new sound clip from raw data (taken from a binary stream).
- DLLExport SoundStream* newSoundStream (ResourceStream* RS, istream* AudioData, int Freq=44100, int Bits=16, int Channels=2, int HW=0)
- Create a new sound stream from raw data.
- DLLExport SoundClip* loadWaveFile (istream* is, int HW=SoundAccel)
- Loads a wave from a binary input stream.
- DLLExport SoundClip* loadWaveFile (const char* Name, int HW=SoundAccel)
- Loads a wave from the default resource stream (is it's set), or a file.
- DLLExport SoundStream* streamWaveFile (ResourceStream* RS, const char* Name, int HW=0)
- Open a large wave file for streaming.
Detailed Description
Generic SoundBuffer class implements the sound generics 3D methods are not a must.
Standard mono / stereo can be played too.
Member Function Documentation
virtual long SoundBuffer::setPosition(float x, float y, float z) = 0 [pure virtual]
Sets the Position in the 3D World.
virtual long SoundBuffer::setDirection(float x, float y, float z, float Speed) = 0 [pure virtual]
Sets the direction and speed in the 3D World.
The speed will not affect the sound's position, and will be used
only for making doppler effects.
virtual long SoundBuffer::set3DParameters(float MinDistance=15.0f, float MaxDistance=5000.0f, float ConeInside=60, float ConeOutside=360, int VolumeOutside=-5000) = 0 [pure virtual]
Set 3D Buffer parameters.
virtual long SoundBuffer::set3DMode(int Mode) = 0 [pure virtual]
Determines whether this sound is a 3D sound or not Note: if a buffer was not created with the Sound3D flag it cannot be set to 3D mode.
virtual long SoundBuffer::destroyOnStop() = 0 [pure virtual]
Detaches the sound buffer, and lets it play until it stops.
Sound buffer will then be deleted!!!
Not recommended for loop playing sound clips
virtual int SoundBuffer::isPlaying() const = 0 [pure virtual]
Returns non zero if the buffer is currently playing.
virtual long SoundBuffer::setVolume(int Volume) = 0 [pure virtual]
Volume must be between -10000 (silence) and 0 (Full).
virtual long SoundBuffer::play(int Loop) = 0 [pure virtual]
Play the sound.
If Loop is non zero, it will play over and over
virtual long SoundBuffer::stop() = 0 [pure virtual]
virtual long SoundBuffer::status() const = 0 [pure virtual]
Returns non zero if an error occured.
DLLExport SoundClip* newSoundClip(char* AudioData, int Size, int Freq=44100, int Bits=16, int Channels=2, int HW=SoundAccel)
Create a new sound clip from raw data.
Size is in bytes.
DLLExport SoundClip* newSoundClip(istream* AudioData, int Size, int Freq=44100, int Bits=16, int Channels=2, int HW=SoundAccel)
Create a new sound clip from raw data (taken from a binary stream).
Size is in bytes.
DLLExport SoundStream* newSoundStream(ResourceStream* RS, istream* AudioData, int Freq=44100, int Bits=16, int Channels=2, int HW=0)
Create a new sound stream from raw data.
Stream must remain valid until this object is destroyed.
Data will be streamed to the sound card continuously.
DLLExport SoundClip* loadWaveFile(istream* is, int HW=SoundAccel)
Loads a wave from a binary input stream.
DLLExport SoundClip* loadWaveFile(const char* Name, int HW=SoundAccel)
Loads a wave from the default resource stream (is it's set), or a file.
DLLExport SoundStream* streamWaveFile(ResourceStream* RS, const char* Name, int HW=0)
Open a large wave file for streaming.
The ResourceStream must remain alive until the SoundStream is released.
It will be used to release the data input stream.
The documentation for this class was generated from the following files: