Package pyjsdl :: Module mixer :: Class Sound

Class Sound

object --+
         |
        Sound

pyjsdl.mixer.Sound

Instance Methods
 
__init__(self, sound_file, id=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
play(self, loops=0, maxtime=0, fade_ms=0)
Play sound on mixer channel. Argument loops is repeat number or -1 for continuous, maxtime is maximum play time, and fade_ms is fade-in time.
 
stop(self)
Stop sound on active channels.
 
fadeout(self, time)
Fadeout sound on active channels in given time.
 
set_volume(self, volume)
Set sound volume. Argument volume of value 0.0 to 1.0.
 
get_volume(self)
Get sound volume.
 
get_num_channels(self)
Get number of channels sound is active.
 
get_length(self)
Get length of sound sample.
 
get_sound_object(self)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, sound_file, id=None)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)