I have a Titanium Mobile project for iOS devices and would like to make the music continue playing whilst the application is inactive, and if possible whilst the device is locked.
The audio files are within the application only, not in the iTunes library.
You'll have to set the background modes in the .plist file that is generated as part of the XCode project.
See this link http://www.codeproject.com/Articles/124159/Hour-21-Building-Background-Aware-Applications
and look for the section called Adding the Background Modes Key
Background audio playing must be a fundamentally important part of your app's functionality to use this, otherwise it will be rejected when you apply to submit it to the app store.