Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary switching to intermediate 48hz rate before going to 96khz #134

Open
geofstro opened this issue Apr 8, 2024 · 4 comments
Open

Comments

@geofstro
Copy link

geofstro commented Apr 8, 2024

Whenever Apple Music switches from 44.1khz to 96khz music, instead of switching directly to 96khz an intermediate 48khz is first applied.

This is causing problems for my own app, which is watching for sample rate changes on the output device, and making decisions based on those.

Can this intermediate switching somehow be avoided?

@vincentneo
Copy link
Owner

vincentneo commented Apr 14, 2024

The problem is due to Apple Music sometimes logging lower resolution values in the first few seconds of playback, which LosslessSwitcher ends up picking up.

As such, this issue remains unsolvable at present.

@geofstro
Copy link
Author

I agree with you; this is something Apple is doing,and it seems to do it consistently.

Whenever the sample rate needs to change from the current rate to another rate it always changes first to 48khz, then after a second or two it changes to the correct rate.

So I believe it should be possible for you to wait for that short period,to see if it changes a second time, before changing to
the rate on the device?

The only time this won't apply is when the actual sample rate should be 48khz; but then, after the short wait, it will still be at 48khz.

@vincentneo
Copy link
Owner

So I believe it should be possible for you to wait for that short period,to see if it changes a second time, before changing to
the rate on the device?

I can consider trying this

@geofstro
Copy link
Author

That would be great! Thanks.

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

No branches or pull requests

2 participants