th-ch / youtube-music

YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
https://th-ch.github.io/youtube-music/
MIT License
8.98k stars 510 forks source link

[Bug]: Windows Audio Channel Reset on Restart #2454

Open cireCloud opened 1 month ago

cireCloud commented 1 month ago

Preflight Checklist

YouTube Music (Application) Version

3.5.3

Checklists

What operating system are you using?

Windows

Operating System Version

Windows 10 22H2

What CPU architecture are you using?

x64

Last Known Working YouTube Music (Application) version

No response

Reproduction steps

  1. Start YouTube Music Player
  2. Change audio output in the Windows "App Volume and device preferences" to different audio device
  3. Restart application

Expected Behavior

After restart to continue play only on chosen device.

Actual Behavior

Plays music on default audio device.

Enabled plugins

Ad-blocker Shortcuts

Additional Information

No response

ArjixWasTaken commented 1 month ago

This is not a bug since it has nothing to do with our code. Since we do not allow you to specify the device used for output...

(correct me if I am wrong)

So you are actually asking for a feature that allows choosing what device to use for output.

cireCloud commented 1 month ago

I reckon it would be much more effort to implement it as a separate feature from scratch than figuring out the root cause of why it cant be used natively by Windows feature

My suspicion is that each time app starts, it might have different metadata or something and Windows thinks its something else and routes it through default output.. I have couple apps used like that and Windows sticks their settings.

Surely not functional code issue, but maybe the way it built. (theory)

As for use cases, it can be connected external speakers or video recordings to not include music, etc.

JellyBrick commented 1 month ago
  • [x] I use the portable version of the YouTube Music Application.

Could you reproduce this issue in the installable version?

Gamersven commented 1 month ago

I have the installed version. i face the same issues. It always switches itself back to my main "windows default" Voicemeeter output device inside Windows sound settings. might be the same issue: https://github.com/th-ch/youtube-music/issues/2357

ArjixWasTaken commented 1 month ago

I reckon it would be much more effort to implement it as a separate feature from scratch than figuring out the root cause of why it cant be used natively by Windows feature

My suspicion is that each time app starts, it might have different metadata or something and Windows thinks its something else and routes it through default output.. I have couple apps used like that and Windows sticks their settings.

Surely not functional code issue, but maybe the way it built. (theory)

As for use cases, it can be connected external speakers or video recordings to not include music, etc.

That makes much more sense, I fully understand why you reported this as a bug instead 👍

cireCloud commented 1 month ago

I have the installed version. i face the same issues. It always switches itself back to my main "windows default" Voicemeeter output device inside Windows sound settings. might be the same issue: #2357

Thanks. Seems that its the way it is built, I wonder if developers of this app can influence them. If not, output option might be not be a bad idea.

ArjixWasTaken commented 1 month ago

It looks like we can specify the audio device for the HTML Element responsible for the music.

Here is the Web API to achieve that. Maybe a plugin could be made that allows changing the output device used.

I really don't know why windows doesn't remember your preferences :(

Gamersven commented 1 month ago

Just wanted to add a Screenshot of this.

In Windows Sound Settings it still is on "Voicemeeter AUX" which is the "Musik" inside Voicemeeter itself. But you can see inside Voicemeeter that the Processes Output is on my "Desktop" Input.

I always have to re-select it so it swapps over to my intended Audio Device.

voicemeeter8x64_mVmFZ6Tf2X