+void Source::unqueue_buffers(const vector<const Buffer *> &buffers)
+{
+ vector<uint> ids;
+ ids.reserve(buffers.size());
+ for(vector<const Buffer *>::const_iterator i=buffers.begin(); i!=buffers.end(); ++i)
+ ids.push_back((*i)->get_id());
+ alSourceUnqueueBuffers(id, ids.size(), &ids.front());
+}
+
+void Source::unqueue_buffer(const Buffer &buffer)
+{
+ uint bid = buffer.get_id();
+ alSourceUnqueueBuffers(id, 1, &bid);
+}
+
+void Source::clear_buffers()
+{
+ alSourcei(id, AL_BUFFER, AL_NONE);
+}
+
+unsigned Source::get_buffers_queued() const
+{
+ int n = 0;
+ alGetSourceiv(id, AL_BUFFERS_QUEUED, &n);
+ return n;
+}
+
+unsigned Source::get_buffers_processed() const
+{
+ int n = 0;
+ alGetSourceiv(id, AL_BUFFERS_PROCESSED, &n);
+ return n;
+}
+
+void Source::play()
+{
+ alSourcePlay(id);
+}
+
+void Source::pause()
+{
+ alSourcePause(id);
+}
+
+void Source::stop()
+{
+ alSourceStop(id);
+}
+
+void Source::rewind()
+{
+ alSourceRewind(id);
+}
+