Project

Profile

Help

Revision b9463109

Added by Vincent Le Goff over 4 years ago

Remove debug code from the SharpScript engine

View differences:

src/sharp/functions/play.py
28 28

  
29 29
"""Module containing the Play function class."""
30 30

  
31
import winsound
31
from pygame import mixer
32 32

  
33 33
from sharp import Function
34 34

  
35
mixer.init(buffer=1024)
36

  
35 37
class Play(Function):
36 38

  
37 39
    """Function SharpScript 'play'.
......
42 44

  
43 45
    def run(self, filename):
44 46
        """Say the text."""
45
        winsound.PlaySound(filename, winsound.SND_ASYNC | winsound.SND_FILENAME)
47
        sound = mixer.Sound(filename)
48
        sound.play()

Also available in: Unified diff