Audio-Play-MPG123

 view release on metacpan or  search on metacpan

MPG123.pm  view on Meta::CPAN


(In case you wonder, the mpg123 author is not interested in including
these fixes and enhancements into mpg123).

=head2 METHODS

Most methods can be either BLOCKING (they wait until they get an answer,
which usually takes half a mpeg frame of playing time), NONBLOCKING (the
functions return as soon as they send their message, which is usallly
instant) or CACHING (the method returns some cached data which only gets
refreshed by an asynchronous STAT event or an explicit call to C<state>).

=over 4

=item new [parameter => value, ...]

This creates a new player object and also starts the mpg123 process. New
supports the following parameters:

   mpg123args      an arrayreg with additional arguments for the mpg123 process

README  view on Meta::CPAN

    this module is broken.

    (In case you wonder, the mpg123 author is not interested in including
    these fixes and enhancements into mpg123).

  METHODS
    Most methods can be either BLOCKING (they wait until they get an answer,
    which usually takes half a mpeg frame of playing time), NONBLOCKING (the
    functions return as soon as they send their message, which is usallly
    instant) or CACHING (the method returns some cached data which only gets
    refreshed by an asynchronous STAT event or an explicit call to "state").

    new [parameter => value, ...]
        This creates a new player object and also starts the mpg123 process.
        New supports the following parameters:

           mpg123args      an arrayreg with additional arguments for the mpg123 process

    load(<path or url>) [BLOCKING]
        Immediately loads the specified file (or url, http:// and file:///
        forms supported) and starts playing it. If you really want to play a

mpg123/audio_win32.c  view on Meta::CPAN

           case MMSYSERR_NODRIVER:
               MessageBox(NULL, "There is no audio driver in this system.", "Error...", MB_OK);
               break;
           case MMSYSERR_NOMEM:
              MessageBox(NULL, "Unable to allocate sound memory.", "Error...", MB_OK);
               break;
           case WAVERR_BADFORMAT:
               MessageBox(NULL, "This audio format is not supported.", "Error...", MB_OK);
               break;
           case WAVERR_SYNC:
               MessageBox(NULL, "The device is synchronous.", "Error...", MB_OK);
               break;
           default:
               MessageBox(NULL, "Unknown Media Error", "Error...", MB_OK);
               break;
       }
       return -1;
   }

   waveOutReset(dev);
   InitializeCriticalSection(&cs);



( run in 0.431 second using v1.01-cache-2.11-cpan-0d8aa00de5b )