Skip to content

win-dshow: Set audio devices to OBS sample rate - #13867

Open
prgmitchell wants to merge 1 commit into
obsproject:masterfrom
prgmitchell:useOBSSampleRate
Open

win-dshow: Set audio devices to OBS sample rate#13867
prgmitchell wants to merge 1 commit into
obsproject:masterfrom
prgmitchell:useOBSSampleRate

Conversation

@prgmitchell

@prgmitchell prgmitchell commented Sep 3, 2026

Copy link
Copy Markdown
Member

Description

Pass the configured OBS sample rate to libdshowcapture when configuring DirectShow audio devices to prevent devices from silently using their default sample rates.

Depends on obsproject/libdshowcapture#33

Motivation and Context

Common issue in support, current requires a workaround of muting the dshow device and adding a separate audio input capture source to load the correct sample rate.

How Has This Been Tested?

Requires testing from others as I don't have a device with a default sample rate of 44.1khz.

Tested with a build sent to others though so I am marking the tested box in the checklist as complete

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Pass the configured OBS sample rate to libdshowcapture when configuring
DirectShow audio devices to prevent devices from silently using their
default sample rates.
@CyBeRoni

CyBeRoni commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Without this PR:

22:16:52.270: 	video device: AV.io HD Video
22:16:52.270: 	video path: \\?\usb#vid_2b77&pid_3601&mi_01#7&2d02472b&1&0001#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
22:16:52.270: 	resolution: 1920x1080
22:16:52.270: 	flip: 0
22:16:52.270: 	fps: 60.00 (interval: 166666)
22:16:52.270: 	format: YUY2
22:16:52.270: 	buffering: disabled
22:16:52.270: 	hardware decode: disabled
22:16:52.334: 	using video device audio: no
22:16:52.334: 	separate audio filter
22:16:52.334: 	sample rate: 44100
22:16:52.334: 	channels: 2
22:16:52.334: 	audio type: Capture

with:

22:03:44.662: [DShow Device: 'Video Capture Device'] settings updated: 
22:03:44.662:     video device: AV.io HD Video
22:03:44.662:     video path: \\?\usb#vid_2b77&pid_3601&mi_01#7&2d02472b&1&0001#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
22:03:44.662:     resolution: 1920x1080
22:03:44.662:     flip: 0
22:03:44.662:     fps: 60.00 (interval: 166666)
22:03:44.662:     format: YUY2
22:03:44.662:     buffering: disabled
22:03:44.662:     hardware decode: disabled
22:03:44.662:     OBS sample rate: 48000
22:03:44.736:     using video device audio: no
22:03:44.736:     separate audio filter
22:03:44.736:     sample rate: 48000
22:03:44.736:     channels: 2
22:03:44.736:     audio type: Capture

Same result when using a custom audio source set to the same device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants