I am about to commit HTTP streaming code for ogg123. This has no relation to the discussion about "real" steaming Ogg; it just downloads and plays at the same time. But unless you have a direct T3 connection, it'll almost definately break up quite frequently. Solution? Buffer. But I have other things to work on for the rest of the day... Any screaming objections? This has been tested on some of the example files up at www.vorbis.com. It has no proxy support, no HTTP authentication, or any other nice stuff like that. Just do, e.g., % ogg123 http://www.vorbis.com/music/blueperiod_itsover.ogg Kenneth __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/
On Sat, 29 Jul 2000, Kenneth C. Arnold wrote:> I am about to commit HTTP streaming code for ogg123. This has no relation to > the discussion about "real" steaming Ogg; it just downloads and plays at the > same time. But unless you have a direct T3 connection, it'll almost definately > break up quite frequently. Solution? Buffer. But I have other things to work > on for the rest of the day...Works ok here over DSL. Thanks for hacking this up, it's great. :) -r --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/
Can someone who knows Windows socket support and such port this over? And if you know sound, can you do libao too? Is there anything else non-portable in my quick hack that isn't so obvious? Thanks, Kenneth __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/
Windows supports BSD sockets through winsock.h. In general it isn't necessary or desirable to port UNIX sockets code to the WIN32-only calls. The only change you may want to make is to call the Windows function for extended error info when handling socket errors. Cheers, Robin -----Original Message----- From: Kenneth C. Arnold <kcarnold@yahoo.com> To: vorbis-dev@xiph.org <vorbis-dev@xiph.org> Date: Saturday, July 29, 2000 8:21 PM Subject: Re: [vorbis-dev] ogg123 HTTP streaming>Can someone who knows Windows socket support and such port this over? Andif>you know sound, can you do libao too? > >Is there anything else non-portable in my quick hack that isn't so obvious? > >Thanks, > >Kenneth--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/
Correct, use WIN32 threads.>From within your C++ object call _beginthread(func,0,this) where func is amember function you write that must be in the form static void __cdecl f(void* data). Since static member functions have no 'this' pointer you will want to cast 'data' back to a pointer to your object inside of func to regain access. And, away you go. It is usually best to immediately call a non-static member function on the cast object pointer so you don't have to keep dereferencing yourself. From within func be careful to explicitly call _endthread() before returning. Call TerminateThread() on the handle returned by _beginthread() if you must kill the thread externally. Include process.h. Cheers, Robin -----Original Message----- From: volsung@asu.edu <volsung@asu.edu> To: vorbis-dev@xiph.org <vorbis-dev@xiph.org> Date: Saturday, July 29, 2000 8:26 PM Subject: Re: [vorbis-dev] ogg123 HTTP streaming>I can't figure out how to work with the Win32 API, which seems >to require threads to do effective audio playback. > >Stan Seibert--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/
------- Forwarded Message Kenneth C. Arnold (kcarnold@yahoo.com) wrote :> I am about to commit HTTP streaming code for ogg123. This has no relation to > the discussion about "real" steaming Ogg; it just downloads and plays at the > same time. But unless you have a direct T3 connection, it'll almost definately > break up quite frequently. Solution? Buffer. But I have other things to work > on for the rest of the day... > > Any screaming objections? > > This has been tested on some of the example files up at www.vorbis.com. It has > no proxy support, no HTTP authentication, or any other nice stuff like that. > Just do, e.g., > > % ogg123 http://www.vorbis.com/music/blueperiod_itsover.oggWhat about this : % wget -q -O - http://www.vorbis.com/music/blueperiod_itsover.ogg | buffer | ogg123 - wget : -q , be quiet ( don't print anything ) -O - , send the file to stdout buffer : This is a program distributed with RedHat Linux ( and maybe other distros too ), that buffers data. Useful in pipelines ,like in our example. ogg123 : - - play data from stdin The moral : Don't reinvent (poorly) the wheel ! David Balazic P.S.: About streaming in XMMS, the XMMS code is really fscked up ! For example the effect plugin is called from the currently active output plugin , so if the out-plugin author forgot it, then no effect plugins will work ! Off course there are exception to this "rule". The EQ effect is a special built in effect that work always. An there is the weird idea that only one effect can be used at a time ( plus the EQ of course ). I hope they polish the code ( and the design ) up for version 2.0. ------- End of Forwarded Message --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/