Sound expensive to me...why do you have to delete the sournd from memory after playing?
The sound would not be deleted from memory, just the source. Sources, from what I can tell, do not take up a lot of memory, as they are made up of peripheral information like position, voice, gain, pan, etc. The actual sound data is stored in a sound buffer, and that is loaded only once (in my library a sound is either loaded manually, or loaded automatically if you try to play a sound that has not been loaded yet).
Once upon a time I had considered using a system where sources are recycled, but eventually abandoned the idea. You can only create around 16- 32 total sources, depending on your sound card, and each source is loaded with a single sound. So if you ever wanted to have more sound effects than that, you need to be able to actively delete sources. The problem of "limited sound effects" would be compounded exponentially if you wanted to play multiple instances of each sound effect from different positions -- each instance of each sound uses up one of those total sources.
I suppose one way this idea could be resurrected would be to hold on to sources as long as possible, until one of them had to be deleted to be used for a different sound effect or instance of a sound effect. That way if you played the same sound a hundred times in a row from different positions, you would not necessarily be creating hundreds of different sources. I may test this idea out to see if it has tangable performance benefits.
I need to place the sound source, but it doesn't have to move. It's sufficient if it stays where it started IMHO....at least for the sounds that i have in mind. I don't think that i'll add any ambient sounds. However, having the option would be nice.
I finished creating an easy method for doing this:
String quickPlay( String filename, boolean toLoop, float x, float y, float z )
It creates a source for the sound "filename" at the specified 3D position, plays the source, and removes the source when it finishes playing (unless it is a looping source). It automatically loads the sound "filename" if it hasn't been loaded yet. The sound data for "filename" stays loaded, so you are not reloading the file every time you call the quickPlay method. Return value is a random String name for the source, which you can use to manipulate the source while it is active, or just ignore it if you have no need to manipulate the source after creating it. There are multiple versions of the method, which optionally allow you to specify attenuation model (ATTENUATION_NONE for ambient sound), fade distance, or rolloff factor. I think this makes source creation on the fly quite simple, while still giving you options to do more complex things if required for a particular situation.
Anyway, sorry to get a little off topic on your thread. Screen shots from your game are looking awesome - keep it up!