Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Sample stop
- - By danikaze Date 2012-02-05 19:30
Is there any way to control a Sample?
- Change its volume
- Stop it

Something like:
Sample s(L"sample.ogg");
s.play();
s.stop();
s.volume(0.5);


It would be very useful, since you only can do it on songs, and you only can have 1 song playing at once.
Parent - - By jsb Date 2012-02-05 21:46
Yes. Sample::play returns a SampleInstance object which you can use to do just that, i.e. pausing, resuming, changing volume etc.
Parent - By danikaze Date 2012-02-17 00:34
thanks! I'll try.
Up Topic Gosu / Gosu Exchange / Sample stop

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill