[Kde-games-devel] Junior job not only for GSoCers: Low-latency sound playback with KgSound
Roney Gomes
roney477 at gmail.com
Tue Mar 20 23:03:38 UTC 2012
>> On 03/18/2012 01:50 AM, Ian Wadham wrote:
> At a very quick glance, the code looks OK, so maybe it is something missing in your environment. You need:
> - Hardware/OS sound turned on,
> - Sound setting on in Kapman Settings menu,
> - OpenAL library installed,
> - LibSndFile library installed,
> - Sound files installed in your $KDEDIR area (Is KStandardDirs::locate finding any files?),
> - Any other "obvious" things.
>
> If you do not have both libraries, I think KgSound will default to Phonon, which might or might not play OK.
>
> If all the above things seem OK, try making the problem smaller, e.g. have a few lines of code that just play
> *one* sound, such as bonus.ogg, at a moment of your choosing. Oh, and did the game play sounds before
> you started to change the code?
>
> Happy hunting!
Yay, I solved the problem. :D
There are no bugs in the code, everything is fine. It is my environment
that is not properly configured.
In the calls to KgSound's constructor instead of passing
"sounds/foo.ogg" as argument, I passed the entire path to the file and
everything is working.
I guess there is something wrong with my $KDEDIR variable, I tried to
set some values to it but they haven't worked. How do I fix it?
Thanks for your help Ian, it has been of much value to me. :)
More information about the kde-games-devel
mailing list