mirror of https://github.com/jetkvm/kvm.git
Remove unused update_opus_encoder_params function
This commit is contained in:
parent
94cab8b2ac
commit
2b276e1ba5
|
|
@ -97,7 +97,6 @@ void update_audio_constants(uint32_t bitrate, uint8_t complexity,
|
|||
void update_audio_decoder_constants(uint32_t sr, uint8_t ch, uint16_t fs, uint16_t max_pkt,
|
||||
uint32_t sleep_us, uint8_t max_attempts, uint32_t max_backoff,
|
||||
uint8_t buf_periods);
|
||||
int update_opus_encoder_params(uint32_t bitrate, uint8_t complexity);
|
||||
|
||||
|
||||
void update_audio_constants(uint32_t bitrate, uint8_t complexity,
|
||||
|
|
@ -186,33 +185,6 @@ static volatile sig_atomic_t capture_initialized = 0;
|
|||
static volatile sig_atomic_t playback_initializing = 0;
|
||||
static volatile sig_atomic_t playback_initialized = 0;
|
||||
|
||||
/**
|
||||
* Update Opus encoder settings at runtime (does NOT modify FEC or hardcoded settings)
|
||||
*
|
||||
* NOTE: Currently unused but kept for potential future runtime configuration updates.
|
||||
* In the current CGO implementation, encoder params are set once via update_audio_constants()
|
||||
* before initialization. This function would be useful if we add runtime bitrate/complexity
|
||||
* adjustment without restarting the encoder.
|
||||
*
|
||||
* @return 0 on success, -1 if not initialized, >0 if some settings failed
|
||||
*/
|
||||
int update_opus_encoder_params(uint32_t bitrate, uint8_t complexity) {
|
||||
if (!encoder || !capture_initialized) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Update runtime-configurable parameters
|
||||
opus_bitrate = bitrate;
|
||||
opus_complexity = complexity;
|
||||
|
||||
// Apply settings to encoder
|
||||
int result = 0;
|
||||
result |= opus_encoder_ctl(encoder, OPUS_SET_BITRATE(opus_bitrate));
|
||||
result |= opus_encoder_ctl(encoder, OPUS_SET_COMPLEXITY(opus_complexity));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// ALSA UTILITY FUNCTIONS
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue