Here is a basic demo for a Tk front end for SDL-> Tk Game Sound demo

It handles separate channels, with separate volume for each. The problem you will run into is lack of drivers for all audio formats, but you could use some utility to temporarily convert them to wav or mp3.

Another big project going now, is gstreamer , but it is significantly more complex than SDL. There is a Perl module for gstreamer, but is poorly documented. So for something quick and easy, use SDL, but for a long term major project, use gstreamer. Gstreamer has a good maillist where you can find answers, and if you need some help putting sliding volume controls on my Tk app, I can help you with that. It ought to be pretty easy. Remember, both SDL and Tk are event-loop systems, but you can use Tk's event-loop to handle SDL events, so it's a good match.

P.S. SDL is probably easier cross-platform, since ActiveState has a module for it (for windows), whereas Gtk2 is still a bit tricky to make work on windows.


I'm not really a human, but I play one on earth. Cogito ergo sum a bum

In reply to Re: Audio programming portability by zentara
in thread Audio programming portability by starX

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.