"content owned by the user" - how do we know which songs that are?
MPMediaItem doesn't have any properties that can give us that information.
So how to find out that??
Post
Replies
Boosts
Views
Activity
On my iOS devices I have three types of files/songs in the Music Library:
1: Regular files m4a/mp3 files ripped from a CD or audio files added to iTunes.
2: Files purchased from iTunes Store about 10 years ago, they are DRM protected .m4p files.
Those are physical files that are synched from iTunes on my Mac over to the iOS device.
3: Streaming "Apple Music" songs.
All three types can be played with "MPMusicPlayerController applicationMusicPlayer".
With "type 1" files, changing the speed with currentPlaybackRate works.
With "type 3" files, currentPlaybackRate does not work.
With "type 2" files, currentPlaybackRate works for some of the files but not for all.
I believe I "own" all type 2 files (I did pay for them) but Apple thinks not.
So checking if a file is DRM protected or not, doesn't tell us if speed change is possible.
If speed change isn't going to be possible we at least need to be able to disable the speed change control.
As of now there is no reliable way way to find out if speed change will be possible or not.
@oneway111 Checking hasProtectedAsset and isCloudItem is not reliable.
I have a bunch of purchased DRM protected iTunes Store files on my devices. "isCloudItem" is false and "hasProtectedAsset" is true and changing the playback rate WORKS for those files. Then I have other "Apple Music" files/songs where "isCloudItem" is false and "hasProtectedAsset" is true but changing the playback rate does NOT work.
So there is no way to check if rate change will work or not or if a song is "owned by the user".
Thanks, this makes many many users happy!
To make them even happier, could we have (as a compensation for all this trouble!) a pitch change setting?
I can hear that the underlying AudioUnit is a "kAudioUnitSubType_NewTimePitch", it has the following setting:
kNewTimePitchParam_Rate = 0, // Global, Cents, -2400 -> 2400, 1.0
so it would be simple to add that feature.
Users of my app are asking for this feature all the time and I have filed request for this feature several times.
Same problem with iOS 16.1 beta 2
Thank you so much for the followup JoeKun;
Now please add a way to change the pitch as well.
So many of our users are asking for this. For practicing it's very useful to be able to change the musical key or to fine tune song instead of retuning the instrument (if at all possible).
Please please!
Works OK here with iOS 16.4.1
Using Obj-C if that matters?
MPMusicPlayerController *player;
self.player = [MPMusicPlayerController applicationMusicPlayer];
self.player.currentPlaybackRate = newRate;
Big but: I have tons of hacks to get this working reliable and I cross my fingers every update.