]> git.tdb.fi Git - libs/al.git/blobdiff - source/source.cpp
Drop copyright notices and Id tags from source files
[libs/al.git] / source / source.cpp
index 137b785d131ac008b47f335edff6dc5abbb34cdc..c4bb6f8e1a8d415f03b3cd401b1caa36b8d3649c 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspal
-Copyright © 2008 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include "buffer.h"
 #include "source.h"
 
@@ -60,20 +53,6 @@ SourceState Source::get_state() const
        return static_cast<SourceState>(state);
 }
 
-unsigned Source::get_buffers_queued() const
-{
-       int n;
-       get_attribute(AL_BUFFERS_QUEUED, &n);
-       return n;
-}
-
-unsigned Source::get_buffers_processed() const
-{
-       int n;
-       get_attribute(AL_BUFFERS_PROCESSED, &n);
-       return n;
-}
-
 void Source::set_position(float x, float y, float z)
 {
        attribute(AL_POSITION, x, y, z);
@@ -110,7 +89,7 @@ void Source::queue_buffers(const vector<const Buffer *> &buffers)
 
 void Source::queue_buffer(const Buffer &buffer)
 {
-       uint bid=buffer.get_id();
+       uint bid = buffer.get_id();
        alSourceQueueBuffers(id, 1, &bid);
 }
 
@@ -125,7 +104,7 @@ void Source::unqueue_buffers(const vector<const Buffer *> &buffers)
 
 void Source::unqueue_buffer(const Buffer &buffer)
 {
-       uint bid=buffer.get_id();
+       uint bid = buffer.get_id();
        alSourceUnqueueBuffers(id, 1, &bid);
 }
 
@@ -134,6 +113,20 @@ void Source::clear_buffers()
        attribute(AL_BUFFER, AL_NONE);
 }
 
+unsigned Source::get_buffers_queued() const
+{
+       int n = 0;
+       get_attribute(AL_BUFFERS_QUEUED, &n);
+       return n;
+}
+
+unsigned Source::get_buffers_processed() const
+{
+       int n = 0;
+       get_attribute(AL_BUFFERS_PROCESSED, &n);
+       return n;
+}
+
 void Source::play()
 {
        alSourcePlay(id);