Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#21 @P 3 missing!

closed-fixed
nobody
9
2004-11-21
2002-11-28
Erick Calder
No

using v 0.2.10 I'm finding that mpg321 is missing
a very useful status that mpg123 generates. From
the docs:

> @S {0, 1, 2, 3}
> Stop/pause status.
> 0 - playing has stopped. When 'STOP' is entered,
or the mp3 file is finished.
> 1 - Playing is paused. Enter 'PAUSE' or 'P' to
continue.
> 2 - Playing has begun again.
> 3 - Song has ended.

there is a meaningful distinction between the
player stopping (because the user asked it to -
which should be reported) and the track ending.

I've written a POE wrapper for mpg123 which I'm
trying to port to mpg321 but the lack of this status
breaks the wrapper since it doesn't otherwise have
a way to know when a track is finished...

could we _please_ add this feature ASAP?

1k thx - e

Discussion

  • Erick Calder
    Erick Calder
    2002-11-28

    • labels: --> mpg123 interface
     
  • Erick Calder
    Erick Calder
    2002-11-28

    • priority: 5 --> 9
     
  • Logged In: YES
    user_id=719421

    Here is a patch (mail me to get it without lines being
    broken up):

    --- mad.c 2002-03-24 06:49:31.000000000 +0100
    +++ mad.c.new 2004-10-23 18:48:39.000000000 +0200
    @@ -51,7 +51,7 @@
    if (status != MPG321_REWINDING && playbuf->done)
    {
    status = MPG321_STOPPED;
    - if (options.opt & MPG321_REMOTE_PLAY) printf("@P 0\n");
    + if (options.opt & MPG321_REMOTE_PLAY) printf("@P 3\n");
    return MAD_FLOW_STOP;
    }

    --- README.remote 2002-02-19 04:08:46.000000000 +0100
    +++ README.remote.new 2004-10-23 20:58:06.000000000 +0200
    @@ -39,8 +39,10 @@
    mpg123 tagline. Output at startup.

    @I mp3-filename
    -Prints out the filename of the mp3 file, minus the
    extension. Happens after
    -an mp3 file has been loaded.
    +Prints out the filename of the mp3 file, minus the
    extension, or its ID3
    +informations if available, in the form <title> <artist> <album>
    +<year> <comment> <genre>.
    +Happens after an mp3 file has been loaded.

    @S <a> <b> <c> <d> <e> <f> <g> <h> <i> <j> <k> <l>
    Outputs information about the mp3 file after loading.
    @@ -64,8 +66,12 @@
    Current-frame and frames-remaining are integers;
    current-time and
    time-remaining floating point numbers with two decimal places.

    -@S {0, 1, 2}
    +@P {0, 1, 2, 3}
    Stop/pause status.
    -0 - playing has stopped. When 'STOP' is entered, or the mp3
    file is finished.
    +0 - Playing has stopped. When 'STOP' is entered, or the mp3
    file is finished.
    1 - Playing is paused. Enter 'PAUSE' or 'P' to continue.
    2 - Playing has begun again.
    +3 - Song has ended.
    +
    +@E <message>
    +Unknown command or missing parameter.

     
  • Logged In: YES
    user_id=712646

    Patch applied.

     
    • status: open --> closed-fixed