Openal doesn't remove buffers unless they were disconnected form
their source.
sample->stop();
if ( !sample->is_queue() ) {
ALuint buffer = sample->get_buffer();
+ // disconnect buffer from its source - otherwise it cannot be deleted
+ alSourceUnqueueBuffers(sample->get_source(), 1, &buffer);
alDeleteBuffers( 1, &buffer );
testForALError("buffer remove");
}
/**
* Request to stop playing the refered audio sample.
* @param refname Reference name of the audio sample to stop
- * @return true if the audio sample exsists and is scheduled to stop
+ * @return true if the audio sample exists and is scheduled to stop
*/
bool stop( const string& refname );