+void Source::get_attribute(ALenum attr, int *v) const
+{
+ alGetSourcei(id, attr, v);
+}
+
+void Source::get_attribute(ALenum attr, float *v) const
+{
+ alGetSourcef(id, attr, v);
+}
+
+SourceState Source::get_state() const
+{
+ int state;
+ get_attribute(AL_SOURCE_STATE, &state);
+ 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);
+}
+
+void Source::set_looping(bool l)
+{
+ attribute(AL_LOOPING, l);
+}
+
+void Source::set_buffer(const Buffer &buffer)