
Go to the source code of this file.
Classes | |
| struct | SIO2sound |
Enumerations | |
| enum | SIO2_SOUND_FLAG { SIO2_SOUND_AUTOPLAY = ( 1 << 0 ), SIO2_SOUND_LOOP = ( 1 << 1 ), SIO2_SOUND_AMBIENT = ( 1 << 2 ), SIO2_SOUND_FX = ( 1 << 3 ), SIO2_SOUND_STREAM = ( 1 << 4 ) } |
Functions | |
| SIO2sound * | sio2SoundInit (char *) |
| SIO2sound * | sio2SoundFree (SIO2sound *) |
| void | sio2SoundGenId (SIO2sound *, SIO2soundbuffer *, unsigned int) |
| void | sio2SoundSetAmbient (SIO2sound *) |
| void | sio2SoundSetFx (SIO2sound *, vec3 *, float) |
| void | sio2SoundSetDefault (SIO2sound *) |
| void | sio2SoundPlay (SIO2sound *) |
| void | sio2SoundPause (SIO2sound *) |
| void | sio2SoundStop (SIO2sound *) |
| void | sio2SoundSetSpeed (SIO2sound *, float) |
| void | sio2SoundSetVolume (SIO2sound *, float) |
| void | sio2SoundRewind (SIO2sound *) |
| void | sio2SoundUpdateState (SIO2sound *) |
| void | sio2SoundUpdateStream (SIO2sound *) |
| enum SIO2_SOUND_FLAG |
Free a valid SIO2sound pointer, and remove its handle from the global sio2 SIO2resource handle.
_SIO2sound: A valid SIO2sound pointer.
return a NULL SIO2sound structure pointer.
References SIO2::_SIO2resource, SIO2sound::sid, sio2, SIO2_SOUND, sio2ErrorAL(), sio2ResourceDel(), and sio2SoundStop().
Referenced by sio2ObjectFree(), and sio2ResourceUnload().

| void sio2SoundGenId | ( | SIO2sound * | _SIO2sound, | |
| SIO2soundbuffer * | _SIO2soundbuffer, | |||
| unsigned int | _flags | |||
| ) |
Create a new SIO2sound source using the SIO2soundbuffer, this function will generate the OpenAL ID for the new sound source.
_SIO2sound: A valid SIO2sound pointer.
_SIO2soundbuffer: A valid SIO2soundbuffer to associate with the sound source.
_flags: The type of SIO2sound that we are about create.
References SIO2sound::_SIO2soundbuffer, SIO2soundbuffer::bid, SIO2sound::flags, SIO2sound::sid, SIO2_SOUND_BUFFER, SIO2_SOUND_STREAM, sio2ErrorAL(), sio2IsStateEnabled(), and sio2SoundSetDefault().
Referenced by sio2ObjectAddSound().

Create a new SIO2sound source, this new SIO2sound pointer will be added to the global sio2 SIO2resource handle.
_name: The name to use to associate the SIO2sound within the SIO2resource.
return a new SIO2sound structure pointer.
References SIO2::_SIO2resource, SIO2sound::name, sio2, SIO2_SOUND, sio2ResourceAdd(), and sio2StringCpy().
Referenced by sio2ObjectAddSound().

| void sio2SoundPause | ( | SIO2sound * | _SIO2sound | ) |
Pause an SIO2sound source.
_SIO2sound: A valid SIO2sound pointer.
References SIO2sound::sid, SIO2_PAUSE, sio2ErrorAL(), and SIO2sound::state.

| void sio2SoundPlay | ( | SIO2sound * | _SIO2sound | ) |
Start playing a SIO2sound source.
_SIO2sound: A valid SIO2sound pointer.
References SIO2sound::flags, SIO2sound::sid, SIO2_PLAY, SIO2_SOUND_LOOP, SIO2_SOUND_STREAM, sio2ErrorAL(), sio2IsStateEnabled(), and SIO2sound::state.
Referenced by sio2ObjectAddSound(), and sio2SoundUpdateStream().

| void sio2SoundRewind | ( | SIO2sound * | _SIO2sound | ) |
Rewind the sound source buffer back to its default playback position.
_SIO2sound: A valid SIO2sound pointer.
References SIO2sound::sid, and sio2ErrorAL().

| void sio2SoundSetAmbient | ( | SIO2sound * | _SIO2sound | ) |
Set the SIO2sound to be an ambient sound (not affected by distance).
_SIO2sound: A valid SIO2sound pointer after sio2SoundGenId have been called.
References SIO2sound::flags, SIO2_SOUND_AMBIENT, SIO2_SOUND_FX, sio2DisableState(), sio2EnableState(), sio2IsStateEnabled(), and sio2SoundSetDefault().

| void sio2SoundSetDefault | ( | SIO2sound * | _SIO2sound | ) |
Set the default OpenAL values for the SIO2sound.
_SIO2sound: A valid SIO2sound pointer after sio2SoundGenId have been called.
References SIO2sound::sid, and sio2ErrorAL().
Referenced by sio2SoundGenId(), and sio2SoundSetAmbient().

Set the SIO2sound to be a positional sound.
_SIO2sound: A valid SIO2sound pointer after sio2SoundGenId have been called.
_pos: The 3D position of the positional sound.
_rad: The radius of the positional sound.
References SIO2sound::flags, SIO2sound::sid, SIO2_SOUND_AMBIENT, SIO2_SOUND_FX, sio2DisableState(), sio2EnableState(), sio2ErrorAL(), sio2IsStateEnabled(), vec3::x, vec3::y, and vec3::z.
Referenced by sio2ObjectAddSound(), and sio2ObjectRender().

| void sio2SoundSetSpeed | ( | SIO2sound * | _SIO2sound, | |
| float | _speed | |||
| ) |
Set the playback speed of the current SIO2sound source.
_SIO2sound: A valid SIO2sound pointer.
_speed: A value from 0.0f to 1.0f that affect the speed of the playback.
References SIO2sound::sid, and sio2ErrorAL().

| void sio2SoundSetVolume | ( | SIO2sound * | _SIO2sound, | |
| float | _volume | |||
| ) |
Set the volume of the SIO2sound source.
_SIO2sound: A valid SIO2sound pointer.
_speed: A value from 0.0f to 1.0f that affect volume.
References SIO2sound::sid, and sio2ErrorAL().
Referenced by sio2ResourceSetAmbientVolume(), and sio2ResourceSetFxVolume().

| void sio2SoundStop | ( | SIO2sound * | _SIO2sound | ) |
Stop an SIO2sound source.
_SIO2sound: A valid SIO2sound pointer.
References SIO2sound::flags, SIO2sound::sid, SIO2_SOUND_STREAM, SIO2_STOP, sio2ErrorAL(), sio2IsStateEnabled(), and SIO2sound::state.
Referenced by sio2SoundFree(), and sio2SoundUpdateStream().

| void sio2SoundUpdateState | ( | SIO2sound * | _SIO2sound | ) |
Update the current state of the SIO2sound source.
This function translate OpenAL state value to SIO2 state value. The value of the SIO2sound->state can be one of the following value.
SIO2_PLAY
SIO2_PAUSE
SIO2_STOP
_SIO2sound: A valid SIO2sound pointer.
References SIO2sound::flags, SIO2sound::sid, SIO2_PAUSE, SIO2_PLAY, SIO2_SOUND_STREAM, SIO2_STOP, sio2ErrorAL(), sio2IsStateEnabled(), and SIO2sound::state.

| void sio2SoundUpdateStream | ( | SIO2sound * | _SIO2sound | ) |
Update the SIO2sound buffer queue, this function is called internally for SIO2sound that are tagged as SIO2_SIO2_STREAM. This function process the buffer queue and call the function to uncompress the next chunk of the stream. The chunk is uncompressed by the sio2SoundBufferStream function, for more info check the documentation on this function.
_SIO2sound: A valid SIO2sound pointer.
References SIO2sound::_SIO2soundbuffer, SIO2soundbuffer::_SIO2stream, SIO2soundbuffer::bid, SIO2soundbuffer::curr, SIO2sound::flags, SIO2stream::pos, SIO2sound::sid, SIO2_PLAY, SIO2_SOUND_BUFFER, SIO2_SOUND_LOOP, SIO2_SOUND_STREAM, sio2ErrorAL(), sio2IsStateEnabled(), sio2SoundBufferStream(), sio2SoundPlay(), sio2SoundStop(), and SIO2sound::state.
Referenced by sio2ResourceRender().

1.5.6