NetLogo / NetLogo/Sound-Extension
`play-sound-and-wait` doesn't play full sound when forever button is also running
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
windows xp and java 1.7.0_15 and NL 5.0.2
I think there’s a NL bug evident in this NL program (attached) to do with the sound extension.
(it needs two sounds files in the same directory i.e. 1.wav and 2.wav attached).
Please note there is code in all the buttons except the setup button!
The bug seems to be that the sound recordings only sometimes play when you press the “play sound recording” button – but the sound recording always plays if you stop the go button. It’s as though there’s a ‘listener’ to play the sound recording but the listener only listens if the button to play the sound recording is pressed at some stage within a tick (but I am guessing here of course).
As background, what I am trying to do is stop a simulation at various points, ask a question, get an answer, and also provide the option for the player to listen to a voice recording of the message.
don't think i can attach an NL program here so:
extensions [ sound ]
globals [ question-id ]
to setup
crt 1
output-print "hello netlogo"
end
to go
ask turtles [ fd 1 rt 30 - random 55 ]
end
to play-sound-recording [ id ]
sound:play-sound-and-wait word id ".wav"
end
buttons:
setup
go
out-box
play sound recording: play-sound-recording question-id
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the sound:play-sound-and-wait entry point and reproduce the example using two WAV files while the go button is running. Compare playback when the play sound recording button is pressed versus after go is stopped. Done means the full recording plays reliably in both situations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100