ios - Play song from ipod library with superpowered -



ios - Play song from ipod library with superpowered -

since apple anounced every app has back upwards 64-bit starting feb 1rst, can't utilize dirac3le anymore. found superpowered seems same. problem see is, can't play songs ipod library.

i've tried importing song via avassetexportsession can't work. code i've tried far:

nsurl *url = [playingsong valueforproperty:mpmediaitempropertyasseturl]; avurlasset *songasset = [avurlasset urlassetwithurl:url options:nil]; avassetexportsession *exporter = [[avassetexportsession alloc] initwithasset: songasset presetname: avassetexportpresetpassthrough]; exporter.outputfiletype = @"com.apple.coreaudio-format"; nsstring *fname = [[nsstring stringwithformat:@"tmp"] stringbyappendingstring:@".mp3"]; nsstring *temppath = nstemporarydirectory(); nsstring *exportfile = [temppath stringbyappendingpathcomponent: fname]; exporter.outputurl = [nsurl fileurlwithpath:exportfile]; [exporter exportasynchronouslywithcompletionhandler:^{ self.player = [[superpoweredaudioplayer alloc] initwithcontentsofurl:[nsurl fileurlwithpath:exportfile]]; [self.player play]; }];

with opening file via:

player->open([[url path] filesystemrepresentation]);

even if work, i'm kind of concerned if fast plenty music player. importing song, other finished.

are there other options?

thanks!

ios objective-c audio

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -