Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PsyWave: difficulty to map to PsyStimulus #67

Open
maartenuni opened this issue Jan 12, 2024 · 0 comments
Open

PsyWave: difficulty to map to PsyStimulus #67

maartenuni opened this issue Jan 12, 2024 · 0 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@maartenuni
Copy link
Contributor

The inheritance forPsy Wave is

GObject -> PsyStimulus -> PsyAuditoryStimulus -> PsyGstStimulus -> PsyWave

Every stimulus in psylib is a PsyStimulus. PsyStimulus has the following API

psy_stimulus_play(PsyStimulus*, Psytimepoint) // You'll have to set the duration manually.
psy_stimulus_play_for(PsyStimulus*, PsyTimePoint*, PsyDuration) // All parameters from the perspective from the stimulus are set it should be ready to rumble
psy_stimulus_play_until(PsyStimulus*, PsyTimePoint*, PsyTimePoint*) Same as before, but duration is calculated.

However, to use a PsyGstStimulus, you'll have to set it to running. And setting it to running, requires the duration of the stimulus to be known, otherwise, the audiotestsrc can't be given an a specified number of buffers. Preferably the stimulus is set to running, because that starts the Gstreamer pipeline, otherwise the audio mixer might be unable to fetch GstSample* 's as the pipeline is stale.

@maartenuni maartenuni added the invalid This doesn't seem right label Jan 12, 2024
@maartenuni maartenuni self-assigned this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant