diff --git a/plugins/win-dshow/win-dshow.cpp b/plugins/win-dshow/win-dshow.cpp index 0f4fafc09d8199..de93420add6232 100644 --- a/plugins/win-dshow/win-dshow.cpp +++ b/plugins/win-dshow/win-dshow.cpp @@ -1019,6 +1019,13 @@ bool DShowInput::UpdateAudioConfig(obs_data_t *settings) audioConfig.mode = (AudioMode)obs_data_get_int(settings, AUDIO_OUTPUT_MODE); + // get the obs sample_rate + uint32_t sampleRate = audio_output_get_sample_rate(obs_get_audio()); + + audioConfig.sampleRate = + sampleRate; // try to set the desired samplerate + blog(LOG_INFO, "\tobs samplerate: %d", audioConfig.sampleRate); + bool success = device.SetAudioConfig(&audioConfig); if (!success) return false;