frgnca / AudioDeviceCmdlets

AudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows
MIT License
765 stars 92 forks source link

It's possible to support sample rate switch? #22

Closed mhtvsSFrpHdE closed 2 years ago

mhtvsSFrpHdE commented 6 years ago

https://github.com/sirWest/AudioSwitch/issues/149 The same issue another project.

48000 for movie or gaming, 44100 for CD music. Use a script to switch sample rate before a game launch or before the music player. WASAPI not a good option, or exclusive mode. I need program use audio device at the same time.

There isn't useful search result in issues...

I plan to create one sample rate switcher via autohotkey, if your AudioDeviceCmdlets already implemented such feature or in future updates, then I don't have to "Reinventing the wheel"... This is not a feature request and it's just a confirm... Sorry to bother you

frgnca commented 6 years ago

AudioDeviceCmdlets currently does not support changing the sample rate of audio devices.

Don't worry it's no bother at all. I welcome Issues and Pull requests. I prefer to document feature requests, even if in the end it's only to confirm that I won't be adding it.

I will take a look at the CoreApi code and come back here to confirm whether or not it will be possible to add this feature later. In any case, I probably won't be able to code until this fall though.

jonjonsson commented 2 years ago

I would love this feature as well. It's a common problem for people using virtual audio devices.

God-damnit-all commented 2 years ago

As an aside (and I'll mark this comment off-topic), I strongly recommend foobar2000 with "WASAPI (shared)" selected in the Output configuration for listening to CD music, it has the best upsampling of any software out there; you really can't tell the difference.

There's also an optional component that adds "WASAPI (exclusive)", which effectively overrides the sampling rate of your audio device while music is playing (though with the side effect of muting all other sounds that would otherwise be coming through).

mhtvsSFrpHdE commented 2 years ago

This issue is mine at the beginning.
It has been years since that, and I experienced really A LOT than the moment.

The difference is I quit from HiFi community. There are things go wrong. I now use 44100 all day and never get back to 48000, not even a single time.

I decide to "believe" there is no noticeable different in terms of "human hearing".
Even for the "well known bad Microsoft resampling algorithm".

The most difference in sound I can tell, is "Equalizer",
I played AutoEQ project (and I made a mod for it ),
then I go to HeSuVi project for headphone to speaker simulation,
finally, I have my own studio monitor on my desktop,
with HeSuVi 2 channel simulate 8 channel surround sound.
Yes, use 2 speakers to simulate 8 and very decent for open world gaming.

Adjust between 48000 and 44100 won't benefit at all.
You need to get some real things. You do can measure the 44100/48000 FFT difference on laboratory instruments
but booooooo, it's you are listening things not the laboratory instruments

While watching movie and gaming, my attention mainly on monior and keyboard,
minor 48000->44100 error far less chance to be noticed.
If I go music CD and stream media mp3, they go 44100 without resample.
I suggest the setting to you that always use 44100 like me.

If you still focus on this topic, please submit another issue.

jonjonsson commented 2 years ago

OK, my use case is completely different. A common source of audio crackling when funneling audio through virtual audio device is that both the source device and virtual device are not both using the same sample rate/bit depth.

A function to get the sample rate and bit depth and set it would be wonderful.

mhtvsSFrpHdE commented 2 years ago

OK, my use case is completely different. A common source of audio crackling when funneling audio through virtual audio device is that both the source device and virtual device are not both using the same sample rate/bit depth.

A function to get the sample rate and bit depth and set it would be wonderful.

Indeed, sometimes I use kernel streaming to forward my mic, if two audio devices set to different bit rate,
the kernel streaming won't throw exception, but just stream wrong audio signal.

God-damnit-all commented 2 years ago

OK, my use case is completely different. A common source of audio crackling when funneling audio through virtual audio device is that both the source device and virtual device are not both using the same sample rate/bit depth. A function to get the sample rate and bit depth and set it would be wonderful.

Indeed, sometimes I use kernel streaming to forward my mic, if two audio devices set to different bit rate, the kernel streaming won't throw exception, but just stream wrong audio signal.

Could you please reopen the issue?

jonjonsson commented 2 years ago

OK, my use case is completely different. A common source of audio crackling when funneling audio through virtual audio device is that both the source device and virtual device are not both using the same sample rate/bit depth.

A function to get the sample rate and bit depth and set it would be wonderful.

Indeed, sometimes I use kernel streaming to forward my mic, if two audio devices set to different bit rate, the kernel streaming won't throw exception, but just stream wrong audio signal.

Could you please reopen the issue?

FYI I opened a new issue https://github.com/frgnca/AudioDeviceCmdlets/issues/64