A class implementing a general auditory stimulus.
Notes
See also
- expyriment.control.start_audiosystem
- expyriment.control.stop_audiosystem
- expyriment.control.audiosystem_is_busy
- expyriment.control.audiosystem_wait_end
Methods
Create an audio stimulus.
Parameters : | filename : str
|
---|
Copy the stimulus.
Returns : | copy: stimulus.Audio :
|
---|
Getter for filename
Getter for id.
Getter for is_preloaded
Play the audio stimulus.
The function returns immediately after the sound started to play. A pygame.mixer.Channel object is returned.
Parameters : | loops : int, optional
maxtime : int
fade_ms : int, optional
|
---|
Preload stimulus to memory.
Presents the sound.
The function is identical to Audio.play(loops=0, maxtime=0, fade_ms=0) and returns also immediately after the sound started to play.
Notes
See Audio.play for more information.
Stop the audio stimulus
Unload stimulus from memory.
This removes the reference to the object in memory. It is up to the garbage collector to actually remove it from memory.