Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 5c7e89116ca59ff84f95367b4d142064 > files > 13

alure-devel-1.0-5.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><title>Streaming - ALURE</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class=UnframedPage onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.35 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->

<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td class=MenuSection valign=top><!--START_ND_MENU--><div class=MTitle>ALURE<div class=MSubTitle>API Reference</div></div><div class=MEntry><div class=MFile><a href="alure-cpp.html">Main and Miscellanious</a></div></div><div class=MEntry><div class=MFile><a href="buffer-cpp.html">File Loading</a></div></div><div class=MEntry><div class=MFile id=MSelected>Streaming</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div></div></div></div><!--END_ND_MENU--></td>

<td class=ContentSection valign=top><div class=CSection id=MainTopic><div class=CTopic><h1 class=CTitle><a name="Streaming"></a>Streaming</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr><td class=SEntrySize><div class=SMain><div class=SEntry><a href="#Streaming" >Streaming</a></div></div></td><td class=SDescriptionSize><div class=SMain><div class=SDescription></div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#Functions" >Functions</a></div></div></div></td><td><div class=SGroup><div class=SDescription><div class=SIndent1></div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#alureCreateStreamFromFile" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">alureCreateStreamFromFile</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Opens a file and sets it up for streaming. </div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#alureCreateStreamFromMemory" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">alureCreateStreamFromMemory</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Opens a file image from memory and sets it up for streaming, similar to alureCreateStreamFromFile. </div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#alureCreateStreamFromStaticMemory" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">alureCreateStreamFromStaticMemory</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Identical to alureCreateStreamFromMemory, except the given memory is used directly and not duplicated. </div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#alureCreateStreamFromCallback" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">alureCreateStreamFromCallback</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Creates a stream using the specified callback to retrieve data. </div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#alureBufferDataFromStream" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">alureBufferDataFromStream</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Buffers the given buffer objects with the next chunks of data from the stream. </div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#alureRewindStream" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">alureRewindStream</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Rewinds the stream so that the next alureBufferDataFromStream call will restart from the beginning of the audio file.</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#alureDestroyStream" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">alureDestroyStream</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Closes an opened stream. </div></div></div></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class=CGroup><div class=CTopic><h3 class=CTitle><a name="Functions"></a>Functions</h3></div></div>

<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="alureCreateStreamFromFile"></a>alureCreateStreamFromFile</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters colspan=5>ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromFile(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap>const&nbsp;</td><td class=PType nowrap>ALchar&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>fname,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>chunkLength,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>numBufs,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>bufs</td></tr><tr><td class=PAfterParameters colspan=5>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Opens a file and sets it up for streaming.&nbsp; The given chunkLength is the number of bytes each buffer will fill with.&nbsp; 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.&nbsp; Requires an active context.</p><h4 class=CHeading>Returns</h4><p class=CParagraph>An opaque handle used to control the opened stream, or NULL on error.</p><h4 class=CHeading>See Also</h4><p class=CParagraph><a href="#alureCreateStreamFromMemory" class=LFunction id=link8 onMouseOver="ShowTip(event, 'tt2', 'link8')" onMouseOut="HideTip('tt2')">alureCreateStreamFromMemory</a>, <a href="#alureCreateStreamFromStaticMemory" class=LFunction id=link9 onMouseOver="ShowTip(event, 'tt3', 'link9')" onMouseOut="HideTip('tt3')">alureCreateStreamFromStaticMemory</a>, <a href="#alureCreateStreamFromCallback" class=LFunction id=link10 onMouseOver="ShowTip(event, 'tt4', 'link10')" onMouseOut="HideTip('tt4')">alureCreateStreamFromCallback</a>, <a href="#alureBufferDataFromStream" class=LFunction id=link11 onMouseOver="ShowTip(event, 'tt5', 'link11')" onMouseOut="HideTip('tt5')">alureBufferDataFromStream</a>, <a href="#alureRewindStream" class=LFunction id=link12 onMouseOver="ShowTip(event, 'tt6', 'link12')" onMouseOut="HideTip('tt6')">alureRewindStream</a>, <a href="#alureDestroyStream" class=LFunction id=link13 onMouseOver="ShowTip(event, 'tt7', 'link13')" onMouseOut="HideTip('tt7')">alureDestroyStream</a></p></div></div></div>

<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="alureCreateStreamFromMemory"></a>alureCreateStreamFromMemory</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters colspan=5>ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromMemory(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap>const&nbsp;</td><td class=PType nowrap>ALubyte&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>fdata,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>length,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>chunkLength,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>numBufs,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>bufs</td></tr><tr><td class=PAfterParameters colspan=5>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Opens a file image from memory and sets it up for streaming, similar to alureCreateStreamFromFile.&nbsp; The given data buffer can be safely deleted after calling this function.&nbsp; Requires an active context.</p><h4 class=CHeading>Returns</h4><p class=CParagraph>An opaque handle used to control the opened stream, or NULL on error.</p><h4 class=CHeading>See Also</h4><p class=CParagraph><a href="#alureCreateStreamFromFile" class=LFunction id=link14 onMouseOver="ShowTip(event, 'tt1', 'link14')" onMouseOut="HideTip('tt1')">alureCreateStreamFromFile</a>, <a href="#alureCreateStreamFromStaticMemory" class=LFunction id=link15 onMouseOver="ShowTip(event, 'tt3', 'link15')" onMouseOut="HideTip('tt3')">alureCreateStreamFromStaticMemory</a>, <a href="#alureCreateStreamFromCallback" class=LFunction id=link16 onMouseOver="ShowTip(event, 'tt4', 'link16')" onMouseOut="HideTip('tt4')">alureCreateStreamFromCallback</a>, <a href="#alureBufferDataFromStream" class=LFunction id=link17 onMouseOver="ShowTip(event, 'tt5', 'link17')" onMouseOut="HideTip('tt5')">alureBufferDataFromStream</a>, <a href="#alureRewindStream" class=LFunction id=link18 onMouseOver="ShowTip(event, 'tt6', 'link18')" onMouseOut="HideTip('tt6')">alureRewindStream</a>, <a href="#alureDestroyStream" class=LFunction id=link19 onMouseOver="ShowTip(event, 'tt7', 'link19')" onMouseOut="HideTip('tt7')">alureDestroyStream</a></p></div></div></div>

<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="alureCreateStreamFromStaticMemory"></a>alureCreateStreamFromStaticMemory</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters colspan=5>ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromStaticMemory(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap>const&nbsp;</td><td class=PType nowrap>ALubyte&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>fdata,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>length,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>chunkLength,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>numBufs,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>bufs</td></tr><tr><td class=PAfterParameters colspan=5>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Identical to alureCreateStreamFromMemory, except the given memory is used directly and not duplicated.&nbsp; As a consequence, the data buffer must remain valid while the stream is alive.&nbsp; Requires an active context.</p><h4 class=CHeading>Returns</h4><p class=CParagraph>An opaque handle used to control the opened stream, or NULL on error.</p><h4 class=CHeading>See Also</h4><p class=CParagraph><a href="#alureCreateStreamFromFile" class=LFunction id=link20 onMouseOver="ShowTip(event, 'tt1', 'link20')" onMouseOut="HideTip('tt1')">alureCreateStreamFromFile</a>, <a href="#alureCreateStreamFromMemory" class=LFunction id=link21 onMouseOver="ShowTip(event, 'tt2', 'link21')" onMouseOut="HideTip('tt2')">alureCreateStreamFromMemory</a>, <a href="#alureCreateStreamFromCallback" class=LFunction id=link22 onMouseOver="ShowTip(event, 'tt4', 'link22')" onMouseOut="HideTip('tt4')">alureCreateStreamFromCallback</a>, <a href="#alureBufferDataFromStream" class=LFunction id=link23 onMouseOver="ShowTip(event, 'tt5', 'link23')" onMouseOut="HideTip('tt5')">alureBufferDataFromStream</a>, <a href="#alureRewindStream" class=LFunction id=link24 onMouseOver="ShowTip(event, 'tt6', 'link24')" onMouseOut="HideTip('tt6')">alureRewindStream</a>, <a href="#alureDestroyStream" class=LFunction id=link25 onMouseOver="ShowTip(event, 'tt7', 'link25')" onMouseOut="HideTip('tt7')">alureDestroyStream</a></p></div></div></div>

<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="alureCreateStreamFromCallback"></a>alureCreateStreamFromCallback</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters colspan=4>ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromCallback(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>(*callback)(void *userdata, ALubyte *data, ALuint bytes),</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>void&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>userdata,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALenum&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>format,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>samplerate,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>chunkLength,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>numBufs,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>bufs</td></tr><tr><td class=PAfterParameters colspan=4>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Creates a stream using the specified callback to retrieve data.&nbsp; Requires an active context.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>callback</td><td class=CDLDescription>This is called when more data is needed from the stream.&nbsp; Up to the specified number of bytes should be written to the data pointer, and the number of bytes actually written should be returned.&nbsp; The number of bytes written must be block aligned for the format (eg. a multiple of 4 for AL_FORMAT_STEREO16), or an OpenAL error may occur during buffering.</td></tr><tr><td class=CDLEntry>userdata</td><td class=CDLDescription>A handle passed through to the callback.</td></tr><tr><td class=CDLEntry>format</td><td class=CDLDescription>The format of the data the callback will be giving.&nbsp; The format must be valid for the context.</td></tr><tr><td class=CDLEntry>samplerate</td><td class=CDLDescription>The sample rate (frequency) of the stream</td></tr></table><h4 class=CHeading>Returns</h4><p class=CParagraph>An opaque handle used to control the opened stream, or NULL on error.</p><h4 class=CHeading>See Also</h4><p class=CParagraph><a href="#alureCreateStreamFromFile" class=LFunction id=link26 onMouseOver="ShowTip(event, 'tt1', 'link26')" onMouseOut="HideTip('tt1')">alureCreateStreamFromFile</a>, <a href="#alureCreateStreamFromMemory" class=LFunction id=link27 onMouseOver="ShowTip(event, 'tt2', 'link27')" onMouseOut="HideTip('tt2')">alureCreateStreamFromMemory</a>, <a href="#alureCreateStreamFromStaticMemory" class=LFunction id=link28 onMouseOver="ShowTip(event, 'tt3', 'link28')" onMouseOut="HideTip('tt3')">alureCreateStreamFromStaticMemory</a>, <a href="#alureBufferDataFromStream" class=LFunction id=link29 onMouseOver="ShowTip(event, 'tt5', 'link29')" onMouseOut="HideTip('tt5')">alureBufferDataFromStream</a>, <a href="#alureRewindStream" class=LFunction id=link30 onMouseOver="ShowTip(event, 'tt6', 'link30')" onMouseOut="HideTip('tt6')">alureRewindStream</a>, <a href="#alureDestroyStream" class=LFunction id=link31 onMouseOver="ShowTip(event, 'tt7', 'link31')" onMouseOut="HideTip('tt7')">alureDestroyStream</a></p></div></div></div>

<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="alureBufferDataFromStream"></a>alureBufferDataFromStream</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>ALURE_API ALsizei ALURE_APIENTRY alureBufferDataFromStream(</td><td class=PType nowrap>alureStream&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>stream,</td></tr><tr><td></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>numBufs,</td></tr><tr><td></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>bufs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Buffers the given buffer objects with the next chunks of data from the stream.&nbsp; The given buffer objects do not need to be ones given by the alureCreateStreamFrom* functions.&nbsp; Requires an active context.</p><h4 class=CHeading>Returns</h4><p class=CParagraph>The number of buffers filled with new data, or -1 on error.&nbsp; If the value returned is less than the number requested, the end of the stream has been reached.</p><h4 class=CHeading>See Also</h4><p class=CParagraph><a href="#alureCreateStreamFromFile" class=LFunction id=link32 onMouseOver="ShowTip(event, 'tt1', 'link32')" onMouseOut="HideTip('tt1')">alureCreateStreamFromFile</a>, <a href="#alureCreateStreamFromMemory" class=LFunction id=link33 onMouseOver="ShowTip(event, 'tt2', 'link33')" onMouseOut="HideTip('tt2')">alureCreateStreamFromMemory</a>, <a href="#alureCreateStreamFromStaticMemory" class=LFunction id=link34 onMouseOver="ShowTip(event, 'tt3', 'link34')" onMouseOut="HideTip('tt3')">alureCreateStreamFromStaticMemory</a>, <a href="#alureCreateStreamFromCallback" class=LFunction id=link35 onMouseOver="ShowTip(event, 'tt4', 'link35')" onMouseOut="HideTip('tt4')">alureCreateStreamFromCallback</a>, <a href="#alureRewindStream" class=LFunction id=link36 onMouseOver="ShowTip(event, 'tt6', 'link36')" onMouseOut="HideTip('tt6')">alureRewindStream</a>, <a href="#alureDestroyStream" class=LFunction id=link37 onMouseOver="ShowTip(event, 'tt7', 'link37')" onMouseOut="HideTip('tt7')">alureDestroyStream</a></p></div></div></div>

<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="alureRewindStream"></a>alureRewindStream</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>ALURE_API ALboolean ALURE_APIENTRY alureRewindStream(</td><td class=PType nowrap>alureStream&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>stream</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Rewinds the stream so that the next alureBufferDataFromStream call will restart from the beginning of the audio file.</p><h4 class=CHeading>Returns</h4><p class=CParagraph>AL_FALSE on error.</p><h4 class=CHeading>See Also</h4><p class=CParagraph><a href="#alureCreateStreamFromFile" class=LFunction id=link38 onMouseOver="ShowTip(event, 'tt1', 'link38')" onMouseOut="HideTip('tt1')">alureCreateStreamFromFile</a>, <a href="#alureCreateStreamFromMemory" class=LFunction id=link39 onMouseOver="ShowTip(event, 'tt2', 'link39')" onMouseOut="HideTip('tt2')">alureCreateStreamFromMemory</a>, <a href="#alureCreateStreamFromStaticMemory" class=LFunction id=link40 onMouseOver="ShowTip(event, 'tt3', 'link40')" onMouseOut="HideTip('tt3')">alureCreateStreamFromStaticMemory</a>, <a href="#alureCreateStreamFromCallback" class=LFunction id=link41 onMouseOver="ShowTip(event, 'tt4', 'link41')" onMouseOut="HideTip('tt4')">alureCreateStreamFromCallback</a>, <a href="#alureBufferDataFromStream" class=LFunction id=link42 onMouseOver="ShowTip(event, 'tt5', 'link42')" onMouseOut="HideTip('tt5')">alureBufferDataFromStream</a>, <a href="#alureDestroyStream" class=LFunction id=link43 onMouseOver="ShowTip(event, 'tt7', 'link43')" onMouseOut="HideTip('tt7')">alureDestroyStream</a></p></div></div></div>

<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="alureDestroyStream"></a>alureDestroyStream</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>ALURE_API ALboolean ALURE_APIENTRY alureDestroyStream(</td><td class=PType nowrap>alureStream&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>stream,</td></tr><tr><td></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>numBufs,</td></tr><tr><td></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>bufs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Closes an opened stream.&nbsp; For convenience, it will also delete the given buffer objects.&nbsp; The given buffer objects do not need to be ones given by the alureCreateStreamFrom* functions.&nbsp; Requires an active context.</p><h4 class=CHeading>Returns</h4><p class=CParagraph>AL_FALSE on error.</p><h4 class=CHeading>See Also</h4><p class=CParagraph><a href="#alureCreateStreamFromFile" class=LFunction id=link44 onMouseOver="ShowTip(event, 'tt1', 'link44')" onMouseOut="HideTip('tt1')">alureCreateStreamFromFile</a>, <a href="#alureCreateStreamFromMemory" class=LFunction id=link45 onMouseOver="ShowTip(event, 'tt2', 'link45')" onMouseOut="HideTip('tt2')">alureCreateStreamFromMemory</a>, <a href="#alureCreateStreamFromStaticMemory" class=LFunction id=link46 onMouseOver="ShowTip(event, 'tt3', 'link46')" onMouseOut="HideTip('tt3')">alureCreateStreamFromStaticMemory</a>, <a href="#alureCreateStreamFromCallback" class=LFunction id=link47 onMouseOver="ShowTip(event, 'tt4', 'link47')" onMouseOut="HideTip('tt4')">alureCreateStreamFromCallback</a>, <a href="#alureBufferDataFromStream" class=LFunction id=link48 onMouseOver="ShowTip(event, 'tt5', 'link48')" onMouseOut="HideTip('tt5')">alureBufferDataFromStream</a>, <a href="#alureRewindStream" class=LFunction id=link49 onMouseOver="ShowTip(event, 'tt6', 'link49')" onMouseOut="HideTip('tt6')">alureRewindStream</a></p></div></div></div>

</td>

</tr></table><div class=Footer><!--START_ND_FOOTER-->Generated by <a href="http://www.naturaldocs.org">Natural Docs</a><!--END_ND_FOOTER--></div>
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters colspan=5>ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromFile(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap>const&nbsp;</td><td class=PType nowrap>ALchar&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>fname,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>chunkLength,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>numBufs,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>bufs</td></tr><tr><td class=PAfterParameters colspan=5>)</td></tr></table></td></tr></table></blockquote>Opens a file and sets it up for streaming. </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters colspan=5>ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromMemory(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap>const&nbsp;</td><td class=PType nowrap>ALubyte&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>fdata,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>length,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>chunkLength,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>numBufs,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>bufs</td></tr><tr><td class=PAfterParameters colspan=5>)</td></tr></table></td></tr></table></blockquote>Opens a file image from memory and sets it up for streaming, similar to alureCreateStreamFromFile. </div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters colspan=5>ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromStaticMemory(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap>const&nbsp;</td><td class=PType nowrap>ALubyte&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>fdata,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>length,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>chunkLength,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>numBufs,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PTypePrefix nowrap></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>bufs</td></tr><tr><td class=PAfterParameters colspan=5>)</td></tr></table></td></tr></table></blockquote>Identical to alureCreateStreamFromMemory, except the given memory is used directly and not duplicated. </div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters colspan=4>ALURE_API alureStream* ALURE_APIENTRY alureCreateStreamFromCallback(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>(*callback)(void *userdata, ALubyte *data, ALuint bytes),</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>void&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>userdata,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALenum&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>format,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>samplerate,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>chunkLength,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap width=100%>numBufs,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap width=100%>bufs</td></tr><tr><td class=PAfterParameters colspan=4>)</td></tr></table></td></tr></table></blockquote>Creates a stream using the specified callback to retrieve data. </div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>ALURE_API ALsizei ALURE_APIENTRY alureBufferDataFromStream(</td><td class=PType nowrap>alureStream&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>stream,</td></tr><tr><td></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>numBufs,</td></tr><tr><td></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>bufs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Buffers the given buffer objects with the next chunks of data from the stream. </div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>ALURE_API ALboolean ALURE_APIENTRY alureRewindStream(</td><td class=PType nowrap>alureStream&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>stream</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Rewinds the stream so that the next alureBufferDataFromStream call will restart from the beginning of the audio file.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>ALURE_API ALboolean ALURE_APIENTRY alureDestroyStream(</td><td class=PType nowrap>alureStream&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>stream,</td></tr><tr><td></td><td class=PType nowrap>ALsizei&nbsp;</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>numBufs,</td></tr><tr><td></td><td class=PType nowrap>ALuint&nbsp;</td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>bufs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Closes an opened stream. </div></div><!--END_ND_TOOLTIPS-->

<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>