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

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -