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.94k stars 822 forks source link

Audioplot not updating real device, working in simulator only #281

Open karuppub opened 8 years ago

karuppub commented 8 years ago

hai, i'm using Ezaudio plot to display the wave while recording audio, but it's not updating while i recording using real device, but working correctly in simulator, i don't kow what is the cause.

please help me.

shoheiyokoyama commented 8 years ago

I am also having this same problem. EZAudioPlotGL are drawn as expected, Only simulator. below EZMicrophone Delegate Method doesn't woek. However, func microphone(microphone: EZMicrophone!, changedPlayingState isPlaying: Bool) is work.

func microphone(microphone: EZMicrophone!, hasAudioReceived buffer: UnsafeMutablePointer<UnsafeMutablePointer<Float>>, withBufferSize bufferSize: UInt32, withNumberOfChannels numberOfChannels: UInt32) 
func microphone(microphone: EZMicrophone!, hasBufferList bufferList: UnsafeMutablePointer<AudioBufferList>, withBufferSize bufferSize: UInt32, withNumberOfChannels numberOfChannels: UInt32)
Xcode: Version 7.3
Swift 2.2
EZAudio 1.1.5
iOS : iPhone6s(OS 9.2.1)
shoheiyokoyama commented 8 years ago

I've discovered that it only happens when the AVAudioSession category is set to AVAudioSessionCategoryPlayback. Please AVAudioSession category set to AVAudioSessionCategoryRecord. EZAudioPlotGL are drawn as expected.

karuppub commented 8 years ago

Hi @shoheiyokoyama thanks for your reply, will try and check