From kde-multimedia Tue Jun 25 08:13:53 2002 From: Rob Walker Date: Tue, 25 Jun 2002 08:13:53 +0000 To: kde-multimedia Subject: Re: Playing from a buffer using arts X-MARC-Message: https://marc.info/?l=kde-multimedia&m=102499291510243 On Tuesday 25 June 2002 07:04, Stefan Westerfeld wrote: > Hi! > > On Mon, Jun 24, 2002 at 05:09:21PM +0100, Rob Walker wrote: > > I'm a bit stuck with arts at the moment. I'm trying to use arts to > > playback data from a buffer in a C++ app, but I want to keep the gui > > responsive so the user can stop/pause/skip playback etc. From the arts > > documentation/source, I can see several ways to do this, but none seems > > to fit what I need: > > > > 1) Using ByteSoundProducer as in the streamsound.cc example. I can fill > > in the buffers with the data, but it requires that the dispatcher is in > > the blocking run() call to play the data, leaving the gui unresponsive. > > Is there a non-blocking equivalent? > > Yes, what you want to do is using a QIOManager, which will make the > dispatcher work during the Qt mainloop, so that the call to .run() is no > longer necessary. > > // from kdemultimedia/arts/builder/main.cpp: > Arts::QIOManager iomanager; > Arts::Dispatcher dispatcher(&iomanager); > > or, maybe more convenient, use KArtsDispatcher from libartskde. > Thanks, the KArtsDispatcher works great. Rob _______________________________________________ kde-multimedia mailing list kde-multimedia@mail.kde.org http://mail.kde.org/mailman/listinfo/kde-multimedia