Problem getting sound with BSimpleGameSound

I am having problem with getting sound effects for my simple program in Haiku.

I wanted to use BSimpleGameSound(), but it does not work for some reason (sound plays with MediaPlayer).

Simple as it is this is what I use:

bigSound = new BSimpleGameSound(“coins_5.wav”);

if (bigSound->InitCheck() != 'B_OK'){
		alert = new BAlert("", "Sound problem, sound effects disabled!", "OK");
		result = alert->Go();	
	}

bigSound->StartPlaying();

And it does not work, gives the alert (coins_5.wav exist in the same dir, where the binary is)

Starting the app from terminal, I get the following error messages:

BMediaRoster::InstantiateDormantNode: addon-id 6, flavor_id 0, flags 0x0
resolve symbol “_Unwind_GetIPInfo” returned: -2147478780
DormantNodeManager::LoadAddon: loading “/boot/system/add-ons/media/mixer.media_addon” failed: Symbol not found
DormantNodeManager::GetAddon: can’t load add-on 6 from path /boot/system/add-ons/media/mixer.media_addon
BMediaRosterEx::InstantiateDormantNode: GetAddon failed

What shell I do?

Many thanks.

I don’t know anything, but because I have made the following mistake in BeOS programming:

Where is the wav file, in HOME or the program directory?

Try suppling the complete path to the sound file.

Hi pistooli,

you may want to post coding questions on either the 3rd party or haiku-dev mailinglist. Coders usually only stumble by accident upon forum posts. :slight_smile:
The #haiku IRC channel is also a promising option.

Regards,
Humdinger

Thank you both for the answers. Will try.

However checking it out, I suspect that this is not even a coding problem, as I get the same error message from Jabber4Haiku if I start from command line and enable sound effect. It is more a problem with my sound setup on my Haiku box.

br, Pistooli

i have the same problem. It seems compiling with gcc2 works, but when i compile with gcc4 i get the same error. I filled a bug report, and hopefully this bug is solved soon.
http://dev.haiku-os.org/ticket/7625

Too bad you didnt write a bug report when you met that problem.

I have the same problem. I am pretty sure the problem was introduced when Stippi rewrote the media server. My code ran until the update. My bug is logged here:
https://dev.haiku-os.org/ticket/7587