|
Forum Index : Microcontroller and PC projects : Checking to see if a wav file is playing
| Author | Message | ||||
| karjo238 Regular Member Joined: 12/10/2018 Location: New ZealandPosts: 60 |
Alright, I've got a silly question, and after a bit of searching, I can't seem to find an answer. I want to play a wav file, wait for it to finish, then play another wav file. The second wav file can be different from run to run, so I can't just make it one file. Is there a variable that can be checked in MMBasic to see if the wav file is playing? There was one called audio_is_playing, but that doesn't seem to work for WAV files. As always, any help is gratefully appreciated! Joseph. |
||||
| KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1945 |
Not knowing the platform etc but from the Plus manual. There is an optional interrupt setting: PLAY WAV file$ [,interrupt] The interrupt is called when the file is finished playing.NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
| karjo238 Regular Member Joined: 12/10/2018 Location: New ZealandPosts: 60 |
Sorry, I didn't make myself too clear the first time around. I'm using MMBasic 5.04 on a Micromite Extreme 144, and what I really wanted to find out was whether there was a system variable to flag audio (of any kind) playing. the [,interrupt] option doesn't quite work for what I need, so I was looking (maybe in vain) for another option. Many thanks, Joseph. |
||||
| KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1945 |
Sounds like a special situation, my interrupt simply sets a flag, there are a number of places in my Grandfather clock that play different sound files, they all check the playing flag before starting and set it once they start. I haven't seen any other way mentioned, but Geoff or Peter could answer that definitely. Mike. NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
| karjo238 Regular Member Joined: 12/10/2018 Location: New ZealandPosts: 60 |
Aargh! I wasn't in the right headspace, and you're absolutely right! I made my own flag, and all is well! Many thanks for giving me a gentle nudge in the obvious direction Joseph. |
||||
| KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1945 |
Been there done that (all the time lately), that's what's great about these forums, someone usually comes up with something that gives you a nudge towards that OH feeling Cheers Mike. NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |