Hi all,
I’ve moved this thread as I originally put it off the back of another, which didn’t make any sense…
Basically, my app records to WAV format on all devices and this seems to work fine. The app then allows users to upload that audio via a web service I’ve created and download it on another device for playback (audio share functionality).
Because Android and iOS both support WAV format, in theory, the audio recording on an Android devices should play on an iOS device and vice versa.
However, and this is where it gets weird…
-
The WAV files recorded on iOS or the simulator on my Mac play on other iOS devices after uploading and downloading them so the transfer process is fine. They also play on my Mac.
-
The WAV files recorded on Android devices play on all other Android devices (tested between Kindle and a generic cheap Android machine)
-
The WAV files recorded on Android devices play on iOS devices and on my Mac in the simulator fine.
-
The WAV files recorded on iOS or in the simulator on my Mac do NOT play on Android devices.
So, any audio recorded on an iOS device or Mac, uploaded to the server via my web service and then downloaded onto an Android device will not play. I get the following debug trace when running on the device:
Using the Media library:
I/Corona ( 6770): PATH IS: /data/data/uk.co.mycompany.myapp/app\_data/clip-1.wav E/MediaPlayer( 6770): Unable to to create media player
Using the Audio library:
I/Corona (29516): PATH IS: /data/data/uk.co.mycompany.myapp/app\_data/clip-2.wav I/SoundDecoder\_SetError(29516): WAV: Not a RIFF file. I/SoundDecoder(29516): MPG123: Accepting data stream. I/SoundDecoder\_SetError(29516): MPG123: Message: Prepare for a changed audio format (query the new one)!
I have checked the files recorded from both device types and they seem to be identical. If I download them via FTP from the server where they were saved during the upload process, they both play on my Mac and can be opened in my audio editor and appear to have the same properties.
They are both WAV files, both 16 bit, both 44.1k. I can see no difference. And yet one plays and one doesn’t from within my app on every Android device I’ve tested on, so there must be something different about them.
I’ve run another test where I push an audio file (recorded on my Mac using Audacity) onto the device via Eclipse and that plays fine too.
So it’s just audio clips recorded on iOS or on my Mac via the app that won’t play on Android devices.
I’ve checked and I’ve not double up on the extensions (so I don’t have clip-1.wav.wav) or leaving them off (so no clip-1 with no extension). Everything seems to be in order but it’s as if the actual “type” of wav file is different… is that possible? Can there be different types of WAV file recorded by different devices?
Any help would be much appreciated - is this a bug or am I doing something wrong??
Thanks in advance.
Ian