<!-- clanlib header begin --> <HTML> <HEAD> <TITLE>CL_SoundBuffer_Session - ClanLib Game SDK</TITLE> <STYLE TYPE="text/css"><!-- HTML BODY { font-family: verdana, helvetica, sans-serif; font-size: 12px; } H1 { font-size: 22px; } H2 { font-size: 18px; } H3 { font-size: 16px; } H4 { font-size: 14px; } P { font-size: 12px; } LI { font-size: 12px; } --></STYLE> </HEAD> <body bgcolor=white text=black link=blue vlink=#800080> <center> <img src="http://clanlib.org/gfx/clanlib.png"> </center> <!-- clanlib header end --> <center> <p> <a href="http://clanlib.org/docs.html">Home</a> | <a href="classes.html">All Classes</a> | <a href="modules.html">Grouped Classes</a> | <a href="index.html">Index</a> | <a href="search.html">Search</a> </p> </center> <h1>Class CL_SoundBuffer_Session</h1> <p> CL_SoundBuffer_Session provides control over a playing soundeffect. <a href="#description">More...</a></p> <p>Derived from: <i>none</i> <br> Derived by: <i>none</i> <br>Group: Sound (Audio Mixing)</p> <p> #include <ClanLib/sound.h> <p> <table border=0 width=100%> </table> <p><b>Construction:</b></p> <table border=0 width=100%> <tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__CL_SoundBuffer_Session.html">CL_SoundBuffer_Session</a></p></td><td valign=top><p> Creates a soundbuffer session.</p></td></tr></table> <p><b>Attributes:</b></p> <table border=0 width=100%> <tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__get_position.html">get_position</a></p></td><td valign=top><p> Returns the current sample position of the playback.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__get_position_relative.html">get_position_relative</a></p></td><td valign=top><p> Returns the sample position relative to the full length.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__get_length.html">get_length</a></p></td><td valign=top><p> Returns the total length (in samples) of the sound buffer played.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__get_frequency.html">get_frequency</a></p></td><td valign=top><p> Returns the frequency of the session.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__get_volume.html">get_volume</a></p></td><td valign=top><p> Returns the linear relative volume of the soundeffect.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__get_pan.html">get_pan</a></p></td><td valign=top><p> Returns the current pan (in a measure from -1 -> 1).</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__get_speedfactor.html">get_speedfactor</a></p></td><td valign=top><p> Returns the current speedfactor.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__is_playing.html">is_playing</a></p></td><td valign=top><p> Returns true if the session is playing</p></td></tr></table> <p><b>Operations:</b></p> <table border=0 width=100%> <tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__set_position.html">set_position</a></p></td><td valign=top><p> Sets the session position to 'new_pos'.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__set_position_relative.html">set_position_relative</a></p></td><td valign=top><p> Sets the relative position of the session.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__set_frequency.html">set_frequency</a></p></td><td valign=top><p> Sets the frequency of the session.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__set_volume.html">set_volume</a></p></td><td valign=top><p> Sets the volume of the session in a relative measure (0->1)</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__set_pan.html">set_pan</a></p></td><td valign=top><p> Sets the panning of the session played in measures from -1 -> 1</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__set_speedfactor.html">set_speedfactor</a></p></td><td valign=top><p> Sets the speedfactor of the session.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__play.html">play</a></p></td><td valign=top><p> Starts playback of the session.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__stop.html">stop</a></p></td><td valign=top><p> Stops playback of the session.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__rewind.html">rewind</a></p></td><td valign=top><p> Rewinds the session so playback will start from the beginning.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__set_looping.html">set_looping</a></p></td><td valign=top><p> Determines whether this session should loop</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__add_filter.html">add_filter</a></p></td><td valign=top><p> Adds the sound filter to the session. See CL_SoundFilter for details.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__remove_filter.html">remove_filter</a></p></td><td valign=top><p> Remove the sound filter from the session. See CL_SoundFilter for details.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_SoundBuffer_Session__remove_all_filters.html">remove_all_filters</a></p></td><td valign=top><p> Removes all filters from the session.</p></td></tr></table> <a name="#description"><p><b>Detailed description:</b></p> !group=Sound/Audio Mixing! !header=sound.h! <p>Whenever a soundbuffer is played, it returns a CL_SoundBuffer_Session class, which can be used to control the sound (its volume, pitch, pan, position). It can also be used to retrigger the sound or to stop it.</p> <!-- clanlib footer begin --> <center><br><br><font color="#a0a0a0"> Questions or comments, write to the <a href="http://clanlib.org/contact.html">ClanLib mailing list</a>. </font></center> </body> </html> <!-- clanlib footer end -->