Re: bgt, sound pool, refering to individual sounds?

Yes, great move CAE. It is a good idea to track it either way, but occasionally I use the folowing method. I never got this at first, but there is an array in the sound_pool of course you know, and you may access items like this, say, change the volume, you would do this.
int slot=pool.play_stationary("sounds/thing.wav",false,true); //persistant from what somebody else said earlier here.
for(double x=0; x>-40; x--)
{
pool.items[slot].handle.volume=x;
wait(20);
}
and that would make a sound fader, no point in using update_sound_start_values if you can just modify the handle directly.
You see, Omar, the sound pool is simply an array of sound_pool_item objects, which in turn hold sound handles, and use sound_positioning for the movement.
So if you access the pool's items array directly, you can have say int amb, and do something like this for a quick change.
int amb; //ambience for later use.
amb=pool.play_stati onary("ambience.ogg",true);
wait(5000); //it won't really do this but it needs to play.
//now we access the pool items array, and change the sound
pool.items[amb].handle.stop();
pool.items[amb].handle.stream("ambience2.ogg");
pool.items[amb].handle.play_looped();
And there.

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Omar Alvarado via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Victorious via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : coltonhill01 via Audiogames-reflector

Reply via email to