Mercurial > nagslang
changeset 665:a538d791ff9c v0.1.x
pygame.mixer.Sound is too clever by half and should be shot repeatedly
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sun, 08 Sep 2013 12:35:33 +0200 |
parents | 44652ef427ad |
children | 1ffd49c34f4a |
files | nagslang/sound.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/nagslang/sound.py Sun Sep 08 10:20:01 2013 +0200 +++ b/nagslang/sound.py Sun Sep 08 12:35:33 2013 +0200 @@ -35,6 +35,9 @@ def init(self): mixer.init(FREQ, BITSIZE, CHANNELS, BUFFER) + silence = self.load_sound("silence.ogg") + if silence.get_length() < 1: + raise RuntimeError("Sound load error - silence.ogg too short") self.play_sound("silence.ogg") def load_sound(self, name):