Browse Source

Audio: add search keywords for OpenAL functions.

pull/231/head
Vladimír Vondruš 8 years ago
parent
commit
e7d49be6f3
  1. 5
      doc/openal.dox
  2. 2
      src/Magnum/Audio/Audio.h
  3. 7
      src/Magnum/Audio/Buffer.h
  4. 25
      src/Magnum/Audio/Context.h
  5. 6
      src/Magnum/Audio/Listener.h
  6. 14
      src/Magnum/Audio/Playable.h
  7. 6
      src/Magnum/Audio/PlayableGroup.h
  8. 41
      src/Magnum/Audio/Renderer.h
  9. 123
      src/Magnum/Audio/Source.h

5
doc/openal.dox

@ -30,6 +30,11 @@ namespace Magnum {
@todo OpenAL mapping table @todo OpenAL mapping table
@m_div{m-note m-success} Note that you can also use the search functionality to
find out which OpenAL API corresponds to which Magnum function, class or enum
value. Just enter name of an OpenAL function or define into the search box.
@m_enddiv
State of implementation of particular OpenAL extensions is in the following State of implementation of particular OpenAL extensions is in the following
table. table.

2
src/Magnum/Audio/Audio.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Forward declarations for @ref Magnum::Audio namespace * @brief Forward declarations for the @ref Magnum::Audio namespace
*/ */
#include <Magnum/Magnum.h> #include <Magnum/Magnum.h>

7
src/Magnum/Audio/Buffer.h

@ -50,6 +50,7 @@ class Buffer {
* @note Multi-channel format is played without 3D spatialization * @note Multi-channel format is played without 3D spatialization
* (useful for background music) * (useful for background music)
* @see @ref setData() * @see @ref setData()
* @m_enum_values_as_keywords
*/ */
enum class Format: ALenum { enum class Format: ALenum {
Mono8 = AL_FORMAT_MONO8, /**< 8-bit unsigned mono */ Mono8 = AL_FORMAT_MONO8, /**< 8-bit unsigned mono */
@ -200,7 +201,7 @@ class Buffer {
* @brief Constructor * @brief Constructor
* *
* Creates OpenAL buffer object. * Creates OpenAL buffer object.
* @see @fn_al{GenBuffers} * @see @fn_al_keyword{GenBuffers}
*/ */
explicit Buffer() { alGenBuffers(1, &_id); } explicit Buffer() { alGenBuffers(1, &_id); }
@ -208,7 +209,7 @@ class Buffer {
* @brief Destructor * @brief Destructor
* *
* Deletes OpenAL buffer object. * Deletes OpenAL buffer object.
* @see @fn_al{DeleteBuffers} * @see @fn_al_keyword{DeleteBuffers}
*/ */
~Buffer() { if(_id) alDeleteBuffers(1, &_id); } ~Buffer() { if(_id) alDeleteBuffers(1, &_id); }
@ -234,7 +235,7 @@ class Buffer {
* @param frequency Frequency * @param frequency Frequency
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* @see @fn_al{BufferData} * @see @fn_al_keyword{BufferData}
*/ */
Buffer& setData(Format format, Containers::ArrayView<const void> data, ALsizei frequency) { Buffer& setData(Format format, Containers::ArrayView<const void> data, ALsizei frequency) {
alBufferData(_id, ALenum(format), data, data.size(), frequency); alBufferData(_id, ALenum(format), data, data.size(), frequency);

25
src/Magnum/Audio/Context.h

@ -87,6 +87,7 @@ class MAGNUM_AUDIO_EXPORT Context {
* @brief HRTF status * @brief HRTF status
* *
* @see @ref hrtfStatus(), @ref isHrtfEnabled() * @see @ref hrtfStatus(), @ref isHrtfEnabled()
* @m_enum_values_as_keywords
* @requires_al_extension Extension @alc_extension{SOFTX,HRTF} or * @requires_al_extension Extension @alc_extension{SOFTX,HRTF} or
* @alc_extension{SOFT,HRTF} * @alc_extension{SOFT,HRTF}
*/ */
@ -130,7 +131,7 @@ class MAGNUM_AUDIO_EXPORT Context {
* @brief All device specifier strings * @brief All device specifier strings
* *
* @see @ref deviceSpecifierString(), @ref Configuration::setDeviceSpecifier() * @see @ref deviceSpecifierString(), @ref Configuration::setDeviceSpecifier()
* @fn_al{GetString} with @def_alc{DEVICE_SPECIFIER} * @fn_alc{GetString} with @def_alc_keyword{DEVICE_SPECIFIER}
*/ */
static std::vector<std::string> deviceSpecifierStrings(); static std::vector<std::string> deviceSpecifierStrings();
@ -181,7 +182,7 @@ class MAGNUM_AUDIO_EXPORT Context {
* HRFTs may not be enabled/disabled in a running context. Instead * HRFTs may not be enabled/disabled in a running context. Instead
* create a new @ref Context with HRFTs enabled or disabled. * create a new @ref Context with HRFTs enabled or disabled.
* @see @ref hrtfStatus(), @ref Audio::Context::Configuration::setHrtf(), * @see @ref hrtfStatus(), @ref Audio::Context::Configuration::setHrtf(),
* @fn_alc{GetIntegerv} with @def_alc{HRTF_SOFT} * @fn_alc{GetIntegerv} with @def_alc_keyword{HRTF_SOFT}
* @requires_al_extension Extension @alc_extension{SOFTX,HRTF} or * @requires_al_extension Extension @alc_extension{SOFTX,HRTF} or
* @alc_extension{SOFT,HRTF} * @alc_extension{SOFT,HRTF}
*/ */
@ -191,7 +192,7 @@ class MAGNUM_AUDIO_EXPORT Context {
* @brief HRTF status * @brief HRTF status
* *
* @see @ref isHrtfEnabled(), @fn_alc{GetIntegerv} with * @see @ref isHrtfEnabled(), @fn_alc{GetIntegerv} with
* @def_alc{HRTF_STATUS_SOFT} * @def_alc_keyword{HRTF_STATUS_SOFT}
* @requires_al_extension Extension @alc_extension{SOFTX,HRTF} or * @requires_al_extension Extension @alc_extension{SOFTX,HRTF} or
* @alc_extension{SOFT,HRTF} * @alc_extension{SOFT,HRTF}
*/ */
@ -201,13 +202,13 @@ class MAGNUM_AUDIO_EXPORT Context {
* @brief HRTF specifier * @brief HRTF specifier
* *
* Name of the HRTF being used. * Name of the HRTF being used.
* @see @fn_al{GetString} with @def_alc{HRTF_SPECIFIER_SOFT} * @see @fn_al{GetString} with @def_alc_keyword{HRTF_SPECIFIER_SOFT}
* @requires_al_extension @alc_extension{SOFT,HRTF} * @requires_al_extension @alc_extension{SOFT,HRTF}
*/ */
std::string hrtfSpecifierString() const; std::string hrtfSpecifierString() const;
#ifdef MAGNUM_BUILD_DEPRECATED #ifdef MAGNUM_BUILD_DEPRECATED
/** @copybrief hrtfSpecifierString() /** @brief @copybrief hrtfSpecifierString()
* @deprecated Use @ref hrtfSpecifierString() instead. * @deprecated Use @ref hrtfSpecifierString() instead.
*/ */
CORRADE_DEPRECATED("use hrtfSpecifierString() instead") std::string hrtfSpecifier() const { return hrtfSpecifierString(); } CORRADE_DEPRECATED("use hrtfSpecifierString() instead") std::string hrtfSpecifier() const { return hrtfSpecifierString(); }
@ -217,7 +218,7 @@ class MAGNUM_AUDIO_EXPORT Context {
* @brief Device specifier string * @brief Device specifier string
* *
* @see @ref deviceSpecifierStrings(), @ref vendorString(), @ref rendererString(), * @see @ref deviceSpecifierStrings(), @ref vendorString(), @ref rendererString(),
* @fn_al{GetString} with @def_alc{DEVICE_SPECIFIER} * @fn_al{GetString} with @def_alc_keyword{DEVICE_SPECIFIER}
*/ */
std::string deviceSpecifierString() const; std::string deviceSpecifierString() const;
@ -225,7 +226,7 @@ class MAGNUM_AUDIO_EXPORT Context {
* @brief Vendor string * @brief Vendor string
* *
* @see @ref deviceSpecifierString(), @ref rendererString(), * @see @ref deviceSpecifierString(), @ref rendererString(),
* @fn_al{GetString} with @def_al{VENDOR} * @fn_al{GetString} with @def_al_keyword{VENDOR}
*/ */
std::string vendorString() const; std::string vendorString() const;
@ -233,14 +234,14 @@ class MAGNUM_AUDIO_EXPORT Context {
* @brief Renderer string * @brief Renderer string
* *
* @see @ref deviceSpecifierString(), @ref vendorString(), * @see @ref deviceSpecifierString(), @ref vendorString(),
* @fn_al{GetString} with @def_al{RENDERER} * @fn_al{GetString} with @def_al_keyword{RENDERER}
*/ */
std::string rendererString() const; std::string rendererString() const;
/** /**
* @brief Version string * @brief Version string
* *
* @see @fn_al{GetString} with @def_al{VERSION} * @see @fn_al{GetString} with @def_al_keyword{VERSION}
*/ */
std::string versionString() const; std::string versionString() const;
@ -252,9 +253,9 @@ class MAGNUM_AUDIO_EXPORT Context {
* reported by the driver (even those not supported by Magnum), see * reported by the driver (even those not supported by Magnum), see
* @ref supportedExtensions(), @ref Extension::extensions() or * @ref supportedExtensions(), @ref Extension::extensions() or
* @ref isExtensionSupported() for alternatives. * @ref isExtensionSupported() for alternatives.
* @see @fn_al{Get} with @def_al{NUM_EXTENSIONS}, @fn_al{GetString} * @see @fn_al{Get} with @def_al_keyword{NUM_EXTENSIONS},
* with @def_al{EXTENSIONS}, @fn_alc{GetString} with * @fn_al{GetString} with @def_al_keyword{EXTENSIONS},
* @def_alc{EXTENSIONS} * @fn_alc{GetString} with @def_alc_keyword{EXTENSIONS}
*/ */
std::vector<std::string> extensionStrings() const; std::vector<std::string> extensionStrings() const;

6
src/Magnum/Audio/Listener.h

@ -118,9 +118,9 @@ template <UnsignedInt dimensions> class Listener: public SceneGraph::AbstractFea
* @brief Constructor * @brief Constructor
* @param object Object this listener belongs to * @param object Object this listener belongs to
* *
* Creates a listener with a forward vector of `{0.0f, 0.0f, -1.0f}` * Creates a listener with a forward vector of @cpp {0.0f, 0.0f, -1.0f} @ce
* and up vector of `{0.0f, 1.0f, 0.0f}`. These vectors cannot be * and up vector of @cpp {0.0f, 1.0f, 0.0f} @ce. These vectors cannot
* changed, the listeners orientation and translation can be instead * be changed, the listeners orientation and translation can be instead
* affected by @p object or via @ref Listener::setSoundTransformation(). * affected by @p object or via @ref Listener::setSoundTransformation().
* @see @ref setGain() * @see @ref setGain()
*/ */

14
src/Magnum/Audio/Playable.h

@ -85,10 +85,10 @@ template<UnsignedInt dimensions> class Playable: public SceneGraph::AbstractGrou
* @param object Object this playable belongs to * @param object Object this playable belongs to
* @param group Group this playable belongs to * @param group Group this playable belongs to
* *
* Creates playable with a source and a forward vector of `{0.0f, -1.0f}` * Creates playable with a source and a forward vector of @cpp {0.0f, -1.0f} @ce
* for 2D and `{0.0f, 0.0f, -1.0f}` for 3D scenes. This forward vector * for 2D and @cpp {0.0f, 0.0f, -1.0f} @ce for 3D scenes. This forward
* cannot be changed, the sources orientation and translation can be * vector cannot be changed, the sources orientation and translation
* instead affected by `object` or via * can be instead affected by @p object or via
* @ref PlayableGroup::setSoundTransformation(). * @ref PlayableGroup::setSoundTransformation().
* @see @ref setGain(), @ref PlayableGroup::add() * @see @ref setGain(), @ref PlayableGroup::add()
*/ */
@ -116,8 +116,8 @@ template<UnsignedInt dimensions> class Playable: public SceneGraph::AbstractGrou
* @brief Set gain of the playable and source respecting the PlayableGroups gain * @brief Set gain of the playable and source respecting the PlayableGroups gain
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* The sources gain is computed as `sourceGain = playableGain*groupGain`. * The sources gain is computed as @cpp sourceGain = playableGain*groupGain @ce.
* Default for the playables gain is `1.0f`. * Default for the playables gain is @cpp 1.0f @ce.
* @see @ref PlayableGroup::setGain(), @ref Source::setGain() * @see @ref PlayableGroup::setGain(), @ref Source::setGain()
*/ */
Playable& setGain(const Float gain) { Playable& setGain(const Float gain) {
@ -129,7 +129,7 @@ template<UnsignedInt dimensions> class Playable: public SceneGraph::AbstractGrou
/** /**
* @brief Group containing this playable * @brief Group containing this playable
* *
* If the playable doesn't belong to any group, returns `nullptr`. * If the playable doesn't belong to any group, returns @cpp nullptr @ce.
*/ */
PlayableGroup<dimensions>* playables() { PlayableGroup<dimensions>* playables() {
return static_cast<PlayableGroup<dimensions>*>(this->group()); return static_cast<PlayableGroup<dimensions>*>(this->group());

6
src/Magnum/Audio/PlayableGroup.h

@ -126,12 +126,12 @@ template<UnsignedInt dimensions> class PlayableGroup: public SceneGraph::Feature
/** /**
* @brief Set gain for all sound sources of Playables in this group * @brief Set gain for all sound sources of Playables in this group
* @param gain Gain * @param gain Gain
* @return Reference to self (for method chaining)
* *
* Will calculate the sound sources gain relative to the gain of the * Will calculate the sound sources gain relative to the gain of the
* Playable and this playable group. The sources gain is computed as * Playable and this playable group. The sources gain is computed as
* `sourceGain = playableGain*groupGain`. Default of the groups gain * @cpp sourceGain = playableGain*groupGain @ce. Default of the groups
* is `1.0f`. * gain is @cpp 1.0f @ce.
* @return Reference to self (for method chaining)
*/ */
PlayableGroup& setGain(const Float gain) { PlayableGroup& setGain(const Float gain) {
_gain = gain; _gain = gain;

41
src/Magnum/Audio/Renderer.h

@ -66,7 +66,8 @@ class Renderer {
/** /**
* @brief Listener position * @brief Listener position
* @see @ref setListenerPosition(), @fn_al{GetListenerfv} with @def_al{POSITION} * @see @ref setListenerPosition(), @fn_al_keyword{GetListenerfv} with
* @def_al{POSITION}
*/ */
static Vector3 listenerPosition() { static Vector3 listenerPosition() {
Vector3 position; Vector3 position;
@ -78,14 +79,14 @@ class Renderer {
* @brief Set listener position * @brief Set listener position
* *
* Default is @cpp {0.0f, 0.0f, 0.0f} @ce. * Default is @cpp {0.0f, 0.0f, 0.0f} @ce.
* @see @fn_al{Listenerfv} with @def_al{POSITION} * @see @fn_al_keyword{Listenerfv} with @def_al{POSITION}
*/ */
static void setListenerPosition(const Vector3& position) { static void setListenerPosition(const Vector3& position) {
alListenerfv(AL_POSITION, position.data()); alListenerfv(AL_POSITION, position.data());
} }
/** @overload /** @overload
* @see @fn_al{Listeneriv} with @def_al{POSITION} * @see @fn_al_keyword{Listeneriv} with @def_al{POSITION}
*/ */
static void setListenerPosition(const Vector3i& position) { static void setListenerPosition(const Vector3i& position) {
alListeneriv(AL_POSITION, position.data()); alListeneriv(AL_POSITION, position.data());
@ -95,7 +96,8 @@ class Renderer {
* @brief Listener orientation * @brief Listener orientation
* *
* The returned array consists of forward (index 0) and up (index 1) vectors. * The returned array consists of forward (index 0) and up (index 1) vectors.
* @see @ref setListenerOrientation(), @fn_al{GetListenerfv} with @def_al{ORIENTATION} * @see @ref setListenerOrientation(), @fn_al_keyword{GetListenerfv}
* with @def_al{ORIENTATION}
*/ */
static std::array<Vector3, 2> listenerOrientation() { static std::array<Vector3, 2> listenerOrientation() {
std::array<Vector3, 2> data; std::array<Vector3, 2> data;
@ -108,7 +110,7 @@ class Renderer {
* *
* The values must be linearly independent and don't need to be * The values must be linearly independent and don't need to be
* normalized. Default is -Z and +Y. * normalized. Default is -Z and +Y.
* @see @fn_al{Listenerfv} with @def_al{ORIENTATION} * @see @fn_al_keyword{Listenerfv} with @def_al{ORIENTATION}
*/ */
static void setListenerOrientation(const Vector3& forward, const Vector3& up) { static void setListenerOrientation(const Vector3& forward, const Vector3& up) {
const Vector3 data[] = {forward, up}; const Vector3 data[] = {forward, up};
@ -116,7 +118,7 @@ class Renderer {
} }
/** @overload /** @overload
* @see @fn_al{Listeneriv} with @def_al{ORIENTATION} * @see @fn_al_keyword{Listeneriv} with @def_al{ORIENTATION}
*/ */
static void setListenerOrientation(const Vector3i& forward, const Vector3i& up) { static void setListenerOrientation(const Vector3i& forward, const Vector3i& up) {
const Vector3i data[] = {forward, up}; const Vector3i data[] = {forward, up};
@ -125,7 +127,8 @@ class Renderer {
/** /**
* @brief Listener position * @brief Listener position
* @see @ref setListenerVelocity(), @fn_al{GetListenerfv} with @def_al{VELOCITY} * @see @ref setListenerVelocity(), @fn_al_keyword{GetListenerfv} with
* @def_al{VELOCITY}
*/ */
static Vector3 listenerVelocity() { static Vector3 listenerVelocity() {
Vector3 velocity; Vector3 velocity;
@ -137,14 +140,14 @@ class Renderer {
* @brief Set listener velocity * @brief Set listener velocity
* *
* Default is @cpp {0.0f, 0.0f, 0.0f} @ce. * Default is @cpp {0.0f, 0.0f, 0.0f} @ce.
* @see @fn_al{Listenerfv} with @def_al{VELOCITY} * @see @fn_al_keyword{Listenerfv} with @def_al{VELOCITY}
*/ */
static void setListenerVelocity(const Vector3& velocity) { static void setListenerVelocity(const Vector3& velocity) {
alListenerfv(AL_VELOCITY, velocity.data()); alListenerfv(AL_VELOCITY, velocity.data());
} }
/** @overload /** @overload
* @see @fn_al{Listeneriv} with @def_al{VELOCITY} * @see @fn_al_keyword{Listeneriv} with @def_al{VELOCITY}
*/ */
static void setListenerVelocity(const Vector3i& velocity) { static void setListenerVelocity(const Vector3i& velocity) {
alListeneriv(AL_VELOCITY, velocity.data()); alListeneriv(AL_VELOCITY, velocity.data());
@ -184,7 +187,8 @@ class Renderer {
/** /**
* @brief Listener gain * @brief Listener gain
* @see @ref setListenerGain(), @fn_al{GetListenerf} with @def_al{GAIN} * @see @ref setListenerGain(), @fn_al_keyword{GetListenerf} with
* @def_al{GAIN}
*/ */
static Float listenerGain() { static Float listenerGain() {
Float gain; Float gain;
@ -197,7 +201,7 @@ class Renderer {
* *
* Default is @cpp 1.0f @ce, which means that the sound is * Default is @cpp 1.0f @ce, which means that the sound is
* unattenuated. If set to @cpp 0.0f @ce, all sound is muted. * unattenuated. If set to @cpp 0.0f @ce, all sound is muted.
* @see @fn_al{Listenerf} with @def_al{GAIN} * @see @fn_al_keyword{Listenerf} with @def_al{GAIN}
*/ */
static void setListenerGain(Float gain) { static void setListenerGain(Float gain) {
alListenerf(AL_GAIN, gain); alListenerf(AL_GAIN, gain);
@ -205,7 +209,8 @@ class Renderer {
/** /**
* @brief Doppler factor * @brief Doppler factor
* @see @ref setDopplerFactor(), @fn_al{GetFloat} with @def_al{DOPPLER_FACTOR} * @see @ref setDopplerFactor(), @fn_al{GetFloat} with
* @def_al_keyword{DOPPLER_FACTOR}
*/ */
static Float dopplerFactor() { static Float dopplerFactor() {
return alGetFloat(AL_DOPPLER_FACTOR); return alGetFloat(AL_DOPPLER_FACTOR);
@ -216,7 +221,7 @@ class Renderer {
* *
* Default is @cpp 1.0f @ce. If set to @cpp 0.0f @ce, the effect is * Default is @cpp 1.0f @ce. If set to @cpp 0.0f @ce, the effect is
* disabled. * disabled.
* @see @ref setSpeedOfSound(), @fn_al{DopplerFactor} * @see @ref setSpeedOfSound(), @fn_al_keyword{DopplerFactor}
*/ */
static void setDopplerFactor(Float factor) { static void setDopplerFactor(Float factor) {
alDopplerFactor(factor); alDopplerFactor(factor);
@ -224,7 +229,8 @@ class Renderer {
/** /**
* @brief Speed of sound * @brief Speed of sound
* @see @ref setSpeedOfSound(), @fn_al{GetFloat} with @def_al{SPEED_OF_SOUND} * @see @ref setSpeedOfSound(), @fn_al{GetFloat} with
* @def_al_keyword{SPEED_OF_SOUND}
*/ */
static Float speedOfSound() { static Float speedOfSound() {
return alGetFloat(AL_SPEED_OF_SOUND); return alGetFloat(AL_SPEED_OF_SOUND);
@ -234,7 +240,7 @@ class Renderer {
* @brief Set speed of sound * @brief Set speed of sound
* *
* Default is @cpp 343.3f @ce (meters per second). * Default is @cpp 343.3f @ce (meters per second).
* @see @ref setDopplerFactor(), @fn_al{SpeedOfSound} * @see @ref setDopplerFactor(), @fn_al_keyword{SpeedOfSound}
*/ */
static void setSpeedOfSound(Float speed) { static void setSpeedOfSound(Float speed) {
alSpeedOfSound(speed); alSpeedOfSound(speed);
@ -242,7 +248,8 @@ class Renderer {
/** /**
* @brief Distance model * @brief Distance model
* @see @ref setDistanceModel(), @fn_al{GetInteger} with @def_al{DISTANCE_MODEL} * @see @ref setDistanceModel(), @fn_al{GetInteger} with
* @def_al_keyword{DISTANCE_MODEL}
*/ */
static DistanceModel distanceModel() { static DistanceModel distanceModel() {
return DistanceModel(alGetInteger(AL_DISTANCE_MODEL)); return DistanceModel(alGetInteger(AL_DISTANCE_MODEL));
@ -252,7 +259,7 @@ class Renderer {
* @brief Set distance model * @brief Set distance model
* *
* Default is @ref DistanceModel::InverseClamped. * Default is @ref DistanceModel::InverseClamped.
* @see @fn_al{DistanceModel} * @see @fn_al_keyword{DistanceModel}
*/ */
static void setDistanceModel(DistanceModel model) { static void setDistanceModel(DistanceModel model) {
alDistanceModel(ALenum(model)); alDistanceModel(ALenum(model));

123
src/Magnum/Audio/Source.h

@ -54,7 +54,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @brief Constructor * @brief Constructor
* *
* Creates OpenAL source object. * Creates OpenAL source object.
* @see @fn_al{GenSources} * @see @fn_al_keyword{GenSources}
*/ */
explicit Source() { alGenSources(1, &_id); } explicit Source() { alGenSources(1, &_id); }
@ -62,7 +62,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @brief Destructor * @brief Destructor
* *
* Deletes OpenAL source object. * Deletes OpenAL source object.
* @see @fn_al{DeleteSources} * @see @fn_al_keyword{DeleteSources}
*/ */
~Source() { if(_id) alDeleteSources(1, &_id); } ~Source() { if(_id) alDeleteSources(1, &_id); }
@ -85,7 +85,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Position * @brief Position
* @see @fn_al{GetSourcefv} with @def_al{POSITION} * @see @fn_al_keyword{GetSourcefv} with @def_al{POSITION}
*/ */
Vector3 position() const { Vector3 position() const {
Vector3 v; Vector3 v;
@ -98,7 +98,8 @@ class MAGNUM_AUDIO_EXPORT Source {
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* Default is @cpp {0.0f, 0.0f, 0.0f} @ce. * Default is @cpp {0.0f, 0.0f, 0.0f} @ce.
* @see @ref setRelative(), @fn_al{Sourcefv} with @def_al{POSITION} * @see @ref setRelative(), @fn_al_keyword{Sourcefv} with
* @def_al{POSITION}
*/ */
Source& setPosition(const Vector3& position) { Source& setPosition(const Vector3& position) {
alSourcefv(_id, AL_POSITION, position.data()); alSourcefv(_id, AL_POSITION, position.data());
@ -106,7 +107,7 @@ class MAGNUM_AUDIO_EXPORT Source {
} }
/** @overload /** @overload
* @see @fn_al{Sourceiv} with @def_al{POSITION} * @see @fn_al_keyword{Sourceiv} with @def_al{POSITION}
*/ */
Source& setPosition(const Vector3i& position) { Source& setPosition(const Vector3i& position) {
alSourceiv(_id, AL_POSITION, position.data()); alSourceiv(_id, AL_POSITION, position.data());
@ -115,7 +116,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Velocity * @brief Velocity
* @see @fn_al{GetSourcefv} with @def_al{VELOCITY} * @see @fn_al_keyword{GetSourcefv} with @def_al{VELOCITY}
*/ */
Vector3 velocity() const { Vector3 velocity() const {
Vector3 v; Vector3 v;
@ -128,7 +129,8 @@ class MAGNUM_AUDIO_EXPORT Source {
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* Default is @cpp {0.0f, 0.0f, 0.0f} @ce. * Default is @cpp {0.0f, 0.0f, 0.0f} @ce.
* @see @ref setRelative(), @fn_al{Sourcefv} with @def_al{VELOCITY} * @see @ref setRelative(), @fn_al_keyword{Sourcefv} with
* @def_al{VELOCITY}
*/ */
Source& setVelocity(const Vector3& velocity) { Source& setVelocity(const Vector3& velocity) {
alSourcefv(_id, AL_VELOCITY, velocity.data()); alSourcefv(_id, AL_VELOCITY, velocity.data());
@ -136,7 +138,7 @@ class MAGNUM_AUDIO_EXPORT Source {
} }
/** @overload /** @overload
* @see @fn_al{Sourceiv} with @def_al{VELOCITY} * @see @fn_al_keyword{Sourceiv} with @def_al{VELOCITY}
*/ */
Source& setVelocity(const Vector3i& velocity) { Source& setVelocity(const Vector3i& velocity) {
alSourceiv(_id, AL_VELOCITY, velocity.data()); alSourceiv(_id, AL_VELOCITY, velocity.data());
@ -146,7 +148,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Whether the source is interpreted relative to the listener * @brief Whether the source is interpreted relative to the listener
* @see @ref position(), @ref direction(), @ref velocity(), * @see @ref position(), @ref direction(), @ref velocity(),
* @fn_al{GetSourcei} with @def_al{SOURCE_RELATIVE} * @fn_al_keyword{GetSourcei} with @def_al{SOURCE_RELATIVE}
*/ */
bool isRelative() const { bool isRelative() const {
Int relative; Int relative;
@ -160,7 +162,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* When enabled, source position, direction and velocity will be * When enabled, source position, direction and velocity will be
* interpreted relatively to listener. Default is @cpp false @ce. * interpreted relatively to listener. Default is @cpp false @ce.
* @see @ref setPosition(), @ref setDirection(), @ref setVelocity(), * @see @ref setPosition(), @ref setDirection(), @ref setVelocity(),
* @fn_al{Sourcei} with @def_al{SOURCE_RELATIVE} * @fn_al_keyword{Sourcei} with @def_al{SOURCE_RELATIVE}
*/ */
Source& setRelative(bool relative) { Source& setRelative(bool relative) {
alSourcei(_id, AL_SOURCE_RELATIVE, relative); alSourcei(_id, AL_SOURCE_RELATIVE, relative);
@ -173,7 +175,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Gain * @brief Gain
* @see @fn_al{GetSourcef} with @def_al{GAIN} * @see @fn_al_keyword{GetSourcef} with @def_al{GAIN}
*/ */
Float gain() const { Float gain() const {
Float gain; Float gain;
@ -187,8 +189,8 @@ class MAGNUM_AUDIO_EXPORT Source {
* *
* Default is @cpp 1.0f @ce, which means that the sound is * Default is @cpp 1.0f @ce, which means that the sound is
* unattenuated. If set to @cpp 0.0f @ce, the source is muted. * unattenuated. If set to @cpp 0.0f @ce, the source is muted.
* @see @ref setMinGain(), @ref setMaxGain(), @fn_al{Sourcef} with * @see @ref setMinGain(), @ref setMaxGain(), @fn_al_keyword{Sourcef}
* @def_al{GAIN} * with @def_al{GAIN}
*/ */
Source& setGain(Float gain) { Source& setGain(Float gain) {
alSourcef(_id, AL_GAIN, gain); alSourcef(_id, AL_GAIN, gain);
@ -198,7 +200,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Minimal gain to clamp to * @brief Minimal gain to clamp to
* @see @ref setMaxGain(), @ref setGain(), @ref maxGain(), * @see @ref setMaxGain(), @ref setGain(), @ref maxGain(),
* @ref gain(), @fn_al{GetSourcef} with @def_al{MIN_GAIN} * @ref gain(), @fn_al_keyword{GetSourcef} with @def_al{MIN_GAIN}
*/ */
Float minGain() const { Float minGain() const {
Float minGain; Float minGain;
@ -213,7 +215,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* If effective gain is lower than min gain, min gain is used. Note * If effective gain is lower than min gain, min gain is used. Note
* that this is done before listener gain is applied. Default is * that this is done before listener gain is applied. Default is
* @cpp 0.0f @ce. * @cpp 0.0f @ce.
* @see @ref setMaxGain(), @ref setGain(), @fn_al{Sourcef} with * @see @ref setMaxGain(), @ref setGain(), @fn_al_keyword{Sourcef} with
* @def_al{MIN_GAIN} * @def_al{MIN_GAIN}
*/ */
Source& setMinGain(Float gain) { Source& setMinGain(Float gain) {
@ -224,7 +226,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Maximal gain to clamp to * @brief Maximal gain to clamp to
* @see @ref setMinGain(), @ref setGain(), @ref maxGain(), * @see @ref setMinGain(), @ref setGain(), @ref maxGain(),
* @ref gain(), @fn_al{GetSourcef} with @def_al{MAX_GAIN} * @ref gain(), @fn_al_keyword{GetSourcef} with @def_al{MAX_GAIN}
*/ */
Float maxGain() const { Float maxGain() const {
Float maxGain; Float maxGain;
@ -239,7 +241,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* If effective gain is higher than max gain, max gain is used. Note * If effective gain is higher than max gain, max gain is used. Note
* that this is done before listener gain is applied. Default is * that this is done before listener gain is applied. Default is
* @cpp 1.0f @ce. If set to @cpp 0.0f @ce, the source is muted. * @cpp 1.0f @ce. If set to @cpp 0.0f @ce, the source is muted.
* @see @ref setMinGain(), @ref setGain(), @fn_al{Sourcef} with * @see @ref setMinGain(), @ref setGain(), @fn_al_keyword{Sourcef} with
* @def_al{MIN_GAIN} * @def_al{MIN_GAIN}
*/ */
Source& setMaxGain(Float gain) { Source& setMaxGain(Float gain) {
@ -249,7 +251,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Reference distance * @brief Reference distance
* @see @fn_al{GetSourcef} with @def_al{REFERENCE_DISTANCE} * @see @fn_al_keyword{GetSourcef} with @def_al{REFERENCE_DISTANCE}
*/ */
Float referenceDistance() const { Float referenceDistance() const {
Float distance; Float distance;
@ -264,7 +266,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* Default is @cpp 1.0f @ce. Distance at which the listener will * Default is @cpp 1.0f @ce. Distance at which the listener will
* experience @ref gain() (or @ref minGain(), @ref maxGain() * experience @ref gain() (or @ref minGain(), @ref maxGain()
* if gain was clamped). * if gain was clamped).
* @see @ref setRolloffFactor(), @fn_al{Sourcef} with * @see @ref setRolloffFactor(), @fn_al_keyword{Sourcef} with
* @def_al{REFERENCE_DISTANCE} * @def_al{REFERENCE_DISTANCE}
*/ */
Source& setReferenceDistance(Float distance) { Source& setReferenceDistance(Float distance) {
@ -273,7 +275,7 @@ class MAGNUM_AUDIO_EXPORT Source {
} }
/** @overload /** @overload
* @see @fn_al{Sourcei} with @def_al{REFERENCE_DISTANCE} * @see @fn_al_keyword{Sourcei} with @def_al{REFERENCE_DISTANCE}
*/ */
Source& setReferenceDistance(Int distance) { Source& setReferenceDistance(Int distance) {
alSourcei(_id, AL_REFERENCE_DISTANCE, distance); alSourcei(_id, AL_REFERENCE_DISTANCE, distance);
@ -282,7 +284,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Rolloff factor * @brief Rolloff factor
* @see @fn_al{GetSourcef} with @def_al{ROLLOFF_FACTOR} * @see @fn_al_keyword{GetSourcef} with @def_al{ROLLOFF_FACTOR}
*/ */
Float rolloffFactor() const { Float rolloffFactor() const {
Float factor; Float factor;
@ -295,7 +297,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* Default is @cpp 1.0f @ce. * Default is @cpp 1.0f @ce.
* @see @ref setReferenceDistance(), @fn_al{Sourcef} with * @see @ref setReferenceDistance(), @fn_al_keyword{Sourcef} with
* @def_al{ROLLOFF_FACTOR} * @def_al{ROLLOFF_FACTOR}
*/ */
Source& setRolloffFactor(Float factor) { Source& setRolloffFactor(Float factor) {
@ -304,7 +306,7 @@ class MAGNUM_AUDIO_EXPORT Source {
} }
/** @overload /** @overload
* @see @fn_al{Sourcei} with @def_al{ROLLOFF_FACTOR} * @see @fn_al_keyword{Sourcei} with @def_al{ROLLOFF_FACTOR}
*/ */
Source& setRolloffFactor(Int factor) { Source& setRolloffFactor(Int factor) {
alSourcei(_id, AL_ROLLOFF_FACTOR, factor); alSourcei(_id, AL_ROLLOFF_FACTOR, factor);
@ -313,7 +315,8 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Maximal distance to clamp to * @brief Maximal distance to clamp to
* @see @ref setRolloffFactor(), @fn_al{GetSourcef} with @def_al{MAX_DISTANCE} * @see @ref setRolloffFactor(), @fn_al_keyword{GetSourcef} with
* @def_al{MAX_DISTANCE}
*/ */
Float maxDistance() const { Float maxDistance() const {
Float distance; Float distance;
@ -326,7 +329,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* Default is max representable value. * Default is max representable value.
* @see @fn_al{Sourcef} with @def_al{MAX_DISTANCE} * @see @fn_al_keyword{Sourcef} with @def_al{MAX_DISTANCE}
*/ */
Source& setMaxDistance(Float distance) { Source& setMaxDistance(Float distance) {
alSourcef(_id, AL_MAX_DISTANCE, distance); alSourcef(_id, AL_MAX_DISTANCE, distance);
@ -334,7 +337,7 @@ class MAGNUM_AUDIO_EXPORT Source {
} }
/** @overload /** @overload
* @see @fn_al{Sourcei} with @def_al{MAX_DISTANCE} * @see @fn_al_keyword{Sourcei} with @def_al{MAX_DISTANCE}
*/ */
Source& setMaxDistance(Int distance) { Source& setMaxDistance(Int distance) {
alSourcei(_id, AL_MAX_DISTANCE, distance); alSourcei(_id, AL_MAX_DISTANCE, distance);
@ -343,7 +346,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Direction * @brief Direction
* @see @fn_al{GetSourcefv} with @def_al{DIRECTION} * @see @fn_al_keyword{GetSourcefv} with @def_al{DIRECTION}
*/ */
Vector3 direction() const { Vector3 direction() const {
Vector3 direction; Vector3 direction;
@ -358,7 +361,8 @@ class MAGNUM_AUDIO_EXPORT Source {
* Default is @cpp {0.0f, 0.0f, 0.0f} @ce, which means that the source * Default is @cpp {0.0f, 0.0f, 0.0f} @ce, which means that the source
* is not directional. * is not directional.
* @see @ref setInnerConeAngle(), @ref setOuterConeAngle(), * @see @ref setInnerConeAngle(), @ref setOuterConeAngle(),
* @ref setRelative(), @fn_al{Sourcefv} with @def_al{DIRECTION} * @ref setRelative(), @fn_al_keyword{Sourcefv} with
* @def_al{DIRECTION}
*/ */
Source& setDirection(const Vector3& direction) { Source& setDirection(const Vector3& direction) {
alSourcefv(_id, AL_DIRECTION, direction.data()); alSourcefv(_id, AL_DIRECTION, direction.data());
@ -366,7 +370,7 @@ class MAGNUM_AUDIO_EXPORT Source {
} }
/** @overload /** @overload
* @see @fn_al{Sourceiv} with @def_al{DIRECTION} * @see @fn_al_keyword{Sourceiv} with @def_al{DIRECTION}
*/ */
Source& setDirection(const Vector3i& direction) { Source& setDirection(const Vector3i& direction) {
alSourceiv(_id, AL_DIRECTION, direction.data()); alSourceiv(_id, AL_DIRECTION, direction.data());
@ -375,7 +379,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Inner cone angle * @brief Inner cone angle
* @see @fn_al{GetSourcef} with @def_al{CONE_INNER_ANGLE} * @see @fn_al_keyword{GetSourcef} with @def_al{CONE_INNER_ANGLE}
*/ */
Deg innerConeAngle() const { Deg innerConeAngle() const {
Float angle; Float angle;
@ -389,8 +393,8 @@ class MAGNUM_AUDIO_EXPORT Source {
* *
* Has effect only if the source is directional. Default is * Has effect only if the source is directional. Default is
* @cpp 360.0_degf @ce. * @cpp 360.0_degf @ce.
* @see @ref setOuterConeAngle(), @ref setDirection(), @fn_al{Sourcef} * @see @ref setOuterConeAngle(), @ref setDirection(),
* with @def_al{CONE_INNER_ANGLE} * @fn_al_keyword{Sourcef} with @def_al{CONE_INNER_ANGLE}
*/ */
Source& setInnerConeAngle(Deg angle) { Source& setInnerConeAngle(Deg angle) {
alSourcef(_id, AL_CONE_INNER_ANGLE, Float(angle)); alSourcef(_id, AL_CONE_INNER_ANGLE, Float(angle));
@ -399,7 +403,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Outer cone angle * @brief Outer cone angle
* @see @fn_al{GetSourcef} with @def_al{CONE_OUTER_ANGLE} * @see @fn_al_keyword{GetSourcef} with @def_al{CONE_OUTER_ANGLE}
*/ */
Deg outerConeAngle() const { Deg outerConeAngle() const {
Float angle; Float angle;
@ -414,7 +418,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* Has effect only if the source is directional. Default is * Has effect only if the source is directional. Default is
* @cpp 360.0_degf @ce. * @cpp 360.0_degf @ce.
* @see @ref setInnerConeAngle(), @ref setDirection(), * @see @ref setInnerConeAngle(), @ref setDirection(),
* @ref setOuterConeGain() @fn_al{Sourcef} with * @ref setOuterConeGain() @fn_al_keyword{Sourcef} with
* @def_al{CONE_OUTER_ANGLE} * @def_al{CONE_OUTER_ANGLE}
*/ */
Source& setOuterConeAngle(Deg angle) { Source& setOuterConeAngle(Deg angle) {
@ -424,7 +428,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Outer cone gain * @brief Outer cone gain
* @see @fn_al{GetSourcef} with @def_al{CONE_OUTER_GAIN} * @see @fn_al_keyword{GetSourcef} with @def_al{CONE_OUTER_GAIN}
*/ */
Float outerConeGain() const { Float outerConeGain() const {
Float gain; Float gain;
@ -438,8 +442,8 @@ class MAGNUM_AUDIO_EXPORT Source {
* *
* The factor with which the gain is multiplied outside the outer cone. * The factor with which the gain is multiplied outside the outer cone.
* Default is @cpp 0.0f @ce. * Default is @cpp 0.0f @ce.
* @see @ref setGain(), @ref setOuterConeAngle(), @fn_al{Sourcef} with * @see @ref setGain(), @ref setOuterConeAngle(),
* @def_al{CONE_OUTER_GAIN} * @fn_al_keyword{Sourcef} with @def_al{CONE_OUTER_GAIN}
*/ */
Source& setOuterConeGain(Float multiplier) { Source& setOuterConeGain(Float multiplier) {
alSourcef(_id, AL_CONE_OUTER_GAIN, multiplier); alSourcef(_id, AL_CONE_OUTER_GAIN, multiplier);
@ -448,7 +452,7 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Pitch * @brief Pitch
* @see @fn_al{GetSourcef} with @def_al{PITCH} * @see @fn_al_keyword{GetSourcef} with @def_al{PITCH}
*/ */
Float pitch() const { Float pitch() const {
Float pitch; Float pitch;
@ -461,7 +465,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* Default is @cpp 1.0f @ce. * Default is @cpp 1.0f @ce.
* @see @fn_al{Sourcef} with @def_al{PITCH} * @see @fn_al_keyword{Sourcef} with @def_al{PITCH}
*/ */
Source& setPitch(Float pitch) { Source& setPitch(Float pitch) {
alSourcef(_id, AL_PITCH, pitch); alSourcef(_id, AL_PITCH, pitch);
@ -486,19 +490,20 @@ class MAGNUM_AUDIO_EXPORT Source {
/** /**
* @brief Source type * @brief Source type
* *
* @see @ref setBuffer(), @fn_al{GetSourcei} with @def_al{SOURCE_TYPE} * @see @ref setBuffer(), @fn_al_keyword{GetSourcei} with
* @def_al{SOURCE_TYPE}
*/ */
Type type() const; Type type() const;
/** /**
* @brief Attach buffer * @brief Attach buffer
* @param buffer Buffer to attach or `nullptr` * @param buffer Buffer to attach or @cpp nullptr @ce
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* If an buffer is attached, changes source type to @ref Type::Static, * If an buffer is attached, changes source type to @ref Type::Static,
* if detached, changes source type to @ref Type::Undetermined. The * if detached, changes source type to @ref Type::Undetermined. The
* buffer must be already filled with data. * buffer must be already filled with data.
* @see @ref type(), @fn_al{Sourcei} with @def_al{BUFFER} * @see @ref type(), @fn_al_keyword{Sourcei} with @def_al{BUFFER}
*/ */
Source& setBuffer(Buffer* buffer); Source& setBuffer(Buffer* buffer);
@ -527,7 +532,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @see @ref play(), @ref pause(std::initializer_list<std::reference_wrapper<Source>>), * @see @ref play(), @ref pause(std::initializer_list<std::reference_wrapper<Source>>),
* @ref stop(std::initializer_list<std::reference_wrapper<Source>>), * @ref stop(std::initializer_list<std::reference_wrapper<Source>>),
* @ref rewind(std::initializer_list<std::reference_wrapper<Source>>), * @ref rewind(std::initializer_list<std::reference_wrapper<Source>>),
* @fn_al{SourcePlayv} * @fn_al_keyword{SourcePlayv}
*/ */
static void play(std::initializer_list<std::reference_wrapper<Source>> sources); static void play(std::initializer_list<std::reference_wrapper<Source>> sources);
static void play(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */ static void play(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */
@ -540,7 +545,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @see @ref pause(), @ref play(std::initializer_list<std::reference_wrapper<Source>>), * @see @ref pause(), @ref play(std::initializer_list<std::reference_wrapper<Source>>),
* @ref stop(std::initializer_list<std::reference_wrapper<Source>>), * @ref stop(std::initializer_list<std::reference_wrapper<Source>>),
* @ref rewind(std::initializer_list<std::reference_wrapper<Source>>), * @ref rewind(std::initializer_list<std::reference_wrapper<Source>>),
* @fn_al{SourcePausev} * @fn_al_keyword{SourcePausev}
*/ */
static void pause(std::initializer_list<std::reference_wrapper<Source>> sources); static void pause(std::initializer_list<std::reference_wrapper<Source>> sources);
static void pause(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */ static void pause(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */
@ -553,7 +558,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @see @ref stop(), @ref play(std::initializer_list<std::reference_wrapper<Source>>), * @see @ref stop(), @ref play(std::initializer_list<std::reference_wrapper<Source>>),
* @ref pause(std::initializer_list<std::reference_wrapper<Source>>), * @ref pause(std::initializer_list<std::reference_wrapper<Source>>),
* @ref rewind(std::initializer_list<std::reference_wrapper<Source>>), * @ref rewind(std::initializer_list<std::reference_wrapper<Source>>),
* @fn_al{SourceStopv} * @fn_al_keyword{SourceStopv}
*/ */
static void stop(std::initializer_list<std::reference_wrapper<Source>> sources); static void stop(std::initializer_list<std::reference_wrapper<Source>> sources);
static void stop(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */ static void stop(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */
@ -566,7 +571,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @see @ref rewind(), @ref play(std::initializer_list<std::reference_wrapper<Source>>), * @see @ref rewind(), @ref play(std::initializer_list<std::reference_wrapper<Source>>),
* @ref pause(std::initializer_list<std::reference_wrapper<Source>>), * @ref pause(std::initializer_list<std::reference_wrapper<Source>>),
* @ref stop(std::initializer_list<std::reference_wrapper<Source>>), * @ref stop(std::initializer_list<std::reference_wrapper<Source>>),
* @fn_al{SourceRewindv} * @fn_al_keyword{SourceRewindv}
*/ */
static void rewind(std::initializer_list<std::reference_wrapper<Source>> sources); static void rewind(std::initializer_list<std::reference_wrapper<Source>> sources);
static void rewind(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */ static void rewind(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */
@ -575,7 +580,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @brief State * @brief State
* *
* @see @ref play(), @ref pause(), @ref stop(), @ref rewind(), * @see @ref play(), @ref pause(), @ref stop(), @ref rewind(),
* @fn_al{GetSourcei} with @def_al{SOURCE_STATE} * @fn_al_keyword{GetSourcei} with @def_al{SOURCE_STATE}
*/ */
State state() const; State state() const;
@ -584,7 +589,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* *
* @see @ref play(std::initializer_list<std::reference_wrapper<Source>>), * @see @ref play(std::initializer_list<std::reference_wrapper<Source>>),
* @ref state(), @ref pause(), @ref stop(), @ref rewind(), * @ref state(), @ref pause(), @ref stop(), @ref rewind(),
* @fn_al{SourcePlay} * @fn_al_keyword{SourcePlay}
*/ */
void play() { alSourcePlay(_id); } void play() { alSourcePlay(_id); }
@ -593,7 +598,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* *
* @see @ref pause(std::initializer_list<std::reference_wrapper<Source>>), * @see @ref pause(std::initializer_list<std::reference_wrapper<Source>>),
* @ref state(), @ref play(), @ref stop(), @ref rewind(), * @ref state(), @ref play(), @ref stop(), @ref rewind(),
* @fn_al{SourcePause} * @fn_al_keyword{SourcePause}
*/ */
void pause() { alSourcePause(_id); } void pause() { alSourcePause(_id); }
@ -602,7 +607,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* *
* @see @ref stop(std::initializer_list<std::reference_wrapper<Source>>), * @see @ref stop(std::initializer_list<std::reference_wrapper<Source>>),
* @ref state(), @ref play(), @ref pause(), @ref rewind(), * @ref state(), @ref play(), @ref pause(), @ref rewind(),
* @fn_al{SourceStop} * @fn_al_keyword{SourceStop}
*/ */
void stop() { alSourceStop(_id); } void stop() { alSourceStop(_id); }
@ -611,14 +616,14 @@ class MAGNUM_AUDIO_EXPORT Source {
* *
* @see @ref rewind(std::initializer_list<std::reference_wrapper<Source>>), * @see @ref rewind(std::initializer_list<std::reference_wrapper<Source>>),
* @ref state(), @ref play(), @ref pause(), @ref stop(), * @ref state(), @ref play(), @ref pause(), @ref stop(),
* @fn_al{SourceRewind} * @fn_al_keyword{SourceRewind}
*/ */
void rewind() { alSourceRewind(_id); } void rewind() { alSourceRewind(_id); }
/** /**
* @brief Whether the source is looping * @brief Whether the source is looping
* *
* @see @fn_al{GetSourcei} with @def_al{LOOPING} * @see @fn_al_keyword{GetSourcei} with @def_al{LOOPING}
*/ */
bool isLooping() const; bool isLooping() const;
@ -627,7 +632,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* Default is @cpp false @ce. * Default is @cpp false @ce.
* @see @fn_al{Sourcei} with @def_al{LOOPING} * @see @fn_al_keyword{Sourcei} with @def_al{LOOPING}
*/ */
Source& setLooping(bool loop) { Source& setLooping(bool loop) {
alSourcei(_id, AL_LOOPING, loop); alSourcei(_id, AL_LOOPING, loop);
@ -638,7 +643,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @brief Offset in seconds * @brief Offset in seconds
* *
* @see @ref offsetInBytes(), @ref offsetInSamples(), * @see @ref offsetInBytes(), @ref offsetInSamples(),
* @fn_al{GetSourcef} with @def_al{SEC_OFFSET} * @fn_al_keyword{GetSourcef} with @def_al{SEC_OFFSET}
*/ */
Float offsetInSeconds() const; Float offsetInSeconds() const;
@ -647,7 +652,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* @see @ref setOffsetInBytes(), @ref setOffsetInSamples(), * @see @ref setOffsetInBytes(), @ref setOffsetInSamples(),
* @fn_al{Sourcef} with @def_al{SEC_OFFSET} * @fn_al_keyword{Sourcef} with @def_al{SEC_OFFSET}
*/ */
Source& setOffsetInSeconds(Float offset) { Source& setOffsetInSeconds(Float offset) {
alSourcef(_id, AL_SEC_OFFSET, offset); alSourcef(_id, AL_SEC_OFFSET, offset);
@ -658,7 +663,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @brief Offset in bytes * @brief Offset in bytes
* *
* @see @ref offsetInSeconds(), @ref offsetInSamples(), * @see @ref offsetInSeconds(), @ref offsetInSamples(),
* @fn_al{GetSourcei} with @def_al{BYTE_OFFSET} * @fn_al_keyword{GetSourcei} with @def_al{BYTE_OFFSET}
*/ */
Int offsetInBytes() const; Int offsetInBytes() const;
@ -667,7 +672,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* @see @ref setOffsetInSeconds(), @ref setOffsetInSamples(), * @see @ref setOffsetInSeconds(), @ref setOffsetInSamples(),
* @fn_al{Sourcei} with @def_al{SEC_OFFSET} * @fn_al_keyword{Sourcei} with @def_al{SEC_OFFSET}
*/ */
Source& setOffsetInBytes(Int offset) { Source& setOffsetInBytes(Int offset) {
alSourcei(_id, AL_BYTE_OFFSET, offset); alSourcei(_id, AL_BYTE_OFFSET, offset);
@ -678,7 +683,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @brief Offset in samples * @brief Offset in samples
* *
* @see @ref offsetInSeconds(), @ref offsetInBytes(), * @see @ref offsetInSeconds(), @ref offsetInBytes(),
* @fn_al{GetSourcei} with @def_al{SAMPLE_OFFSET} * @fn_al_keyword{GetSourcei} with @def_al{SAMPLE_OFFSET}
*/ */
Int offsetInSamples() const; Int offsetInSamples() const;
@ -687,7 +692,7 @@ class MAGNUM_AUDIO_EXPORT Source {
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* @see @ref setOffsetInSeconds(), @ref setOffsetInBytes(), * @see @ref setOffsetInSeconds(), @ref setOffsetInBytes(),
* @fn_al{Sourcei} with @def_al{SEC_OFFSET} * @fn_al_keyword{Sourcei} with @def_al{SEC_OFFSET}
*/ */
Source& setOffsetInSamples(Int offset) { Source& setOffsetInSamples(Int offset) {
alSourcei(_id, AL_SAMPLE_OFFSET, offset); alSourcei(_id, AL_SAMPLE_OFFSET, offset);

Loading…
Cancel
Save