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

List:       kde-multimedia
Subject:    Re: playing an mp3 with arts
From:       Martin Vogt <mvogt () rhrk ! uni-kl ! de>
Date:       2001-12-13 17:20:50
[Download RAW message or body]

On Thu, Dec 13, 2001 at 11:56:18AM -0500, Scott Wheeler wrote:
> Wow, that's great.  I was really hoping it was that easy.  Ok, now for the 
> next question.  I would like control to return to my application.  This could 
> be done pretty easily with a fork, but I wasn't sure if there's an internal 
> method in arts to do background playing that might be better to use.
>

Maybe you should replace the while with a QTimer or similiar.

>     while (play.state() != posIdle) {
>       sleep(1);
>     }

Martin

 
> Thanks a lot!
> 
> -Scott
> 
> On Thursday 13 December 2001 11:32 am, Martin Vogt wrote:
> > On Thu, Dec 13, 2001 at 11:15:26AM -0500, Scott Wheeler wrote:
> > > ===
> > > Is there some way to do something similar to this with an mp3?  I found
> > > an old mail from 2000 where Stefan Westerfeld said something about how
> > > this might be supported in the future.  Did it ever happen?
> > >
> > > So, I'd like to figure out how to do this.  Is there some source or good
> > > documentation that you guys can point me to?
> >
> > One simple example maybe mpeglibarts.
> >
> >
> > This is copy & paste to get an idea.
> >
> > Dispatcher* d=NULL;
> > SimpleSoundServer* server=NULL;
> >   d=new Dispatcher();
> >   server= new SimpleSoundServer
> > (Reference("global:Arts_SimpleSoundServer")); PlayObject
> > play=server->createPlayObject(file1);
> >     if (play.isNull()) {
> >       cout << "cannot play this"<<endl;
> >       destroyServer();
> >       exit(0);
> >     }
> >     play.play();
> >     while (play.state() != posIdle) {
> >       sleep(1);
> >     }
> >   delete server;
> >   delete d;
> >
> >
> > Martin
> _______________________________________________
> kde-multimedia mailing list
> kde-multimedia@mail.kde.org
> http://mail.kde.org/mailman/listinfo/kde-multimedia
_______________________________________________
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