Skip to content

Commit

Permalink
fix: Audio devices given the wrong source id (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicv6 authored Nov 25, 2024
1 parent 5c6ac32 commit ab56d6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Recorders/LibObsRecorder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ private void CreateAudioDeviceSource(AudioDevice device) {
string deviceType = device.isInput ? "(input) " : "(output) ";
string id = deviceType + device.deviceId;
string label = deviceType + device.deviceLabel;
audioSources.TryAdd(id, obs_audio_source_create(audioInSourceId, label, deviceId: device.deviceId, mono: device.isInput));
audioSources.TryAdd(id, obs_audio_source_create(device.isInput ? audioInSourceId : audioOutSourceId, label, deviceId: device.deviceId, mono: device.isInput));
obs_set_output_source((uint)audioSources.Count, audioSources[id]);
obs_source_set_audio_mixers(audioSources[id], 1 | (uint)(1 << Math.Min(audioSources.Count, 5)));
obs_source_set_volume(audioSources[id], device.deviceVolume / (float)100);
Expand Down

0 comments on commit ab56d6f

Please sign in to comment.