Note that there are some explanatory texts on larger screens.

plurals
  1. POAVAssetExportSession not working with ios 7
    primarykey
    data
    text
    <p>ios 7 with ringtone software does not work. ios 5 and ios 6 are working properly. When I run it with ios 7, duration of the ringtone is the same as the source file is created. Needs to be 40 sec. but it seems to 300-400 seconds.</p> <pre><code>- (void)Convert{ AVURLAsset *songAsset = [AVURLAsset URLAssetWithURL:self.audioplayer.url options:nil]; AVAssetExportSession *exporter = [[AVAssetExportSession alloc] initWithAsset: songAsset presetName: AVAssetExportPresetAppleM4A]; //exporter.outputFileType = @"com.apple.m4a-audio"; exporter.outputFileType = AVFileTypeAppleM4A; CMTime start = CMTimeMakeWithSeconds(self.audioplayer.currentTime, 1); CMTime duration = CMTimeMakeWithSeconds(40, 1); CMTimeRange range = CMTimeRangeMake(start, duration); exporter.timeRange = range; NSString *exportFile = [[self kDoc_dosya:self.name] stringByAppendingPathExtension:@"m4r"]; if ([[NSFileManager defaultManager] fileExistsAtPath:exportFile]) [[NSFileManager defaultManager] removeItemAtPath:exportFile error:nil]; NSURL *exportURL = [NSURL fileURLWithPath:exportFile]; exporter.outputURL = exportURL; [exporter exportAsynchronouslyWithCompletionHandler:^{ int exportStatus = exporter.status; switch (exportStatus) { case AVAssetExportSessionStatusFailed: { NSError *exportError = exporter.error; NSLog (@"AVAssetExportSessionStatusFailed: %@", exportError); break; } case AVAssetExportSessionStatusCompleted: { NSLog (@"AVAssetExportSessionStatusCompleted--"); break; } case AVAssetExportSessionStatusUnknown: { NSLog (@"AVAssetExportSessionStatusUnknown"); break;} case AVAssetExportSessionStatusExporting: { NSLog (@"AVAssetExportSessionStatusExporting"); break;} case AVAssetExportSessionStatusCancelled: { NSLog (@"AVAssetExportSessionStatusCancelled"); break;} case AVAssetExportSessionStatusWaiting: { NSLog (@"AVAssetExportSessionStatusWaiting"); break;} default: { NSLog (@"didn't get export status"); break;} } }]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload