Bienvenue sur le site de la LibLapin.
Jetez un coup d'oeil en bas de la page pour choisir votre niveau de documentation en fonction de votre niveau avec la LibLapin.
Pour l'instant, c'est réglé sur 'Manuel complet'. Si c'est votre première fois avec la LibLapin, il vaudrait mieux choisir 'Débutant'.
De même, n'oubliez pas de préciser une version de la bibliothèque.
SoundManager
The sound_manager module header is lapin/sound_manager.h
Description
  This enumeration helps you to indicate a track to play when
you need music.
Symbols
-
BST_ALL:
  All tracks at once.
-
BST_TRACK_01:
  A track.
-
BST_TRACK_02:
  Another track.
-
BST_TRACK_03:
  Yet another track.
-
BST_LAST_TRACK:
  How many tracks there is.
INDEX
typedef enum e_bunny_sound_type
{
 
BST_GENERAL = -1,
 
BST_MUSIC,
 
BST_EFFECT,
 
BST_VOICE,
 
BST_LAST_SOUND_TYPE,
}
t_bunny_sound_type;
Description
  This enumeration helps you to categorize sounds in order
to share gauge like volume or pitch.
Symbols
-
BST_GENERAL:
  All sounds.
-
BST_MUSIC:
  Musics.
-
BST_EFFECT:
  Sound effects.
-
BST_VOICE:
  Voices.
-
BST_LAST_SOUND_TYPE:
  How many sound types exist.
INDEX
Description
  The sound manager structure role is to collect every
sounds and musics to control their volumes and pitches
accordingly to a central command - usually a configuration
panel in a video game.
Attributes
-
const t_bunny_sound * const current_music[BST_LAST_TRACK]:
  This field of length BST_LAST_TRACK have space for all tracks. It contains
pointers to musics currently being played so it can stop it, replace it
and avoid to restart it easily.
-
const double general_volume:
  A value between 0 and 100 which is the general volume. This impact all sounds.
A normal value is around 50.
-
const double volumes[ST_LAST_SOUND_TYPE:
  Values between 0 and 100 which represent the volume of their category.
A normal value is around 50.
-
const double general_pitch:
  A value superior to 0 which is the general pitch. This impact all sounds.
The normal value is 1.
-
const double pitches[ST_LAST_SOUND_TYPE:
  Values superior to 0 which represent the pitch of their category.
The normal value is 1.
INDEX
Description
  A global sound manager brought by the library itself.
This allows you to not make the sound manager follow you everywhere.
You can still create your own sound manager if you need to, but
I am not sure about its usefulness.
Default values
-
const t_bunny_sound * const current_music[BST_LAST_TRACK]:
  Set to NULL.
-
const double general_volume:
  Set to 50.0.
-
const double volumes[ST_LAST_SOUND_TYPE:
  Set to 70.0, 80.0 and 90.0.
-
const double general_pitch:
  A value superior to 0 which is the general pitch. This impact all sounds.
The normal value is 1.0.
-
const double pitches[ST_LAST_SOUND_TYPE:
  Values superior to 0 which represent the pitch of their category.
The normal value is 1.0.
INDEX
Return value
Return true if the sound was inserted or was
already inserted. false on error.
INDEX
Description
  This function remove the sent sound from the sent
sound manager.
A sound added inside a unique manager and deleted
with
bunny_delete_sound will be automatically removed
from its manager. Note it does not handle to be added
into several manager, so you should avoid doing it at
the same time.
INDEX
Description
  Play the sent music that must be a registered music
in the sent sound manager on the sent track. If it was
already being played, it is left as it. If another
music was being played on this track, it is stopped before. If no
music was being played, the music simply start.
Return value
Return true if the music is being played now or was already playing.
INDEX
Description
  Stop the music being played on the sent track.
INDEX
Description
  Play the sent sound that must be a registered sound
in the sent sound manager.
Return value
Return true if the effect was found and played.
INDEX
Description
  Stop the sent sound that must be a registered sound
in the sent sound manager.
INDEX
Description
  Send the volume of the sent category to the sent level.
INDEX
Description
  Send the pitch of the sent category to the sent level.
INDEX
Description
  Set the volume of the sent sound to the given value
considering the context. The computed value, which
takes consideration of the proper volume, the global volume
and the category volume will be stored inside the
t_bunny_sound
itself.
Return value
Return true if the effect was found and set.
INDEX
Description
  Set the pitch of the sent sound to the given value
considering the context. The computed value, which
takes consideration of the proper pitch, the global pitch
and the category pitch will be stored inside the
t_bunny_sound
itself.
Return value
Return true if the effect was found and set.
INDEX