Skip to content

Commit

Permalink
dont push to audio buffers if playback device isnt started
Browse files Browse the repository at this point in the history
  • Loading branch information
ouwou committed Dec 17, 2023
1 parent 925864f commit 705938a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void AudioManager::SetOpusBuffer(uint8_t *ptr) {
}

void AudioManager::FeedMeOpus(uint32_t ssrc, const std::vector<uint8_t> &data) {
if (!m_should_playback) return;
if (!m_should_playback || ma_device_get_state(&m_playback_device) != ma_device_state_started) return;

std::lock_guard<std::mutex> _(m_mutex);
if (m_muted_ssrcs.find(ssrc) != m_muted_ssrcs.end()) return;
Expand Down

0 comments on commit 705938a

Please sign in to comment.