hello

I tried to play a wav file with
system('start','','C:\WINDOWS\Media\tada.wav');
but it played it in my windows media player as default like it would if I just double-clicked the file.

what I'm trying to do is to play it without opening any media player,
like windows itself does with wav files when they are used automatically when an event occurs like:
connecting/disconnecting a usb device,starting/ending, windows, receiving alert, etc...

So I figured those cases are when windows itself plays the wav file so I tried:
system('start','win','C:\WINDOWS\Media\tada.wav');
which did nothing.
and
system('start','win32','C:\WINDOWS\Media\tada.wav');
which got an error (something about windows was unable to find win32, same for anything I tried in its place (including 'windows'))

So.. yeah I got nothing.
Is there a simple way to do this ?
Most preferable without depending on modules.

Thx

In reply to how to play wav files without calling any media player ? by palkia

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.