Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`play-sound-and-wait` doesn't play full sound when forever button is also running

Aperta
#2 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
desktop

Direzione di ricerca

Inizia dal punto di ingresso sound:play-sound-and-wait e riproduci l’esempio usando due file WAV mentre il pulsante go è in esecuzione. Confronta la riproduzione quando viene premuto il pulsante per riprodurre la registrazione audio con quella dopo l’arresto di go. Il lavoro è completato quando l’intera registrazione viene riprodotta in modo affidabile in entrambe le situazioni.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Java
Stelle
4
Fork
6
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NetLogo/Sound-Extension

Tutte le issue di NetLogo/Sound-Extension

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.