|
| | BSimpleGameSound (const BSimpleGameSound &other) |
| | Copy constructor.
|
| |
| | BSimpleGameSound (const char *file, BGameSoundDevice *device=NULL) |
| | Creates and initializes a BSimpleGameSound object from a sound file path and prepares it to be ready for playback.
|
| |
| | BSimpleGameSound (const entry_ref *file, BGameSoundDevice *device=NULL) |
| | Creates and initializes a BSimpleGameSound object from a sound file's entry_ref and prepares it to be ready for playback.
|
| |
| | BSimpleGameSound (const void *data, size_t frameCount, const gs_audio_format *format, BGameSoundDevice *device=NULL) |
| | Creates and initializes a BSimpleGameSound object from a data buffer in memory of frameCount frames in a format.
|
| |
| virtual | ~BSimpleGameSound () |
| | Frees all resources associated with the object.
|
| |
| virtual BGameSound * | Clone () const |
| | Returns a copy of this BSimpleGameSound object.
|
| |
| bool | IsLooping () const |
| | Returns whether looping is enabled or not.
|
| |
| status_t | SetIsLooping (bool looping) |
| | Enables or disables the playback looping of the sound.
|
| |
| | BGameSound (BGameSoundDevice *device=NULL) |
| | Creates a BGameSound object.
|
| |
| virtual | ~BGameSound () |
| | Destroys the BGameSound object and frees the memory it uses.
|
| |
| virtual BGameSound * | Clone () const =0 |
| | Pure virtual method to create a copy of the BGameSound object.
|
| |
| BGameSoundDevice * | Device () const |
| | Returns a pointer to the sound playback device.
|
| |
| const gs_audio_format & | Format () const |
| | Returns a gs_audio_format struct instance with the format of the sound associated with the BGameSound object.
|
| |
| gs_id | ID () const |
| | Returns the identifier of the sound associated with the BGameSound object.
|
| |
| status_t | InitCheck () const |
| | Verifies if the BGameSound object was successfully initialized.
|
| |
| virtual status_t | StartPlaying () |
| | Plays the sound in the playback device.
|
| |
| virtual bool | IsPlaying () |
| | Checks whether the sound is being played or not in the playback device.
|
| |
| virtual status_t | StopPlaying () |
| | Stops the playback of a sound currently playing.
|
| |
| status_t | SetGain (float gain, bigtime_t duration=0) |
| | Sets the gain of the sound, that is, the amount of amplification of the input signal.
|
| |
| status_t | SetPan (float pan, bigtime_t duration=0) |
| | Sets the panning of the sound, that is, the distribution of the audio signal anywhere in the stereophonic sound field.
|
| |
| float | Gain () |
| | Retrieves the current level of gain of the sound.
|
| |
| float | Pan () |
| | Retrieves the current value of panning of the sound.
|
| |
| virtual status_t | SetAttributes (gs_attribute *attributes, size_t attributeCount) |
| | Sets the attributes for the current sound.
|
| |
| virtual status_t | GetAttributes (gs_attribute *attributes, size_t attributeCount) |
| | Retrieves the attributes of the current sound.
|
| |
BSimpleGameSound represents a simple sound effect that remains in memory.
To use BSimpleGameSound is enough to create an instance of it and then call StartPlaying() to start the playback:
const char* filename = ... ;
BGameSound is the base class used in the other sound classes in the kit.
Definition: GameSound.h:15
virtual status_t StartPlaying()
Plays the sound in the playback device.
BSimpleGameSound represents a simple sound effect that remains in memory.
Definition: SimpleGameSound.h:14
The device parameter in all of the constructors is currently unused and has to be defined as NULL. Its base class BGameSound takes care of that by initializing the default sound device.
- Since
- BeOS R4.5