Skip to content

sound not played, when loaded from different module #38

Open
@piotx

Description

@piotx

when I load a module, which contains commands to play sound, no sound is played (no error message). I have the same problem on linux as well as on windows 8

minimal example:

main.py:

import module1

module1.py:

import sounddevice as sd
import soundfile as sf
import time
data, fs = sf.read('startle50ms.wav')
sd.play(data,fs)
print 'sound played'
time.sleep(1)

If I run module1.py, everything is ok. If I run main.py, which is supposed to load module1, no sound is played; no error message displayed. Everything seems to be ok, but I can't hear any sound

If you are aware of a simple solution, it would be great, otherwise I would have to rewrite quite some code (to put everything in one script), if I wanted to use sounddevice in our experiment.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions