[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    Re: Playing from a buffer using arts
From:       Rob Walker <rob.lists () tenfoot ! org ! uk>
Date:       2002-06-25 8:13:53
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic