Here's yet another ogg123 patch that: 1) Adds a command-line parameter "--prebuffer n" or "-p n" that decodes "n" chunks into the buffer before even forking off the writer thread. 2) Moves the buffer_shutdown call in ogg123.c to its proper place. 3) Doesn't use signals ;) This way, the default behavior is to start playing immediately, while allowing the user to buffer as much as he/she wants. It may be worth it to make the writer thread stop and rebuffer when it empties, but that may require a rewrite. I don't know if this is what you guys are looking for, but it seems to work for me. Aaron Plattner <HR NOSHADE> <UL> <LI>text/plain attachment: buffer.diff </UL> -------------- next part -------------- A non-text attachment was scrubbed... Name: buffer.diff Type: application/octet-stream Size: 7008 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010303/b6d6fe1e/buffer-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: part Type: application/octet-stream Size: 233 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010303/b6d6fe1e/part-0001.obj
Anyone want to comment on this? Cons? Pros (if any)? Rants against my sloppy coding style? Aaron Plattner On Sat, Mar 03, 2001 at 03:10:03PM -0600, Aaron Plattner wrote:> Here's yet another ogg123 patch that: > > 1) Adds a command-line parameter "--prebuffer n" or "-p n" that decodes "n" > chunks into the buffer before even forking off the writer thread. > 2) Moves the buffer_shutdown call in ogg123.c to its proper place. > 3) Doesn't use signals ;) > > This way, the default behavior is to start playing immediately, while allowing > the user to buffer as much as he/she wants. It may be worth it to make the > writer thread stop and rebuffer when it empties, but that may require a rewrite. > > I don't know if this is what you guys are looking for, but it seems to work for > me. > > Aaron Plattner<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: 233 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010305/6c538489/part-0001.obj