Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Win32::Sound for Linux

by mikasue (Friar)
on Dec 31, 2007 at 23:40 UTC ( #659840=perlquestion: print w/replies, xml ) Need Help??
mikasue has asked for the wisdom of the Perl Monks concerning the following question:

Is there an equivalent to Win32::Sound for Linux? I can not find a module that plays .wav or .mid files in Linux. Thanks,

Replies are listed 'Best First'.
Re: Win32::Sound for Linux
by Snarius (Sexton) on Jan 01, 2008 at 00:40 UTC
    The only maintained library that I know about is SDL::Mixer. Frozen Bubble uses it, and SDL is cross-platform.

Re: Win32::Sound for Linux
by Tux (Abbot) on Jan 01, 2008 at 13:58 UTC

    I totally agree with Audio::Mixer. Hasn't been updated for ages, but there is no need for updates. It works.

    Enjoy, Have FUN! H.Merijn
      Did you mean SDL::Mixer? Audio::Mixer only seems to be able to set mixer volume.
      Codesearch confirms.

        No, I meant Audio::Mixer. I use that in a play-project: xwekker, an alarm clock in perl/Tk that can also play internet radio and CD's

        Enjoy, Have FUN! H.Merijn
      Can you provide an example of how to play the file? The documentation only sets parameters but never uses those settings to actually play a file - Audio::Mixer. Thanks!
Re: Win32::Sound for Linux
by Anonymous Monk on Jan 01, 2008 at 05:34 UTC
      So I found MIDI-Music but receive an error when I try to install it on my Linux box.
      cp blib/lib/MIDI/ AutoSplitting blib/lib/MIDI/ (blib/lib/auto/MIDI/Music) /usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share +/perl/5.8/ExtUtils/typemap Music.xs > Music.xsc && mv Music.xsc Musi +c.c cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno- +strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FIL +E_OFFSET_BITS=64 -O2 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fP +IC "-I/usr/lib/perl/5.8/CORE" Music.c /bin/sh: cc: command not found *** Error code 127 Stop. pmake: stopped in /home/tamika/Desktop/MIDI-Music-0.01
      Can any tell me what I need to get past this error?
      "-I/usr/lib/perl/5.8/CORE" Music.c /bin/sh: cc: command not found *** Error code 127 Stop.

        As error messages go, "command not found" is pretty clear, if you are going to compile things, you are going to have to install a compiler.

        We're not surrounded, we're in a target-rich environment!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://659840]
Approved by sub_chick
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2018-07-18 19:02 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (393 votes). Check out past polls.