[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-games-devel
Subject: [Kde-games-devel] Correct useage of phonon?
From: Michael Thaler <michael.thaler () physik ! tu-muenchen ! de>
Date: 2008-05-10 19:47:18
Message-ID: 200805102346.22967.michael.thaler () physik ! tu-muenchen ! de
[Download RAW message or body]
Hello,
(modified version of my post on kde-devel)
I am trying to port a game to KDE. Currently the game uses SDL_Mixer to play
sounds. I want to replace it by phonon, but I am not sure about the correct
way to use phonon.
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 thirteen
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
_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic