carb::audio::VorbisEncoderSettings

Defined in carb/audio/IAudioData.h

struct VorbisEncoderSettings

Settings specific to Vorbis file encoding.

This is not required when encoding Vorbis audio.

Public Members

uint32_t flags = 0

Reserved for future expansion.

Must be set to 0.

float quality = 0.9f

The encoding quality of the compressed audio.

This may be within the range of -0.1 to 1.0. Vorbis is a lossy codec with variable bitrate, so this doesn’t correlate to an exact bitrate for the output audio. A lower quality increases encode time and decreases decode time. 0.8-0.9 is suitable for cases where near-perfect reproduction of the original audio is desired, such as music that will be listened to on its own. Lower quality values for the audio should be acceptable for most use cases, but the quality value at which artifacts become obvious will depend on the content of the audio, the use case and the quality of the speakers used. With very low quality settings, such as -0.1, audio artifacts will be fairly obvious in music, but for simpler audio, such as voice recordings, the quality loss may not be as noticeable (especially in scenes with background noise). This is 0.9 by default.

bool nativeChannelOrder = false

If this is true, the encoder will expect its input to be in Vorbis channel order.

Otherwise WAVE channel order will be expected. All codecs use WAVE channel order by default, so this should be set to false in most cases. This is false by default.