Note Pyzzle sound functionally is due for an extension.
|
Methods
|
|
__init__
getFile
getVolume
play
setFile
setVolume
stop
|
|
|
__init__
|
__init__ (
self,
file,
volume=1.0,
)
Sound constructor.
Define a new Sound. Parameters:
-
file
- (string) File name. Pyzzle will look for this file in
the directory set by: paths.setSoundPath().
-
volume = 1.0
- (real) set the volume level of the sound.
Defaults to full. (Not currently working).
|
|
|
getFile
|
getFile ( self )
->
file. returns the sounds file name.
|
|
|
getVolume
|
getVolume ( self )
->
volume (real). returns the Sounds volume level.
|
|
|
play
|
play ( self, loopflag=0 )
Play the sound:
Sound. Parameters:
-
loopflag
- (boolean). If this flag is set to true, the sound
will continually loop until stopped or another sound is played.
|
|
|
setFile
|
setFile ( self, file )
Set a new Sound file
name. Parameters:
-
file
- (string) File name. Pyzzle will look for this file in
the directory set by: paths.getSoundPath().
|
|
|
setVolume
|
setVolume ( self, volume )
Set a new volume for the sound. (Volume change is not currently
working). Parameters:
-
volume
- (real, range: 0.0 - 1.0). Volume level.
|
|
|
stop
|
stop ( self )
Stop playing the
Sound.
|