Hi Fellow Monksters,
I've been writing a game (yet another perl minesweeper) as a way of teaching myself Perl/Tk and have come to the part where I want to add sounds for various actions:
- ticking sound for the clock/timer
- click sound (harder than the ticking) for mouse clicks
- harsh buzzer or explosion for clicking on a mine
- ding-ding-ding or some other appropriate sound for winning
I know I can play a bell sound by printing "\a", but it isn't that great and I'd like to play better sounds. I do what it to be cross-platform compatible if possible, i.e., both MS and *NIX. I have searched CPAN and the various 'SOUND' modules there seem to be platform-specific and I have not found any good examples.
Therefore, I am asking for the wisdom of the Perl adherents who have gone this way before. What say ye? What modules have you used or methods devised for making/playing such sounds? Can you point me to any script examples? Are there any cross-platform solutions?
I am your humble supplicant.
"Peace, love, and Perl...well, okay, mostly just Perl!" --me
Apprentice
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.