Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Changing the Volume with the Win32::Sound::WaveOut module

by ixo111 (Acolyte)
on Jul 21, 2008 at 02:38 UTC ( [id://698970]=note: print w/replies, xml ) Need Help??


in reply to Changing the Volume with the Win32::Sound::WaveOut module

( only four years after the original post! )

I haven't tested this with the WaveOut portion of the Win32::Sound module, but the logic seems nearly identical in both the Win32::Sound and Win32::Sound::Waveout sections of Sound.c. Basically, snag the module, edit Sound.c and change all occurrences of '<< 8' to '<< 16' and only use 0-65536 for volume changes, not the percentage notation as specified by the documentation. This fix is only a few minutes old but I've been able to successfully set the left and right channels independently or synched, so for now that's good enough.

( note : I was using this under Cygwin but I expect it should work equally well with Activestate )
  • Comment on Re: Changing the Volume with the Win32::Sound::WaveOut module

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-06-23 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.