EZaudio execute in Background

395 Views Asked by At

I tried.

__block UIBackgroundTaskIdentifier task=0;
task=[application beginBackgroundTaskWithExpirationHandler:^{
    NSLog(@"Expiration handler called %f",[application backgroundTimeRemaining]);
    [application endBackgroundTask:task];
    task=UIBackgroundTaskInvalid;
}];

I want to display waveform when I record the audio.I have use the EZAudio class but it will crash when I press HOME button or Lock Screen. How can I run the app in background please help me.

1

There are 1 best solutions below

0
On BEST ANSWER

Just i have used EZAudioPlot change to EZAudioPlotGL. select EZAudioPlotGL view change only class name of view goto identity inspector and change it EZAudioPlot. after that

@property (nonatomic,weak) IBOutlet EZAudioPlotGL *audioPlot;

Change it

@property (nonatomic,weak) IBOutlet EZAudioPlot *audioPlot;

its work fine.