swift - Splitting Audio Channels iOS -
i've been working on ios project attempting split audio file each individual channel can played separately. right opening audio file , copying data avaudiopcmbuffer separate data.
right testing on mp3 file , far when copy audio data buffer of buffer's contents initialized 0. supposed happening?
let fileurl = nsurl(string: path!) let audiofile = try! avaudiofile(forreading: fileurl!) let framecount = uint32(audiofile.length) let buffer = avaudiopcmbuffer(pcmformat: audiofile.processingformat, framecapacity: framecount) { try audiofile.readintobuffer(buffer, framecount: framecount) } catch { print("no data") } i still new working ios , know may going wrong, appreciate help.
the values returned in buffer small. if round them zero.
to see if it's working correctly, multiply them large integer.
Comments
Post a Comment