I'm writing a game in GTK+. Here is my other post with the game source attached.
I want to add sound to the game. Just some short "shoot" or "boom" sound + may be a background music.
I'm trying to use GStreamer for that and I found an example
that makes GStreamer play an sound from a file given in this way:
The file comes from an command line argument, so it is easy to write "file://$PWD/file.ogg" if we need to play a file from the current directory. But what should I do in run-time? I think there should be a better way.
1) Do you know any simple examples of using GStreamer? Something like a function gst_just_simply_play_sound("file.ogg");
2) Is it possible to preload sounds and play them later?
3) Are there any more suitable libraries for this purpose?
4) What is the best format for the sound files? Is it OGG?