MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / resetEncoder

Method resetEncoder

source/frontend/StarVoice.cpp:628–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626}
627
628void Voice::resetEncoder() {
629 int channels = encoderChannels();
630 MutexLocker locker(m_threadMutex);
631 m_encoder.reset(createEncoder(channels));
632 int bitrate = m_bitrate > 0 ? (int)m_bitrate : (channels == 2 ? 50000 : 24000);
633 opus_encoder_ctl(m_encoder.get(), OPUS_SET_BITRATE(bitrate));
634}
635
636void Voice::resetDevice() {
637 closeDevice();

Callers

nothing calls this directly

Calls 2

resetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected