Folder Structure (simulator versus device)

Doing some initial development work with Corona and noticing that my audio is not playing on device. Took a look on google and noticed some comments from 1-2 years ago about Corona not allowing subfolders… Then comments about subfolders on IOS but not Android. Etc, etc… Then the following link:

http://www.coronalabs.com/blog/2012/07/10/best-practices-for-organizing-projects/

…looking for some clarification.

I currently have the following subfolders:

/audiofx
/music
/images
/scripts

But I also have the idea of organizing my level content into this structure:

/levels/tutorial/audiofx/
/levels/tutorial/music/
/levels/tutorial/images/
/levels/tutorial/scripts/

/levels/boss/audiofx/
/levels/boss/music/
/levels/boss/images/
/levels/boss/scripts/

…it would really hurt to have to cram everything into the root folder. Some clarification please!

BTW, here is the code:

[code]
– PLAY TEMP AUDIO TRACK
backgroundMusic = audio.loadStream(“music/game/level1/rickmassacre-dnb-drum-loop-5.mp3”)

function playBackgroundMusic()
audio.play( backgroundMusic, { channel = 1, loops = -1, fadein = 10} )
end

playBackgroundMusic()

[code]

P.S. I’ve tried the audio in both wav and mp3 formats. [import]uid: 182425 topic_id: 33555 reply_id: 333555[/import]

I’m not aware of any current folder restrictions for images and audio in the current Corona SDK builds. This shouldn’t be a problem with any recent public or daily build.

Today the #1 reason why something works in the simulator but not the device is a case sensitivity issue. The Simulator ignores the case of the letters in file names and paths. The devices care.

[import]uid: 199310 topic_id: 33555 reply_id: 133375[/import]

Thanks for the heads up. I’m now using a sound sample pulled from one of the demo projects and placed into my project’s root folder. That’s playing in simulator but not playing on device either. So must be something getting lost during the build. (I’ve doublechecked letter case)

I’m moving my builds onto device (iPad3) using the iPhone Configuration Utility. Any known problems using that as a method of transferring builds? [import]uid: 182425 topic_id: 33555 reply_id: 133381[/import]

I’ve personally never used that method. I prefer to use Xcode’s Organizer.

Just to make sure, your iPad isn’t muted or has the volume all the way down?

Can you play any sound or is it just this background track?
[import]uid: 199310 topic_id: 33555 reply_id: 133420[/import]

Based on the details so far, I’m guessing it’s an issue with your build transfer method. As Rob says, use either the Xcode Organizer, or drag the compiled app file on to the iTunes icon in your dock, plug in your device, make sure the app is checked to install on the device, and hit “sync”.

Brent [import]uid: 200026 topic_id: 33555 reply_id: 133450[/import]

I’m not aware of any current folder restrictions for images and audio in the current Corona SDK builds. This shouldn’t be a problem with any recent public or daily build.

Today the #1 reason why something works in the simulator but not the device is a case sensitivity issue. The Simulator ignores the case of the letters in file names and paths. The devices care.

[import]uid: 199310 topic_id: 33555 reply_id: 133375[/import]

Thanks for the heads up. I’m now using a sound sample pulled from one of the demo projects and placed into my project’s root folder. That’s playing in simulator but not playing on device either. So must be something getting lost during the build. (I’ve doublechecked letter case)

I’m moving my builds onto device (iPad3) using the iPhone Configuration Utility. Any known problems using that as a method of transferring builds? [import]uid: 182425 topic_id: 33555 reply_id: 133381[/import]

I’ve personally never used that method. I prefer to use Xcode’s Organizer.

Just to make sure, your iPad isn’t muted or has the volume all the way down?

Can you play any sound or is it just this background track?
[import]uid: 199310 topic_id: 33555 reply_id: 133420[/import]

Based on the details so far, I’m guessing it’s an issue with your build transfer method. As Rob says, use either the Xcode Organizer, or drag the compiled app file on to the iTunes icon in your dock, plug in your device, make sure the app is checked to install on the device, and hit “sync”.

Brent [import]uid: 200026 topic_id: 33555 reply_id: 133450[/import]