[Kde-games-devel] Junior job not only for GSoCers: Low-latency sound playback with KgSound
Stefan Majewsky
stefan.majewsky at googlemail.com
Wed Mar 7 23:10:40 UTC 2012
Moin moin,
I just remember that we have another junior job available, e.g. for
GSoC applicants who want to test-drive their newly set-up development
environment or just get their hands dirty on our codebase. There are
many games which use Phonon for playing sounds.
$ cd trunk/KDE/kdegames; ack Phonon -l | cut -d/ -f1 | sort -u
bomber
kajongg
kapman
kbattleship
kblocks
kbounce
kolf
kollision
ksirk
ktuberling
Phonon is not optimal for the usecase of reacting to user interaction
with short sounds, e.g. because it loads the sound anew every time.
libkdegames recently gained the new KgSound class which is optimized
for game sound effects. Usages of Phonon should be ported to use
KgSound.
For some reason, KgSound (and KgAudioScene) do not appear on
api.kde.org, but the API documentation can be found in
libkdegames/audio/{kgaudioscene.h,kgsound.h}. The common usage pattern
is as simple as it can get:
m_sound = new KgSound(KStandardDirs::locate("appdata", "mysound.ogg"),
parentObject); //in some constructor
m_sound->play(); //to play the sound effect
Have a look at Granatier, KShisen, KPat, or KGoldRunner for working
usages of KgSound.
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.
Greetings
Stefan
More information about the kde-games-devel
mailing list