Record Audio and Share via AutoLan

I am having an issue with audio file creation and sharing between the same type of devices (i.e. iPhone sharing to iPhone). I am not sure if the issue is with AutoLan or the audio file creation in Corona. Anyways, I am recording an audio file and storing it locally on the users device, cool everything works fine. I am wanting to share that audio file with another device using AutoLan. I use AutoLan to share other data and just wanted to add sound sharing to the existing functionality. Everything seems to work fine, audio file gets sent to the other device via AutoLan. The problem is that the audio file that was sent to the client device can’t be played. The file is fine and can be played on the server device(original device that created the audio file) but not on the client device(one who received the file).

I cannot for the life of me figure this out. I can open the files in TextEdit or TextMate and notice a difference in the first part of the file. The original audio file starts off like this: “FORMo‡AIFFCOMM/Ù@¨” where as the copied file doesn’t have this part. This is the only difference between files. I use AutoLan for sharing other files and data but sharing created audio from Corona is the only this that is not working. So I am sure its not an AutoLan issue. I would use something other then AutoLan if I knew an alternative but I don’t think that will solve my issue.

For Brent or some other Advanced Corona users/engineers, is there a difference in how Corona creates audio files vs if I use an audio file created elsewhere? I am trying to wrap my head around why this refuses to work with JUST audio created from within Corona. I am basically questioning the beginning part of the created audio file"FORMo‡AIFFCOMM/Ù@¨" and why that’s not appearing in the received copy of the same audio file.

Thanks to anyone who can shed some light on this issue.

Sounds like the data is being modified by the AutoLan transfer. Are you sending the file as binary? If not, the content will not be the same. You can check the received file size and also create a MD5 hash using Corona to verify the same data has been transferred. Another solution is using the Zip plugin to zip up the auto file and unzip it on the other side. If the data is not being transferred correctly, you should receive a error when you unzip the file. I’m assuming you are sending the file to another device running a Corona app.

Corona uses the native OS to create the audio files so they should be playable on another device.

Thank you so much Tom for the reply. I will try zipping and creating an MD5 hash to make sure I am getting the same data. I will let you know what I find, thanks again!

Hey Tom, quick update. I was previously testing in the Simulator and just tested out today on actual devices and everything is working as it should. So I am not really having any issues after all, I just need to do actual testing on a device instead of on the simulator. Thank you for your help Tom, you guys keep up all the hard work!

Sounds like the data is being modified by the AutoLan transfer. Are you sending the file as binary? If not, the content will not be the same. You can check the received file size and also create a MD5 hash using Corona to verify the same data has been transferred. Another solution is using the Zip plugin to zip up the auto file and unzip it on the other side. If the data is not being transferred correctly, you should receive a error when you unzip the file. I’m assuming you are sending the file to another device running a Corona app.

Corona uses the native OS to create the audio files so they should be playable on another device.

Thank you so much Tom for the reply. I will try zipping and creating an MD5 hash to make sure I am getting the same data. I will let you know what I find, thanks again!

Hey Tom, quick update. I was previously testing in the Simulator and just tested out today on actual devices and everything is working as it should. So I am not really having any issues after all, I just need to do actual testing on a device instead of on the simulator. Thank you for your help Tom, you guys keep up all the hard work!