Right now, it seems like the best solution would be to create a ".aac" file, and then have the Android end replace the ".aac" with ".m4a" and try to play it. Merely renaming the file to have a ".aac" again doesn't change the fact that it can't be loaded into anything on the Mac or iOS. > "dta?": The file is malformed, not a valid instance of an audio file of its type, or not recognized as an audio file. When AVAudioPlayer tries to open that file, it outputs:Įrror Domain=NSOSStatusErrorDomain Code=1685348671 "The operationĬouldn’t be completed. And I am waiting to hear whether it works on Android. However, the resultant file (which is created with no errors from AVAudioRecorder) cannot be played on Macs nor on iOS devices. So I made this change: NSString *filename = ] (The advantage with the ".aac" format is that old versions of the app can receive these files and play them back - I've maintained backwards compatibility.) If the file extension were manually changed to end in ".m4a", then the file plays on Android. The files created by this are playable on a Mac, on an iOS device, but not on an Android device. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) I modified the existing AVAudioRecorder code to this: forKey:AVFormatIDKey] I am now trying to modify the app to create and send files that are compatible with Android. It uses AVAudioRecorder to record the audio files, and it uses AVAudioPlayer to play back any received audio files. I am trying to modify an iOS app that can send audio files (securely/encrypted) to other iOS devices.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |