-
I am writing an application that plays sound, using the "playsound" api. When playing sounds it uses the "loop/async" flags.
Is there a way of stopping the current sound from playing without playing the same sound again?
I have thought of recording a silent WAV file - but this seems over the top. I have played with the SND_PURGE flag - but can't seem to get it to work.
Thanks
-
Well I've just answered my own question. I did need SND_PURGE after all but it didn't work quite as I thought.
This did NOT work...
playsound "", 0&, SND_PURGE
Nor did this...
dim strTemp as string
strTemp = ""
playsound strTemp, 0&, SND_PURGE
However, this did...
dim strTemp as string
playsound strTemp, 0&, SND_PURGE
I guess I was wrong in thinking that "" was a "null" string...
-
if you want null values, you can use the vbNull keyword.
thnx.
-