in reply to Win32::Sound module problem
please help
You forgot to use Win32::Sound; :D
It seems, you need the process (thread) to live, for the sound to get played
This (sleep) works, it makes noise
Omit the sleep and it doesn't make noise. Looping also worksperl -MWin32::Sound -e " Win32::Sound::Play( qq[$ENV{WINDIR}/media/cho +rd.wav] , SND_ASYNC ); sleep 3; Win32::Sound::Stop(); "
perl -MWin32::Sound -e " Win32::Sound::Play( qq[$ENV{WINDIR}/media/cho +rd.wav] , Win32::Sound::SND_ASYNC() | Win32::Sound::SND_LOOP() ); sle +ep 3; Win32::Sound::Stop(); "
Don't mess with volume, that is users job :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Win32::Sound module problem
by palkia (Monk) on Jul 19, 2011 at 00:08 UTC |