Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^4: Playing wav files

by pryrt (Abbot)
on Feb 09, 2019 at 17:14 UTC ( [id://1229665]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Playing wav files
in thread Playing wav files

1 until $WAV->Status(); is perfectly-valid perl; it's using the Statement Modifiers syntax rather than the Compound Statements syntax. I didn't come up with most of that example: except for the for loop at the end, it's verbatim from the Win32::Sound documentation, specifically their EXAMPLE at the end: everything until the ############ was theirs, not mine, and should work. That line, specifically, is saying "loop doing nothing (1 is a noop, in that case) until $WAV->Status() is true"; that status will go true when the wav is done playing.

If it's not working, there's something wrong with your perl installation or Win32::Sound installation on your machine.

Are using Strawberry Perl, ActiveState, cygwin, or WSL (Windows Subsystem for Linux)? The full output of perl -V (that's a capital V) might help us debug what's going wrong, along with perl -MWin32::Sound -le "print $INC{'Win32/Sound.pm'}; print $Win32::Sound::VERSION".

Replies are listed 'Best First'.
Re^5: Playing wav files
by merrymonk (Hermit) on Feb 10, 2019 at 16:58 UTC
    Fair enough - it was something I simply had not seen before so I will look more carefully at your Perl and some references etc!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1229665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-20 01:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found