Playing sounds in BCPy2000
Posted: 01 Feb 2023, 05:42
Hi BCI2000 Community, I am here again
.
I wanted to play a sound when specific cue appears on the screen. However, I don't known why my code did not work.
Here is my simple code:
I don't know if I am duing something wrong, can anyone help me?
Thanks in advance!
I wanted to play a sound when specific cue appears on the screen. However, I don't known why my code did not work.
Here is my simple code:
Code: Select all
from BCPy2000.WavTools import PyAudioInterface
class BciApplication(BciGenericApplication):
....
def Preflight(self, sigprops):
self.playerOnset = PyAudioInterface.player('./feedback-drums.WAV')
def Transition(self, phase):
if (pahse == 'cue'):
self.playerOnset.play()
...
Thanks in advance!