BASS_ATTRIB_OPUS_GAIN attribute


The output gain of an Opus stream.

BASS_ChannelGetAttribute(
    HSTREAM handle,
    BASS_ATTRIB_OPUS_GAIN,
    float *gain
);

Parameters

handleThe Opus stream handle.
gainThe gain in dB.

Remarks

Opus files have an "output gain" header field, which is applied by BASSOPUS to the decoded sample data. This attribute can be used to retrieve and override that gain value. When there are multiple logical bitstreams, each bitstream has its own output gain value, and this attribute will be reset to the new bitstream's header value upon a bitstream switch. A BASS_SYNC_OGG_CHANGE sync can be set via BASS_ChannelSetSync to be informed of when a new bitstream begins during decoding/playback.

See also

BASS_ChannelGetAttribute, BASS_ChannelSetAttribute