Re: Help with choosing between Python VS. PureBasic

I wrote something like a port of BGT's sound_positioning functions to Pygame:

https://www.sendspace.com/file/yja837

The convert function takes pan and volume in the units used by BGT, and returns a toople for the channel volumes as used for pygame sound.
But you don't need to use that unless you're adjusting a sound directly; otherwise, the position_sound_1d and position_sound_2d functions should work exactly as they do in BGT. Just be sure to send a channel instead of a sound.
So, in BGT, you might do:

sound mysound;
mysound.load("c:\\windows\\media\\ding.wav");
position_sound_2d(mysound, 0, 0, 4, 2, 1, 1, 0);
mysound.play();

Whereas the python version would be like:

mysound=pygame.mixer.Sound("c:\\windows\\media\\ding.wav")
position_sound_2d(mysound.play(), 0, 0, 4, 2, 1, 1, 0)

IIRC, there's a way to get the channel before playing, but I don't remember it offhand. That might be better just to avoid buffering issues.

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Orin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : dhruv via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : dhruv via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : dhruv via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : danny via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : tward via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : severestormsteve1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : severestormsteve1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : dhruv via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : severestormsteve1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : dhruv via Audiogames-reflector

Reply via email to