+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);
+}
+
+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_gain(float g)
+{
+ attribute(AL_GAIN, g);
+}
+
+void Source::set_rolloff_factor(float f)
+{
+ attribute(AL_ROLLOFF_FACTOR, f);
+}
+
+void Source::set_buffer(const Buffer &buffer)