| Home | Trees | Indices | Help |
|
|---|
|
|
Load and play sounds
There are various APIs for this, none of which are perfect. By default PsychoPy will look for and use, in this order: ['pygame','pyglet','pyaudio'] The API chosen will be stored as a string under:
sound.audioAPI
and can be set using, e.g.:
sound.setAudioAPI('pyglet')
| Classes | |
|
Sound Create a sound object, from one of many ways. |
|
|
SoundPygame Create a sound object, from one of many ways. |
|
|
SoundPyglet Create a sound object, from one of MANY ways. |
|
|
SoundPyaudio Create a sound object, from one of MANY ways. |
|
| Functions | |||
|
|||
|
|||
|
|||
|
|||
| Variables | |
mediaLocation =
|
|
preferredAPI =
|
|
audioAPI =
|
|
havePyglet = True
|
|
havePygame = True
|
|
pa = pyaudio.PyAudio()
|
|
havePyaudio = False
|
|
API =
|
|
| Function Details |
If you need a specific format for sounds you need to run this init function. Run this before creating your visual.Window. The format cannot be changed once initialised or once a Window has been created. If a Sound object is created before this function is run it will be executed with default format (signed 16bit stereo at 44KHz). For more details see pygame help page for the mixer. |
Change the API used for the presentation of sounds
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Nov 3 14:03:43 2010 | http://epydoc.sourceforge.net |