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

List:       kde-devel
Subject:    Re: Multiple sounds with phonon
From:       Tomaz Canabrava <tcanabrava () kde ! org>
Date:       2010-06-16 19:15:07
Message-ID: AANLkTikdDam_7-RJIm69GqPzWWI56-i7pCwuMSwn1ihN () mail ! gmail ! com
[Download RAW message or body]

cant do that in phonon, that's why the kde-games people are not using
it. when you send a 'play' command to phonon it will not work at the
same time, you can have unexpected delays ( small, but still it's a
delay ).


On Wed, Jun 16, 2010 at 4:04 PM, Danilo Cesar <danilo.eu@gmail.com> wrote:
> Hi guys,
>
> I'm having some problems with phonon, can you give-me a clue please? =)
>
> My pb is: I need to play 5 different sounds, and some of them need to
> be played at the same time
> (eg: playing an explosion sound while there is another 5 instance of
> the same sound being played).
>
> The simplest solution I found is:
> 1 - Ever time i need to play a sound I do:
>     audioOutput = new Phonon::AudioOutput(Phonon::GameCategory, this)
>     mediaObject = new Phonon::MediaObject(this)
>     Phonon::createPath(mediaObject, audioOutput);
>     mediaObject->setCurrentSource(Phonon::MediaSource("sound1.ogg"));
>     mediaObject->play();
>
>     First question is: Do I need an audioOutput for each mediaObject?
> Or can I connect
>     more than one mediaObject to an audioOuput?
>
> 2 - As solution above isn't effective, I changed it to reuse the
> mediaObject's if it's
>    already created and if it isn't playing a sound anymore. Like a
> pool... It works, but
>    I'm not feeling comfortable with this solution.
>
> Well, is there a better way to do that?
>
> --
> Danilo Cesar Lemes de Paula
> http://www.danilocesar.com
>
>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
>
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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