I have a problem with updateBuffer
method when I'm setting pan to right earphone (1.0f). Sound is playing correctly but plot is not updating: **buffer = (float) 0
for every element.
Code is simple:
- (void)audioPlayer:(EZAudioPlayer *)audioPlayer
playedAudio:(float **)buffer
withBufferSize:(UInt32)bufferSize
withNumberOfChannels:(UInt32)numberOfChannels
inAudioFile:(EZAudioFile *)audioFile {
__weak typeof(self) weakSelf = self;
[weakSelf.plot updateBuffer:buffer[0] withBufferSize:bufferSize];
}
its working for left earphone -> pan = -1.0f
or both -> 0.0f
but not for right one.
(float **)buffer
is a 2d array and so I am assumingbuffer[0]
is left channel whilebuffer[1]
is right channel. Try putting inbuffer[1]
instead.