Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win-dshow: use the obs samplingRate #5033

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions plugins/win-dshow/win-dshow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the comment above the line to avoid clang-format having to break it up

sampleRate; // try to set the desired samplerate
blog(LOG_INFO, "\tobs samplerate: %d", audioConfig.sampleRate);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using tabstops for log output.


bool success = device.SetAudioConfig(&audioConfig);
if (!success)
return false;
Expand Down