LosslessSwitcher
LosslessSwitcher copied to clipboard
LosslessSwitcher doesn't switch sample rate with local files
I've noticed that this app only works on Apple Music content and not local files.
@vincentneo
For local files it would just be a matter of adding tell application "Music" to get sample rate of current track
(AppleScript), and if it's unavailable fall back to the current log reading approach.
(not related, but to observe the track changes it'd be better to subscribe to the distributed notification com.apple.Music.playerInfo
rather than to poll)
@fjolnir
Thanks for the AppleScript trick. Definitely didn't know about that.
I've tried using private MediaRemote
API to observe track changes, but that didn't work too well since the console message arrives at unpredictable timings, as it has been observed to usually arrive later than the track change, hence use of polling.
No problem. I was looking for an app like this, but since I mostly play local files, it wasn’t working 😅
You can subscribe to that notification via NSDistributedNotificationCenter. It always arrives instantly on my machine
You can subscribe to that notification via NSDistributedNotificationCenter. It always arrives instantly on my machine
I was referring to the log message arriving at times after the track was switched, which contained the info about the sample rate of the playing Apple Music track. The unpredictability and sometimes inaccuracy of it is a big problem.
I have published a new notarised app binary as v1.1 beta 5 with the AppleScript method proposed.
Refer to discussion #74 for reason of closure.