Skip to content

BF: Sound online was sometimes marked as already finished on second iteration of a loop#7016

Merged
TEParsons merged 1 commit intopsychopy:devfrom
TEParsons:dev-bf-sound-finished
Dec 18, 2024
Merged

BF: Sound online was sometimes marked as already finished on second iteration of a loop#7016
TEParsons merged 1 commit intopsychopy:devfrom
TEParsons:dev-bf-sound-finished

Conversation

@TEParsons
Copy link
Copy Markdown
Contributor

If the sound finished playing in the first iteration, it gets isFinished = true. If the Component reached its stop point, it gets .status = FINISHED (one referring to the sound itself, the second referring to the Sound Component). As with all Components, it gets .status = NOT_STARTED when the next iteration begins, but .isFinished is never set back to false.

An example of an incongruency:
You have a Sound Component called snd with duration set to 5s, it plays a sound file which is 2s long. After 2s, the sound finishes and snd.isFinished = true. After 5s, the Component finishes and snd.status = FINISHED. Next iteration of the trials loop, snd.status = NOT_STARTED (correctly, as we haven't played anything yet), but snd.isFinished = true because that wasn't automatically reset.

This solution means that a Sound always starts a Routine with isFinished = false

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.66%. Comparing base (7fe212a) to head (1d7b080).
Report is 26 commits behind head on dev.

❗ There is a different number of reports uploaded between BASE (7fe212a) and HEAD (1d7b080). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (7fe212a) HEAD (1d7b080)
4 2
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #7016      +/-   ##
==========================================
- Coverage   50.96%   41.66%   -9.30%     
==========================================
  Files         340      340              
  Lines       62332    62334       +2     
==========================================
- Hits        31769    25973    -5796     
- Misses      30563    36361    +5798     
Components Coverage Δ
app ∅ <ø> (∅)
boilerplate ∅ <ø> (∅)
library ∅ <ø> (∅)
vm-safe library ∅ <ø> (∅)

@TEParsons TEParsons merged commit 1b46cbe into psychopy:dev Dec 18, 2024
@TEParsons TEParsons deleted the dev-bf-sound-finished branch February 12, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant