Hi there,
For a while the sound pool confused me too, but I will try to explain how it works.
Imagine you have your little game. Now, imagine every single sound that needs to play is a sound object.
Sound gun, step, amb, enemyloop, enemytaunt;
Etc.
If your game was tiny, this would totally work.
However, once things start to get more dynamic (I.E.), you need a lot of sounds to play all at once, the sound pool will be a lot more useful for panning things in the background for you.
What's probably got you confused are so called sound slots. Imagine your phone with all its applications on its home screen.
You only want to use the calculator app, so you move your focus around until you find it, then activate it.
In the same way, when you want the sound pool to keep track of one particular sound, you can give it a sound slot to keep track of.
int gun, step, amb, enemyloop, enemytaunt;
Now when you want to assign one of these to a sound slot, you would do:
gun=pool.play_stationary("insert_path_to_sound_here/insert_sound_name_here.wav", false, false);
Possibly confusing? I'll do my best to try and clear that confusion up.
What that basically says is, assign the sound slot, gun, to a sound of your choosing, in between the quotation marks.
After the quotation marks comes. False, false);
This specifies. Non looping (I.E.), only plays once. Never set a one shot sound looping sound to true, or else some interesting things could happen.
The second false specifies non persistent, I.E., when this sound finishes playing, its slot is freed ready to be used again.
Think of it like downloading an update file to your phone, but once the update gets installed, the package file gets deleted.
Rough I know, but its really the best I could possibly think of.
For panning, the methods you will need are play_1d or play_2d, update_listener_1d, or update_listener_2d.
This all depends on if your game is true 1d or 2d, I.E., in a sidescroller with true jumps or a game with all 4 directions of movement, or 1d, a sidescroller.
Keep in mind the listener, that's you. The listener is your point of view. The sound x is where the sound should come from.
You should never really need to use the play_extended methods unless you have really specific requirements.
I hope this helps, write in if you need more help.