X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsource.h;h=1426a805cad02e53990d23cd9929edd201fbe179;hb=32f20df0174d2872199f6b14d65e0f0d7556adaa;hp=29118c5ea0d6dd18d2b7abd82b2ae1862d305700;hpb=72a8ee9c7d0ff973b20a27184b0c493d3fd5ae59;p=libs%2Fal.git diff --git a/source/source.h b/source/source.h index 29118c5..1426a80 100644 --- a/source/source.h +++ b/source/source.h @@ -2,7 +2,7 @@ This file is part of libmspal Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Diestributed under the LGPL +Distributed under the LGPL */ #ifndef MSP_AL_SOURCE_H_ @@ -10,6 +10,7 @@ Diestributed under the LGPL #include #include +#include "types.h" namespace Msp { namespace AL { @@ -24,6 +25,9 @@ enum SourceState STOPPED = AL_STOPPED }; +/** +Represents an audio source in the 3D environment. +*/ class Source { private: @@ -37,14 +41,24 @@ public: void attribute(ALenum, float); void attribute(ALenum, float, float, float); void attribute(ALenum, const float *); - void get_attr(ALenum, int *) const; - void get_attr(ALenum, float *) const; + void get_attribute(ALenum, int *) const; + void get_attribute(ALenum, float *) const; + SourceState get_state() const; void set_position(float, float, float); - void set_looping(bool); + void set_gain(float); + + void set_rolloff_factor(float); void set_buffer(const Buffer &); void queue_buffers(const std::vector &); void queue_buffer(const Buffer &); + void unqueue_buffers(const std::vector &); + void unqueue_buffer(const Buffer &); + void clear_buffers(); + unsigned get_buffers_queued() const; + unsigned get_buffers_processed() const; + + void set_looping(bool); void play(); void pause(); void stop();