AVAudioPlayer - Metering - Want to build a waveform (graph)

后端 未结 4 1865
闹比i
闹比i 2021-01-06 01:12

I need to build a visual graph that represents voice levels (dB) in a recorded file. I tried to do it this way:

NSError *error = nil;
AVAudioPlayer *meterPlay         


        
4条回答
  •  感动是毒
    2021-01-06 01:47

    I don't think you can use AVAudioPlayer based on your constraints. Even if you could get it to "start" without actually playing the sound file, it would only help you build a graph as fast as the audio file would stream. What you're talking about is doing static analysis of the sound, which will require a much different approach. You'll need to read in the file yourself and parse it manually. I don't think there's a quick solution using anything in the SDK.

提交回复
热议问题