|
Forum Index : Microcontroller and PC projects : Problem with "PLAY WAV" and PicoMite 5.070606
| Author | Message | ||||
| Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 1001 |
Hi! I want to play a few WAV files in continuous loop for a future Halloween project. Unfortunately I get an error message after some playback time. The WAV are on the flash drive (PicoMite 5.070606). Option Explicit Dim WAVbusy As INTEGER Const TRUE=1 Const FALSE=0 Do WAVbusy=TRUE Play wav "WIZSIT.wav",IROUTINE Do Loop While WAVbusy=TRUE Pause 5 WAVbusy=TRUE Play wav "MUMSIT.wav",IROUTINE Do Loop While WAVbusy=TRUE Pause 5 WAVbusy=TRUE Play wav "WIZSIT.wav",IROUTINE Do Loop While Wavbusy=TRUE Pause 5 WAVbusy=TRUE Play wav "MINACT.wav",IROUTINE Do Loop While Wavbusy=TRUE Pause 5 Loop Sub IROUTINE WAVbusy=FALSE IReturn It works for some time, then I get this error message: Here are my WAV files: WAV.zip What am I doing wrong??? Is there any way to make it easier to query for the WAV end??? THANKS! Frank |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1682 |
@Frank From manual Regards Michael causality ≠correlation ≠coincidence |
||||
| Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 1001 |
Do you think I should exchange IReturn for END SUB? I do not fully understand the text from the manual... Frank |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8304 |
Yes. An interrupt routine is now a normal SUB so IRETURN isn't required. END SUB or EXIT SUB can be used as usual. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 1001 |
Thank you both so much!!! Now it works as it should. The program now looks like this:Option Explicit Dim WAVbusy As INTEGER Const TRUE=1 Const FALSE=0 Do PlayWAV "WIZSIT.wav" PlayWAV "MUMSIT.wav" PlayWAV "WIZSIT.wav" PLAYWAV "MINACT.wav" Loop Sub PlayWAV wav$ WAVbusy=TRUE Play WAV wav$,IROUTINE Do Loop While Wavbusy=TRUE End Sub Sub IROUTINE WAVbusy=FALSE End Sub MANY THANKS!!! Frank |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1682 |
Cool! and "guten Rutsch!" (happy New Year!) ![]() causality ≠correlation ≠coincidence |
||||
| Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 1001 |
Dito!Frank |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |