Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
go ahead... be a heretic
 
PerlMonks  

Re: Changing volume in Linux with Perl?

by PipTigger (Friar)
on Jan 16, 2001 at 16:15 UTC ( #52222=note: print w/ replies, xml ) Need Help??


in reply to Changing volume in Linux with Perl?

I've tried hard to get ioctl && all the other .ph files to werk. I had to run h2ph on like 7 different .h files to fulfill all the embedded require's but I've tried tons of stuff for the past hour to tweak my new /usr/local/lib/site_perl/i386-linux/linux/soundcard.ph file so that it'd let my little script run to no avail. My little test is:

#!/usr/bin/perl -w require 'ioctl.ph'; require 'linux/soundcard.ph'; my $data = 0; open MIXR, "</dev/mixer" || die "Can't open mixer!\n"; ioctl(MIXR, &MIXER_READ(0), $data) || die "Can't ioctl!\n"; close MIXR; print "data: $data\n";
This results in:

Use of uninitialized value at (eval 621) line 1.
Can't ioctl!


&& the eval ending on that line looks like another normal one:
eval 'sub SEQ_PITCHBEND { local($dev, $voice, $value) = @_; eval q( &SEQ_V2_X_CONTROL($dev, $voice, &CTRL_PITCH_BENDER, $ +value) ); }' unless defined(&SEQ_PITCHBEND);
If you can possibly point me in a better direction, I'd really appreciate it. I've been pounding my head against this for a long time && can't seem to go anywhere with this. I'm feeling really surprised at how difficult this seems to be in Perl! Maybe it's appropriate since it's one of the "hard/possible" things but it seemed like it should be "easy/easy". Anyways, I'm probably just gonna cave in && use C if I can't get Perl to do it within the next day or so. I really wanted to be competent enough to get this to werk on my own but I'm left to conclude that I'm really not experienced enough with Perl || Linux to do this alone yet. Thanks for any help or encouragement you can offer. I'm feeling kinda down (I thinq the caffeine is wearing off). TTFN.

-PipTigger
p.s. Mr., would you please help my pony?


Comment on Re: Changing volume in Linux with Perl?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-04-19 03:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (477 votes), past polls