Skip to content

Conversation

@Wohlstand
Copy link

@Wohlstand Wohlstand commented Sep 6, 2025

Description

Adding the audio_source option that allows to capture explicit source device (like line-in or microphone) rather than capturing an application's sound by making a virtual audio output device to trick the application. In my case I wanted to route the sound source from hardware, and with existing setup it's impossible to do without serious complicated tricks on the audio server by making loopbacks that connects sources and sinks.

By default, audio_source is empty, and behaviour is stay as before. But once audio_source is defined, then Sunshine will explicitly capture audio from the audio source rather than from the sink's monitor.

Screenshot

I don't have any UI changes, only backend.

Issues Fixed or Closed

Discussion: https://github.com/orgs/LizardByte/discussions/830

Roadmap Issues

Nothing

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@Wohlstand Wohlstand changed the title Added ability to listen source feat(config): Added ability to listen source Sep 6, 2025
@Wohlstand Wohlstand changed the title feat(config): Added ability to listen source feat(config): Added ability to listen source rather than sink Sep 6, 2025
@Wohlstand
Copy link
Author

Okay, now I got another idea how to make this better: maybe implement this as an option of the "Application" entry to capture the hardware source rather than make a fake output device for the work? Otherwise the thing I did will work just globally for all the "applications" if the thing supposed to be used for many people on the same server. In my case I just share stuff from my local PC to my female-friend and we play the same thing.

@ReenigneArcher ReenigneArcher marked this pull request as draft September 6, 2025 19:56
@codecov
Copy link

codecov bot commented Sep 7, 2025

Bundle Report

Bundle size has no change ✅

@codecov
Copy link

codecov bot commented Sep 7, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
230 1 229 8
View the top 1 failed test(s) by shortest run time
ConfigConsistencyTest::AllConfigOptionsExistInAllFiles
Stack Traces | 0.051s run time
D:.../tests/integration/test_config_consistency.cpp:466
Failed
Config options missing from files:
  config.html missing: audio_source
  configuration.md missing: audio_source
  en.json missing: audio_source

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Useful when using captured hardware, not an application.
@sonarqubecloud
Copy link

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.

1 participant