ALURE API Reference Streaming |
StreamingSummary
alureCreateStreamFromFile
Opens a file and sets it up for streaming. The given chunkLength is the number of bytes each buffer will fill with. ALURE will optionally generate the specified number of buffer objects, fill them with the beginning of the data, then place the new IDs into the provided storage, before returning. Requires an active context. ReturnsAn opaque handle used to control the opened stream, or NULL on error. See AlsoalureCreateStreamFromMemory, alureCreateStreamFromStaticMemory, alureCreateStreamFromCallback, alureBufferDataFromStream, alureRewindStream, alureDestroyStream alureCreateStreamFromMemory
Opens a file image from memory and sets it up for streaming, similar to alureCreateStreamFromFile. The given data buffer can be safely deleted after calling this function. Requires an active context. ReturnsAn opaque handle used to control the opened stream, or NULL on error. See AlsoalureCreateStreamFromFile, alureCreateStreamFromStaticMemory, alureCreateStreamFromCallback, alureBufferDataFromStream, alureRewindStream, alureDestroyStream alureCreateStreamFromStaticMemory
Identical to alureCreateStreamFromMemory, except the given memory is used directly and not duplicated. As a consequence, the data buffer must remain valid while the stream is alive. Requires an active context. ReturnsAn opaque handle used to control the opened stream, or NULL on error. See AlsoalureCreateStreamFromFile, alureCreateStreamFromMemory, alureCreateStreamFromCallback, alureBufferDataFromStream, alureRewindStream, alureDestroyStream alureCreateStreamFromCallback
Creates a stream using the specified callback to retrieve data. Requires an active context. Parameters
ReturnsAn opaque handle used to control the opened stream, or NULL on error. See AlsoalureCreateStreamFromFile, alureCreateStreamFromMemory, alureCreateStreamFromStaticMemory, alureBufferDataFromStream, alureRewindStream, alureDestroyStream alureBufferDataFromStream
Buffers the given buffer objects with the next chunks of data from the stream. The given buffer objects do not need to be ones given by the alureCreateStreamFrom* functions. Requires an active context. ReturnsThe number of buffers filled with new data, or -1 on error. If the value returned is less than the number requested, the end of the stream has been reached. See AlsoalureCreateStreamFromFile, alureCreateStreamFromMemory, alureCreateStreamFromStaticMemory, alureCreateStreamFromCallback, alureRewindStream, alureDestroyStream alureRewindStream
Rewinds the stream so that the next alureBufferDataFromStream call will restart from the beginning of the audio file. ReturnsAL_FALSE on error. See AlsoalureCreateStreamFromFile, alureCreateStreamFromMemory, alureCreateStreamFromStaticMemory, alureCreateStreamFromCallback, alureBufferDataFromStream, alureDestroyStream alureDestroyStream
Closes an opened stream. For convenience, it will also delete the given buffer objects. The given buffer objects do not need to be ones given by the alureCreateStreamFrom* functions. Requires an active context. ReturnsAL_FALSE on error. See AlsoalureCreateStreamFromFile, alureCreateStreamFromMemory, alureCreateStreamFromStaticMemory, alureCreateStreamFromCallback, alureBufferDataFromStream, alureRewindStream |
Opens a file and sets it up for streaming.
ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromFile( const ALchar * fname, ALsizei chunkLength, ALsizei numBufs, ALuint * bufs )
Opens a file image from memory and sets it up for streaming, similar to alureCreateStreamFromFile.
ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromMemory( const ALubyte * fdata, ALuint length, ALsizei chunkLength, ALsizei numBufs, ALuint * bufs )
Identical to alureCreateStreamFromMemory, except the given memory is used directly and not duplicated.
ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromStaticMemory( const ALubyte * fdata, ALuint length, ALsizei chunkLength, ALsizei numBufs, ALuint * bufs )
Creates a stream using the specified callback to retrieve data.
ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromCallback( ALuint (*callback)(void *userdata, ALubyte *data, ALuint bytes), void * userdata, ALenum format, ALuint samplerate, ALsizei chunkLength, ALsizei numBufs, ALuint * bufs )
Buffers the given buffer objects with the next chunks of data from the stream.
ALURE_API ALsizei ALURE_APIENTRY alureBufferDataFromStream( alureStream * stream, ALsizei numBufs, ALuint * bufs )
Rewinds the stream so that the next alureBufferDataFromStream call will restart from the beginning of the audio file.
ALURE_API ALboolean ALURE_APIENTRY alureRewindStream( alureStream * stream )
Closes an opened stream.
ALURE_API ALboolean ALURE_APIENTRY alureDestroyStream( alureStream * stream, ALsizei numBufs, ALuint * bufs )