GithubHelp home page GithubHelp logo

Changing Audio-Source Index about swyh-rs HOT 12 CLOSED

benkra66 avatar benkra66 commented on August 30, 2024
Changing Audio-Source Index

from swyh-rs.

Comments (12)

dheijl avatar dheijl commented on August 30, 2024

I chose the device index for cli because it is easier to type, without considering the possibility of the index changing as you plug in or remove devices...
I suppose I will have to add the possibility of specifying a name (perhaps a unique substring of the name would do?).

from swyh-rs.

benkra66 avatar benkra66 commented on August 30, 2024

it only happened to me because i wrote a simple batch script that starts swyh-rs-cli and changes my default audio device to some unplugged SPDIF port so that the sound only gets played via my Volumio Server.

Since it's only ever written once i guess using the full device name as it is displayed under the "sound_source" variable in the config_cli.toml as well as the program log under "name"

16:17:00 [INFO] tb_log: Found Audio Source: index = 4, name = MeteorStereo (High Definition Audio Device)

wouldnt be to much of a hassle.

Parsing the string and selecting a matching device via grep (or some similar function) would certainly be possible but could always result in some weird behavior with two similar named devices.

from swyh-rs.

dheijl avatar dheijl commented on August 30, 2024

Parsing the string and selecting a matching device via grep (or some similar function) would certainly be possible but could always result in some weird behavior with two similar named devices.

That's why I wrote "a unique substring". There's also the problem of two identically named cards (it does happen!) to tackle. That's why a sound source index exists in the config as well as the name..

from swyh-rs.

benkra66 avatar benkra66 commented on August 30, 2024

That's why I wrote "a unique substring". There's also the problem of two identically named cards (it does happen!) to tackle. That's why a sound source index exists in the config as well as the name..

sorry, i misunderstood what you ment by "unique substring", since i thought the device name windows uses would for sure be unique.
I just tested it because i havent thought it would allow two identically named devices.. but it does.

from swyh-rs.

benkra66 avatar benkra66 commented on August 30, 2024

Some more testing.

Since the "given" name of a specific audio device can easily be changed in the Windows sound settings and is reflected in the config of swyh-rs a name collision could easily be circumvented.

But, to be honest, i have no idea how a change like this would affect other Operating systems.

from swyh-rs.

dheijl avatar dheijl commented on August 30, 2024

I think I will allow to append a :n to the name string (where n is the zero-based position of the duplicate card name).

from swyh-rs.

dheijl avatar dheijl commented on August 30, 2024

It all works here, if you're prepared to test I can make a pre-release.
You just specify -s some-unique-substring-of-the-name, or if they are not unique, append a :n to the substring.
The old way of specifying an index works as before.

from swyh-rs.

benkra66 avatar benkra66 commented on August 30, 2024

Sure, i can test it whenever youre ready

from swyh-rs.

dheijl avatar dheijl commented on August 30, 2024

You can try the new prerelease.

Any comments welcome.

from swyh-rs.

benkra66 avatar benkra66 commented on August 30, 2024

Hello, sorry for replying so late, work got the better of me in the last few days.
I tried some different combinations, changing audio card names and devices.
As far as i can tell everything works exactly as expected and i can address all of my cards via their respective name. For the Windows side of things i couldn't find any Problems.
Big Thanks, this change spared me of some Headache when changing devices.

from swyh-rs.

dheijl avatar dheijl commented on August 30, 2024

Glad that it works. I expect to release 1.10.0 soon.

from swyh-rs.

dheijl avatar dheijl commented on August 30, 2024

As 1.10.0 is released I'll close this now.

from swyh-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.