AGSE_AUDIODECODE not supported?

Started by Janik, Thu 20/10/2005 01:43:14

Previous topic - Next topic

Janik

I am trying to make a plugin where you can control how much sound plays in the left/right speakers (to make the effect of sound shifting from left to right as you pass by). I am using AGS 2.71.624 (beta)

The code I used is:

Code: ags

engine->RequestEventHook (AGSE_AUDIODECODE);

// and

int AGS_EngineAudioHook(int channel, char *buffer, 
						int len, int freq, int bits, int stereo)
{
//Rest of code goes here
}


But I get a message saying "Error: Plugin requested AUDIODECODE, which is no longer supported". I don't quite get it, the AudioHook seems to have been introduced not so long ago, (v.2.61), and it is still in the plugin documentation - why is it not supported anymore? Is there another way to use AGS_EngineAudioHook in the current version?

Thanks!

Play pen and paper D&D? Then try DM Genie - software for Dungeons and Dragons!

Pumaman

AUDIODECODE was supported briefly for about 1 AGS version, but it didn't prove very useful, and caused performance problems and other issues and was then removed. Sorry.

Janik

Fair enough, thanks for clearing that up.

Would it be possible for me to work around it in another way - namely by using the GetDirectSound() call? I don't want to use DisableSound() and take over all audio functions; but could I add an extra sound using the DirectSound functions, while AGS does the rest of the audio handling?
Play pen and paper D&D? Then try DM Genie - software for Dungeons and Dragons!

modgeulator

Janik, I'd be very interested to see how to do that too. I spent a couple of weeks trying to make an audio plugin that worked alongside the AGS sound without success.

One thing you can do (on Windows 2000 / XP only) is set the AGS sound output to WaveOut and then your DirectSound based plugin can do it's thing at the same time. That's a bit of a kludge though, and it won't work on computers running older versions of Windows...

Pumaman

You could try using the directsound object to play sounds yourself, it should work I guess but to be honest I'm not sure if it would.

Janik

Quote from: modgeulator on Fri 21/10/2005 06:55:22
Janik, I'd be very interested to see how to do that too. I spent a couple of weeks trying to make an audio plugin that worked alongside the AGS sound without success.
What did you try? Did you use DirectSound?

I'll have to read up more on DirectX and DirectSound before trying. I imagine it's possible. There is even "3D" sounds, using the forward/back channels in addition to left/right, that would be cool to have (though this wouldn't make so much sense in a 2D Game ;D). I will give it a shot.
Play pen and paper D&D? Then try DM Genie - software for Dungeons and Dragons!

Elliott Hird

Never mind blooming 3d sound when you can have 3d graphics, LOL!

SMF spam blocked by CleanTalk