X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsource.h;h=8de3d0284d109fe1b3524539937d655748e7055a;hb=635bc62fa1795f910b7e95aed6592856e17118d8;hp=df8bbc54c06310e91d430888a2aaddf5cedbad30;hpb=8e69eba7dc53233c169152bdf654f032fcd0629f;p=libs%2Fal.git diff --git a/source/source.h b/source/source.h index df8bbc5..8de3d02 100644 --- a/source/source.h +++ b/source/source.h @@ -1,15 +1,8 @@ -/* $Id$ - -This file is part of libmspal -Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_AL_SOURCE_H_ #define MSP_AL_SOURCE_H_ #include -#include +#include "al.h" #include "types.h" namespace Msp { @@ -25,6 +18,9 @@ enum SourceState STOPPED = AL_STOPPED }; +/** +Represents an audio source in the 3D environment. +*/ class Source { private: @@ -34,18 +30,22 @@ public: Source(); ~Source(); - void attribute(ALenum, int); - 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; SourceState get_state() const; void set_position(float, float, float); - void set_looping(bool); + void set_velocity(float, float, float); + 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();