syedhali / EZAudio

An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.
Other
4.93k stars 821 forks source link

Audio playback failure #361

Open Dtheme opened 6 years ago

Dtheme commented 6 years ago

After recording, I tried to play local audio on another page。I got this: Error: Failed to dispose of ext audio file (-50)

here is my plyer code:

    NSURL *URL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/%@",
                                         basePath,voiceModel.voiceName]];
    EZAudioFile *audioFile = [EZAudioFile audioFileWithURL:URL1];
    self.player = [[EZAudioPlayer sharedAudioPlayer] initWithAudioFile:audioFile delegate:self];
    self.player.shouldLoop = YES;

and this the audioFile debug log info

<EZAudioFile: 0x1700db970> {
    url: file:///var/mobile/Containers/Data/Application/FD512324-0797-4846-A88A-748ED3C76DEA/Documents/20170901040530.m4a,
    duration: 17.716825,
    totalFrames: 781312,
    metadata: {
    "approximate duration in seconds" = "17.717";
},
    fileFormat: { 
Sample Rate:            44100,
Format ID:                 alac,
Format Flags:                 4,
Bytes per Packet:             0,
Frames per Packet:         4096,
Bytes per Frame:              0,
Channels per Frame:           2,
Bits per Channel:             0,
IsInterleaved:       1,
IsFloat:             0, },
    clientFormat: { 
Sample Rate:            44100,
Format ID:                 lpcm,
Format Flags:                21,
Bytes per Packet:             4,
Frames per Packet:            1,
Bytes per Frame:              4,
Channels per Frame:           2,
Bits per Channel:            32,
IsInterleaved:       0,
IsFloat:             1, } 
}

How can i fix this? thanks.

sriranjanr commented 6 years ago

Were you able to get the apps compile and running? I was able to compile but I get osatomic is deprecated warnings and then the app crashes. Could someone help me. program crash compile time warnings