sio2_soundbuffer.h File Reference

#include "vorbisfile.h"

Include dependency graph for sio2_soundbuffer.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SIO2soundbuffer

Functions

SIO2soundbuffersio2SoundBufferInit (char *)
SIO2soundbuffersio2SoundBufferFree (SIO2soundbuffer *)
void sio2SoundBufferLoad (SIO2soundbuffer *, SIO2stream *)
SIO2streamsio2SoundBufferGenId (SIO2soundbuffer *, unsigned char)
unsigned char sio2SoundBufferStream (SIO2soundbuffer *, unsigned int)


Function Documentation

SIO2soundbuffer* sio2SoundBufferFree ( SIO2soundbuffer _SIO2soundbuffer  ) 

Free a valid SIO2soundbuffer pointer, and remove its handle from the global sio2 SIO2soundbuffer handle. The OpenAL ID will also be deleted at the same time.

_SIO2image: A valid SIO2soundbuffer pointer.

return a NULL SIO2soundbuffer structure pointer.

References SIO2soundbuffer::_OggVorbis_File, SIO2::_SIO2resource, SIO2soundbuffer::_SIO2stream, SIO2soundbuffer::bid, sio2, SIO2_SOUND_BUFFER, SIO2_SOUNDBUFFER, sio2ErrorAL(), sio2OggClose(), sio2ResourceDel(), and sio2StreamClose().

Referenced by sio2ResourceUnload().

Here is the call graph for this function:

SIO2stream* sio2SoundBufferGenId ( SIO2soundbuffer _SIO2soundbuffer,
unsigned char  _streamed 
)

Generate the SIO2soundbuffer OpenAL ID. In the case of a non buffered stream the SIO2stream will be flushed as it it will be transfered to OpenAL. If streamed, the buffer will stay alive in memory in order for the SIO2soundbuffer to be able to stream the chunks from it, and decompress them in realtime.

_SIO2soundbuffer: A valid SIO2soundbuffer. _streamed: 1 or 0 if the SIO2soundbuffer have to be buffered and streamed in realtime.

References SIO2soundbuffer::_OggVorbis_File, SIO2::_ov_callbacks, SIO2soundbuffer::_SIO2stream, SIO2soundbuffer::bid, SIO2soundbuffer::data, SIO2soundbuffer::format, SIO2soundbuffer::rate, sio2, SIO2_SOUND_BUFFER, SIO2_SOUND_BUFFER_SIZE, sio2ErrorAL(), sio2OggClose(), sio2SoundBufferStream(), sio2StreamClose(), and SIO2soundbuffer::size.

Referenced by sio2ResourceGenId().

Here is the call graph for this function:

SIO2soundbuffer* sio2SoundBufferInit ( char _name  ) 

Create a new SIO2soundbuffer, this new SIO2soundbuffer pointer will be added to the global sio2 SIO2resource handle.

_name: The name to use to associate the SIO2soundbuffer within the SIO2resource.

return a new SIO2soundbuffer structure pointer.

References SIO2::_SIO2resource, SIO2soundbuffer::name, sio2, SIO2_SOUNDBUFFER, sio2ResourceAdd(), and sio2StringCpy().

Referenced by sio2ResourceDispatchStream().

Here is the call graph for this function:

void sio2SoundBufferLoad ( SIO2soundbuffer _SIO2soundbuffer,
SIO2stream _SIO2stream 
)

Link the SIO2stream to the SIO2soundbuffer. It is necessary for either transfer the data to OpenAL or keep the SIO2stream buffer alive in order to stream and decompress the stream in realtime.

_SIO2soundbuffer: A valid SIO2soundbuffer pointer.
_SIO2stream: An SIO2stream in memory that contain the compressed OGG data.

References SIO2soundbuffer::_SIO2stream.

Referenced by sio2ResourceDispatchStream().

unsigned char sio2SoundBufferStream ( SIO2soundbuffer _SIO2soundbuffer,
unsigned int  _buffer 
)

Decompress a chunk of the OGG vorbis stream and store it in the OpenAL buffer ID. Please take note that the mechanism calling this function is internal and there's no need for the programmer to call it manually in any type of scenario.

_SIO2soundbuffer: A valid SIO2soundbuffer. _buffer: A valid OpenAL buffer ID.

References SIO2soundbuffer::_OggVorbis_File, SIO2soundbuffer::format, SIO2soundbuffer::rate, SIO2_SOUND_BUFFER_SIZE, and sio2ErrorAL().

Referenced by sio2SoundBufferGenId(), and sio2SoundUpdateStream().

Here is the call graph for this function:


Generated on Thu Mar 4 15:41:50 2010 for SIO2 Engine by  doxygen 1.5.6