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 processed by the 3D sound system.
- virtual long setStreamDelay (ushort Delay) = 0
- Set the delay (in millisecs) of a sound stream.
- 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) = 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 SoundStream* newSoundStream (InputFilter* 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 (if it's set), or a file.
- DLLExport SoundStream* streamWaveFile (ResourceStream* RS, const char* Name, int HW=0)
- Open a large wave file for streaming.
- DLLExport SoundStream* streamAudioFile (const char* Name, int HW=0)
- Open an audio 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.
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 processed by the 3D sound system.
Note: if a buffer was not created with the Sound3D flag
it cannot be set to 3D mode.
virtual long SoundBuffer::setStreamDelay(ushort Delay) = 0 [pure virtual]
Set the delay (in millisecs) of a sound stream.
A delay is needed to avoid sound clicks resulting
from non-realtime threads.
This defaults to 30ms
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) = 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 SoundStream* newSoundStream(InputFilter* AudioData, int Freq=44100, int Bits=16, int Channels=2, int HW=0)
Create a new sound stream from raw data.
Stream (AudioData) will not be deleted when SoundStream object is destroyed.
User must provide AudioData disposal.
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.
This function accepts only plain PCM files.
All compressed types must be streamed, using streamAudioFile
DLLExport SoundClip* loadWaveFile(const char* Name, int HW=SoundAccel)
Loads a wave from the default resource stream (if it's set), or a file.
This function accepts only plain PCM files.
All compressed types must be streamed, using streamAudioFile
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.
DLLExport SoundStream* streamAudioFile(const char* Name, int HW=0)
Open an audio file for streaming.
This requires windows to have DirectShow installed, and support the file format.
Uses only files, no resources yet.
The documentation for this class was generated from the following file: