[Kde-games-devel] Junior job not only for GSoCers: Low-latency sound playback with KgSound

Parker Coates coates at kde.org
Sun Mar 18 01:13:21 UTC 2012


On Sat, Mar 17, 2012 at 21:07, Roney Gomes <roney477 at gmail.com> wrote:
> On 03/07/2012 08:10 PM, Stefan Majewsky wrote:
>>
>> If you decide to work on porting a game, do not hesitate to ask for
>> further assistance on this mailing list. Once your patch is done,
>> upload it to http://svn.reviewboard.kde.org to get it reviewed.
>
>
> Hi, I began to browse Kapman's source code in an attempt to port it to
> KgSound, but some doubts came to my mind. Here follows the first.
>
> In the following assignment:
> m_media1 = Phonon::createPlayer(Phonon::Gamecategory)
>
> A sound file is "attached" to m_media1, but in the documentation[1] I saw
> that this function takes a second argument (const MediaSource& source), that
> is the source of the sound file itself.
>
> So, taking in consideration that I can't explicitly see the file passed,
> wich file should I choose when calling the KgSound's constructor?

[21:08:43] ~/kde-devel/source/kdegames-git/kapman $ ack .ogg
game.cpp
393:    playSound(KStandardDirs::locate("sound", "kapman/gameover.ogg"));
430:            playSound(KStandardDirs::locate("sound", "kapman/ghost.ogg"));
449:            playSound(KStandardDirs::locate("sound", "kapman/life.ogg"));
457:            playSound(KStandardDirs::locate("sound",
"kapman/energizer.ogg"));
467:            playSound(KStandardDirs::locate("sound", "kapman/pill.ogg"));
470:            playSound(KStandardDirs::locate("sound", "kapman/bonus.ogg"));
490:    playSound(KStandardDirs::locate("sound", "kapman/levelup.ogg"));

Parker


More information about the kde-games-devel mailing list