|
MTek-GDL 0.100.4-muffintrap
|
Go to the source code of this file.
Data Structures | |
| struct | Sound |
| Sound handling struct. More... | |
Typedefs | |
| typedef enum SoundStatus | SoundStatus |
| typedef struct Sound | Sound |
Enumerations | |
| enum | SoundStatus { Stopped , Playing , Paused , Initial } |
Functions | |
| Sound * | Sound_Create (void) |
| Allocates a new Sound with empty variables. | |
| Sound * | Sound_Load (const char *filename) |
| Loads a sound file. | |
| void | Sound_DeleteData (Sound *sound) |
| Deletes the sound data stored in the object. | |
| void | Sound_Play (Sound *sound) |
| Plays a sound. | |
| void | Sound_PlayEx (Sound *sound, float pitchOffset, float volumePercent) |
| Plays a sound with extended paramters. | |
| void | Sound_Stop (Sound *sound) |
| Stops the playback of the sound. | |
| void | Sound_SetPaused (Sound *sound, bool pause) |
| Pauses the playback of the sound. | |
| void | Sound_SetLooping (Sound *sound, bool looping) |
| bool | Sound_GetLooping (Sound *sound) |
| float | Sound_GetElapsedSeconds (Sound *sound) |
| Get elapsed playback time in seconds. | |
| void | Sound_SetElapsedSeconds (Sound *sound, float elapsed) |
| SoundStatus | Sound_GetStatus (Sound *sound) |
| Get if the voice is playing or not. | |
Sound module header.
| void Sound_DeleteData | ( | Sound * | sound | ) |
Deletes the sound data stored in the object.
Deallocates the memory buffer containing the loaded sound data.
| float Sound_GetElapsedSeconds | ( | Sound * | sound | ) |
Get elapsed playback time in seconds.
This function returns how long the sound has been playing in seconds
| SoundStatus Sound_GetStatus | ( | Sound * | sound | ) |
Get if the voice is playing or not.
This function can be used to know if the voice is currently playing
| Sound * Sound_Load | ( | const char * | filename | ) |
Loads a sound file.
This function loads a sound file which can then be played with Play() or Play2D().
| [in] | *fileName | File name of sound file to load. |
| void Sound_Play | ( | Sound * | sound | ) |
Plays a sound.
Plays a sound
| void Sound_PlayEx | ( | Sound * | sound, |
| float | pitchOffset, | ||
| float | volumePercent | ||
| ) |
Plays a sound with extended paramters.
Plays a sound with pitch control and its own volume level.
| [in] | pitch | Pitch of sound (1.0 is normal pitch). |
| [in] | volume | Volume of sound (100 is full volume). |
| void Sound_SetPaused | ( | Sound * | sound, |
| bool | pause | ||
| ) |
Pauses the playback of the sound.
This function pauses the sound if it is playing
| void Sound_Stop | ( | Sound * | sound | ) |
Stops the playback of the sound.
This function stops the sound if it is playing