[vorbis-dev] ogg123 STDIN-control patch

Peter Surda
Tue, 08 May 2001 14:21:57 -0000

Hello ppl!

I asked some time ago how about adding the option to control ogg123
interactively from command line, similar to mpg123. So I got fed up waiting
and added it myself today. The code initially comes from mpg123, I already
adapted it to work with aviplay and vlc so it's proven and shouldn't
introduce
many problems.

The only problems I see now:
- in order to compile ogg123 now needs sys/time.h and unistd.h
- after unpausing the sound becomes distorted for a couple of milliseconds, I
  guess it's caused by soundcard buffer not being filled fast enough or
  something like that.

Patch is against vanilla vorbis-tools-1.0beta4 and works fine on me (RH linux
6.2, kernel 2.4.3, sb-live! 1024).

It is turned on with command line switches -r or --rc (stands for remote
control).

Commands:
p<enter> -> toggle pause
q<enter> -> quit
s<enter> -> stop, i.e. pause and seek to pos 0
r<number><enter> -> seek to number-th seconds

The patch itself is pretty straightforward, no black magic.

Enjoy and commit to cvs :-)

Bye,

Peter Surda (Shurdeek) <surda@bigfoot.com>, ICQ 10236103, +436505122023


--
                   Disc space - The final frontier.





text/plain attachment: ogg123.diff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ogg123.diff
Type: application/octet-stream
Size: 3651 bytes
Desc: not available
Url :
http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010508/8f07d905/ogg123-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: part
Type: application/octet-stream
Size: 233 bytes
Desc: not available