Magnum::Audio::Context::Configuration class

OpenAL context configuration.

Public types

enum class Hrtf: Byte { Default = 0, Enabled = 1, Disabled = 2 }
HRTF configuration.

Public functions

auto deviceSpecifier() const -> const std::string&
Device specifier.
auto setDeviceSpecifier(const std::string& specifier) -> Configuration&
Set device specifier.
auto setDeviceSpecifier(std::string&& specifier) -> Configuration&
auto frequency() const -> Int
Sampling rate in Hz.
auto setFrequency(Int hz) -> Configuration&
Set sampling rate.
auto hrtf() const -> Hrtf
HRTF configuration.
auto setHrtf(Hrtf hrtf) -> Configuration&
Set HRTF configuration.
auto monoSourceCount() const -> Int
Hint for how many mono sources to support.
auto setMonoSourceCount(Int count) -> Configuration&
Set hint for how many mono sources to support.
auto stereoSourceCount() const -> Int
Hint for how many stereo sources to support.
auto setStereoSourceCount(Int count) -> Configuration&
Set hint for how many stereo sources to support.
auto refreshRate() const -> Int
Refresh rate in Hz.
auto setRefreshRate(Int hz) -> Configuration&
Set refresh rate.

Enum documentation

enum class Magnum::Audio::Context::Configuration::Hrtf: Byte

HRTF configuration.

Enumerators
Default

Default behavior depending on local OpenAL configuration

Enabled

Eabled

Disabled

Disabled

Function documentation

Configuration& Magnum::Audio::Context::Configuration::setDeviceSpecifier(const std::string& specifier)

Set device specifier.

Returns Reference to self (for method chaining)

If set to empty string (the default), default device specifier is used.

Configuration& Magnum::Audio::Context::Configuration::setDeviceSpecifier(std::string&& specifier)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Configuration& Magnum::Audio::Context::Configuration::setFrequency(Int hz)

Set sampling rate.

Returns Reference to self (for method chaining)

If set to -1 (the default), system OpenAL configuration is used.

Configuration& Magnum::Audio::Context::Configuration::setHrtf(Hrtf hrtf)

Set HRTF configuration.

Returns Reference to self (for method chaining)

If set to Hrtf::Default (the default), system OpenAL configuration is used.

Configuration& Magnum::Audio::Context::Configuration::setMonoSourceCount(Int count)

Set hint for how many mono sources to support.

Returns Reference to self (for method chaining)

If set to -1 (the default), no hint will be given to OpenAL.

Configuration& Magnum::Audio::Context::Configuration::setStereoSourceCount(Int count)

Set hint for how many stereo sources to support.

Returns Reference to self (for method chaining)

If set to -1 (the default), no hint will be given to OpenAL.

Configuration& Magnum::Audio::Context::Configuration::setRefreshRate(Int hz)

Set refresh rate.

Returns Reference to self (for method chaining)

If set to -1 (the default), system OpenAL configuration is used.