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?

In reply to Re: Changing volume in Linux with Perl? by PipTigger
in thread Changing volume in Linux with Perl? by PipTigger

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.