iOS iPhone - Record compressed audio file that plays on Android with no server side transcoding -


i have read many posts regarding question none have produced solution problem.

i record audio file on ios can sent , played android device without file having transcoded on server.

i aware ios supports recording types , android can play types indicated here:

android supported media types

avaudiorecorder supported formats

however, according if output .m4a file below settings should work:

audiochannellayout channellayout;         memset(&channellayout, 0, sizeof(audiochannellayout));         channellayout.mchannellayouttag = kaudiochannellayouttag_stereo;           recordsettings = [nsdictionary dictionarywithobjectsandkeys:          [nsnumber numberwithint: kaudioformatmpeg4aac], avformatidkey,           [nsnumber numberwithfloat:16000.0], avsampleratekey,          [nsnumber numberwithint:1], avnumberofchannelskey,          [nsnumber numberwithint:32000], avencoderbitratekey,          [nsdata datawithbytes:&channellayout length:sizeof(audiochannellayout)], avchannellayoutkey,          nil]; 

but doesn't work.

now 1 thing did notice if try open file recorded on iphone on web (my computer), recognizes quicktime file avaudiorecorder setting outputfiletype of file quicktime format instead of @"public.audio" or something.

so perhaps there way of changing filetype on file created avaudiorecorder?

either way, has solved issue , if how?

well in case have same audio encoding save .3gp extension , can reproduced on android , ios. hope helps


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -