[Kde-games-devel] Unavailable, Tagaro progress, sound APIs (again)

Stefan Majewsky kdemailinglists at bethselamin.de
Thu Sep 9 22:17:32 CEST 2010


Hi folks,

first off, I will be unavailable over the weekend while I'm moving to a new 
appartement.

Now back to business: Work on Tagaro [1] is continuing. On the graphics front, 
I am working on modularizing Tagaro::Renderer, the Tagaro equivalent of 
KGameRenderer, to make it possible to load non-SVG images, too. (This will 
then allow it to e.g. rebase KMahjonggBackground on a Tagaro::Renderer.)

On the interface side, I created a new Tagaro::Scene class which will host the 
on-canvas interfaces which I want. The Tagaro::Scene can additionally display 
a message overlay which is suitable for messages like "Paused", "Game over", 
or "Next round starting in 3..2..1..". A screenshot is at [2], tell me what 
you think of it.

Thirdly, I have been evaluating possible APIs for sound output:

1. Phonon has per-application-type sound routing rules and a Qt-style API. 
With Phonon, there are basically two approaches:

1a. use Phonon without any further library abstraction, and suffer from 
missing mixing support

1b. implement an own mixing component as a Phonon::MediaNode (this has been 
mentioned on this list in Sep 2008, but I am not into audio development and 
cannot comment on the feasibility of this solution, or on possible 
implementations)

In both cases, we suffer from the high latency that Phonon seems to have. 
(Please correct me if my criticism of Phonon's high latency and missing mixing 
support is outdated.)

2. So if it was not Phonon, it must be some other platform-independent API. 
Out of the various platform-independent APIs, OpenAL seems to be the most 
viable solution, because it's already available everywhere (just like OpenGL). 
This brings me to the wide range of OpenAL-based solutions:

2a. There is GluonAudio which provides a Qt-style API on top of OpenAL, but my 
usual criticism on Gluon APIs applies. (See "My review of Gluon" which I sent 
to this list on 22 Aug 2010.)

2b. Because all other C++ wrappers are either unmaintained or not Qt-style, 
the most feasible solution therefore seems to be to roll an own OpenAL-based 
API in TagaroAudio. OpenAL itself supports only a small set of WAV formats, so 
it would have to be coupled with a decoding implementation. Rumors are that 
Phonon can decode into a byte-stream which can be passed on to OpenAL.

Because of the discussed problems with Phonon latency etc., I will for now go 
for option 2b., and try to implement OpenAL-powered sound playback, paired 
with Phonon for decoding the sound files.

Greetings
Stefan

[1] http://community.kde.org/User:Majewsky/Project_Tagaro
[2] http://majewsky.files.wordpress.com/2010/09/tagaro-messageoverlay.png


More information about the kde-games-devel mailing list