Andreas Fuchs
2001-May-29 09:42 UTC
[vorbis] wishlist for ogg123 += Non-blocking verbose messages
Hi, I am using the ogg123 player through an emacs interface to mpg123 I patched up to support ogg123 (shameless plug, see http://asf.void.at/emacs.html). This has a problem (apart from it being emacs, which might offend some of you (-:): The verbose output from ogg123 is collected and inserted into a temporary buffer. This works when emacs has nothing else to do, but fails when it blocks. Then, the stderr file descriptor is not read and therefore, not flushed. This is, as you can see, a bad thing, because it blocks the player and produces skips (This also is why you can also stop the player by pressing Control-s at the console, when debugging output is on). I don't think that the unavailability of a file descriptor should stop ogg123 from playing sounds. AFAICT, it is possible to use the stderr stream in nonblocking mode, which should give ogg123 greater tolerance to such errors. How hard is it to do that? I would really like to see this bug (is it a bug? I think so...) fixed in ogg123. Thanks, -- Andreas Fuchs, <asf@acm.org>, <d96001@htlwrn.ac.at>, antifuchs <HR NOSHADE> <UL> <LI>application/pgp-signature attachment: stored </UL> -------------- next part -------------- A non-text attachment was scrubbed... Name: part Type: application/octet-stream Size: 232 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis/attachments/20010529/0e419605/part-0001.obj
Segher Boessenkool
2001-May-29 11:21 UTC
[vorbis] wishlist for ogg123 += Non-blocking verbose messages
> I don't think that the unavailability of a file descriptor should stop > ogg123 from playing sounds. AFAICT, it is possible to use the stderr > stream in nonblocking mode, which should give ogg123 greater tolerance > to such errors. How hard is it to do that? I would really like to see > this bug (is it a bug? I think so...) fixed in ogg123.Non-blocking won't help, I think... Increasing the buffer size on the stderr stdio-stream could help, as well as removing the linemode from stderr (which flushes on every newline). Cheers, Segher --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
David Balazic
2001-Jun-11 04:07 UTC
[vorbis] wishlist for ogg123 += Non-blocking verbose messages
Andreas Fuchs (asf@acm.org) wrote :> Argh, this has been sitting in my outgoing queue for quite some time > now... (-: > > On 2001-05-30, Kenneth Arnold <ken@arnoldnet.net> wrote: > > nonblocking possibly, but a simple select on fd 2 might do it (or is > > there a way to test if a write will block besides select?). > > Okay, this here is the hackish solution (patch to the beta4 version, but > I think that it ought to work with the newest CVS also): > > text/x-patch attachment: ogg123-with-async-verbosity.patch > > > It only checks whether it can write without blocking when writing the > "\rTime: %02li:%05.2f [%02li:%05.2f] of %02li:%05.2f, Bitrate: %.1f \r" > message, which is kind of suboptimal. I think that it should be done > in a uniform way anyway, which would mean that every call to > fprintf (stderr...) should be replaced by a function that checks whether > it can write, and only then writes to stderr.Or you could just stop (ab)using stderr for something it was not designed for.> Oh, and BTW: this patch adds another command line switch, -a for > asyncronous (yes, it could also be "artifact", as it is not really > asyncronous I/O, AFAICT (-:). > > > If you give me a simple remote-control interface (similar to mpg123's > > maybe?) I could implement it, but not soon because I have tons of > > end-of-year concerns to worry about and I'm not getting graded on > > ogg123. Volunteers? > > Hm, that's next[1] on my TODO list. Right now, apt-get is pulling the > mpg123 source over to my computer. > > [1] Actually, it wasn't. I'll take a look at it as soon as I have > time again, which should be soon. > > -- > Andreas Fuchs, <asf@acm.org>, <d96001@htlwrn.ac.at>, antifuchs-- David Balazic -------------- "Be excellent to each other." - Bill & Ted - - - - - - - - - - - - - - - - - - - - - - --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.