from direct.showbase.SfxPlayer import SfxPlayer

Contains the SfxPlayer class, a thin utility class for playing sounds at a particular location.

Inheritance diagram

Inheritance diagram of direct.showbase.SfxPlayer

class SfxPlayer[source]

Bases: object

Play sound effects, potentially localized.

UseInverseSquare = 0

Return the curent cutoff distance.

getLocalizedVolume(self, node, listenerNode=None, cutoff=None)[source]

Get the volume that a sound should be played at if it is localized at this node. We compute this wrt the camera or to listenerNode.

playSfx(self, sfx, looping=0, interrupt=1, volume=None, time=0.0, node=None, listenerNode=None, cutoff=None)[source]
setCutoffDistance(self, d)[source]
setFinalVolume(self, sfx, node, volume, listenerNode, cutoff=None)[source]

Calculate the final volume based on all contributed factors.