[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] Sound output?
From:       Josef Spillner <dr_maux () maux ! de>
Date:       2001-08-03 16:30:47
[Download RAW message or body]

On Friday 03 August 2001 13:28, Felix E. Klee wrote:
> I would like to add sound effects and background music to a game that I
> am developing. How do I do that, where do I find documentation?

As a quick start:
#include <kaudioplayer.h>
KAudioPlayer::play("sound.wav");

#include <libkmid/libkmid.h>
KMidSimpleAPI::kMidInit();
KMidSimpleAPI::kMidLoad("music.mid");
KMidSimpleAPI::kMidPlay(1);

For more complex tasks like fading music in/out and so on, please have a look 
at the aRts documentation.

> Ideally, the game should also have sound when not started under KDE (eg.
> under Gnome).

This should normally be the case :)

Josef

-- 
The MindX Open Source Project: Fighting proprietary games
GGZ now! - The GGZ Gaming Zone: http://ggz.sourceforge.net
ggz.morat.net | ggz.snafu.de | jzaun.com | mindx.sourceforge.net/europeone
_______________________________________________
Kde-games-devel mailing list
Kde-games-devel@master.kde.org
http://master.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