I am trying to record a wave file and then convert this file to flac in iOS. However, the libflac library always give me the following error:
invalid/unsupported WAVE file, only 16bps stereo WAVE in canonical form allowed
How can I record the file with this kind of properties? These are the properties that I am currently using:
AVFormatIDKey = kAudioFormatLinearPCM
AVSampleRateKey = 16000
AVNumberOfChannelsKey = 2
AVLinearPCMBitDepthKey = 16
AVLinearPCMIsBigEndianKey = NO
AVLinearPCMIsFloatKey = NO
How should I change these properties in order to use libflac?
It turned out that the settings are correct after all. The problem was with the wav file format and libflac. Apple creates a format that is slightly different than the know wave format. That is the reason of the problems that appeared in my case