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

List:       kde-devel
Subject:    Re: Correct useage of phonon?
From:       Michael Thaler <michael.thaler () physik ! tu-muenchen ! de>
Date:       2008-05-10 19:20:34
Message-ID: 200805102319.37882.michael.thaler () physik ! tu-muenchen ! de
[Download RAW message or body]

Hi,

> use MediaObject::enqueue( MediaSource ) for this.

That does not work. What I want to do is play sound a (e.g. a "bling") if a 
player does something and play sound b (e.g. a "whozz") if a player does 
something else. The game has twelve different sounds that get played when a 
player does something and an mp3 that gets played when the credits are shown. 
Most of the sounds are very short, about 5 KB, some are up to 50 KB. I guess 
loading the sounds from disk and playing them with

m_media->setCurrentSource(filename);
m_media->play();

would work, but I think it is quite ugly to load the files from disk each time 
they are played. My question is: is it reasonable to have fifteen 
MediaObjects that are initialized in the constructor of the class or are 
MediaObjects to heavywight to do that. If so, is there any other way to 
preload the sound files?

Greetings,
Michael
 
>> 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