X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsource.cpp;h=348b41e37cd6d98d12665a9cc6929b064a9db518;hb=abef5eab53c6c75cd602fdabdec94259d1523858;hp=137b785d131ac008b47f335edff6dc5abbb34cdc;hpb=97dae493948466867b9f661f45e451711dd6b41b;p=libs%2Fal.git diff --git a/source/source.cpp b/source/source.cpp index 137b785..348b41e 100644 --- a/source/source.cpp +++ b/source/source.cpp @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspal -Copyright © 2008 Mikko Rasa, Mikkosoft Productions +Copyright © 2008-2009 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -60,20 +60,6 @@ SourceState Source::get_state() const return static_cast(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); @@ -134,6 +120,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);