arduino-audio-tools
Public Member Functions | Public Attributes | List of all members
OpusEncoderSettings Struct Reference

Setting for Opus Encoder where the following values are valid: -1 indicates that the default value should be used and that this codec is not setting the value. More...

#include <CodecOpus.h>

Inheritance diagram for OpusEncoderSettings:
OpusSettings AudioInfo

Public Member Functions

 OpusEncoderSettings ()
 
virtual void clear ()
 
void copyFrom (AudioInfo info)
 Same as set.
 
bool equals (AudioInfo alt)
 Returns true if alt values are the same like the current values.
 
bool equalsExSampleRate (AudioInfo alt)
 Checks if only the sample rate is different.
 
virtual void logInfo (const char *source="")
 
 operator bool ()
 Returns true if all components are defined (no component is 0)
 
bool operator!= (AudioInfo alt)
 Returns true if alt values are the different from the current values.
 
bool operator== (AudioInfo alt)
 Returns true if alt values are the same like the current values.
 
void set (AudioInfo info)
 Copies the values from info.
 
void setAudioInfo (AudioInfo info)
 Same as set.
 

Public Attributes

int application = OPUS_APPLICATION_AUDIO
 
int bitrate = -1
 
uint8_t bits_per_sample = DEFAULT_BITS_PER_SAMPLE
 Number of bits per sample (int16_t = 16 bits)

 
uint16_t channels = DEFAULT_CHANNELS
 Number of channels: 2=stereo, 1=mono.
 
int complexity = -1
 0 to 10
 
int force_channel = -1
 OPUS_AUTO, OPUS_AUTO, 1, 2.
 
int frame_sizes_ms_x2 = -1
 OPUS_FRAMESIZE_2_5_MS,OPUS_FRAMESIZE_5_MS,OPUS_FRAMESIZE_10_MS,OPUS_FRAMESIZE_20_MS,OPUS_FRAMESIZE_40_MS,OPUS_FRAMESIZE_60_MS,OPUS_FRAMESIZE_80_MS,OPUS_FRAMESIZE_100_MS,OPUS_FRAMESIZE_120_MS.
 
int inband_fec = -1
 0, 1
 
int lsb_depth = -1
 8, 24
 
int max_bandwidth = -1
 
int max_buffer_size = 4*1024
 
int max_buffer_write_size = 512
 
int packet_loss_perc = -1
 0, 1, 2, 5
 
int prediction_disabled = -1
 0, 1
 
sample_rate_t sample_rate = DEFAULT_SAMPLE_RATE
 Sample Rate: e.g 44100.
 
int singal = -1
 OPUS_AUTO, OPUS_SIGNAL_VOICE, OPUS_SIGNAL_MUSIC.
 
int use_dtx = -1
 0, 1
 
int vbr = -1
 0, 1
 
int vbr_constraint = -1
 0, 1
 

Detailed Description

Setting for Opus Encoder where the following values are valid: -1 indicates that the default value should be used and that this codec is not setting the value.

int channels[2] = {1, 2};
int applications[3] = {OPUS_APPLICATION_AUDIO, OPUS_APPLICATION_VOIP, OPUS_APPLICATION_RESTRICTED_LOWDELAY};

int sample_rates[] = {8000,12000,16000 ,24000,48000}

int bitrates[11] = {6000, 12000, 16000, 24000, 32000, 48000, 64000, 96000, 510000, OPUS_AUTO, OPUS_BITRATE_MAX};
int force_channels[4] = {OPUS_AUTO, OPUS_AUTO, 1, 2};
int use_vbr[3] = {0, 1, 1};
int vbr_constraints[3] = {0, 1, 1};
int complexities[11] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int max_bandwidths[6] = { OPUS_BANDWIDTH_NARROWBAND, OPUS_BANDWIDTH_MEDIUMBAND, OPUS_BANDWIDTH_WIDEBAND, OPUS_BANDWIDTH_SUPERWIDEBAND, OPUS_BANDWIDTH_FULLBAND, OPUS_BANDWIDTH_FULLBAND};

int signals[4] = {OPUS_AUTO, OPUS_AUTO, OPUS_SIGNAL_VOICE, OPUS_SIGNAL_MUSIC};
int inband_fecs[3] = {0, 0, 1};
int packet_loss_perc[4] = {0, 1, 2, 5};
int lsb_depths[2] = {8, 24};
int prediction_disabled[3] = {0, 0, 1};
int use_dtx[2] = {0, 1};
int frame_sizes_ms_x2[9] = {OPUS_FRAMESIZE_2_5_MS,OPUS_FRAMESIZE_5_MS,OPUS_FRAMESIZE_10_MS,OPUS_FRAMESIZE_20_MS,OPUS_FRAMESIZE_40_MS,OPUS_FRAMESIZE_60_MS,OPUS_FRAMESIZE_80_MS,OPUS_FRAMESIZE_100_MS,OPUS_FRAMESIZE_120_MS} x2 to avoid 2.5 ms

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ OpusEncoderSettings()

OpusEncoderSettings ( )
inline

Default is 5760

Member Data Documentation

◆ application

int application = OPUS_APPLICATION_AUDIO

OPUS_APPLICATION_AUDIO, OPUS_APPLICATION_VOIP, OPUS_APPLICATION_RESTRICTED_LOWDELAY

◆ bitrate

int bitrate = -1

6000, 12000, 16000, 24000, 32000, 48000, 64000, 96000, 510000, OPUS_AUTO, OPUS_BITRATE_MAX

◆ max_bandwidth

int max_bandwidth = -1

OPUS_BANDWIDTH_NARROWBAND, OPUS_BANDWIDTH_MEDIUMBAND,OPUS_BANDWIDTH_WIDEBAND, OPUS_BANDWIDTH_SUPERWIDEBAND, OPUS_BANDWIDTH_FULLBAND, OPUS_BANDWIDTH_FULLBAND


The documentation for this struct was generated from the following file: