Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Win32::Sound for Linux

by mikasue (Friar)
on Dec 31, 2007 at 23:40 UTC ( [id://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.

    SDL::Mixer
Re: Win32::Sound for Linux
by Tux (Canon) 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 Music.pm blib/lib/MIDI/Music.pm AutoSplitting blib/lib/MIDI/Music.pm (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.
      Thanks!

        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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-25 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found