Expanding sound capabilities with a plugin?

Started by frogfrost, Sun 11/07/2010 17:23:35

Previous topic - Next topic

frogfrost

Hey there,

Been a sort of long time dabbler in AGS but have been getting back into it lately. One of the things I notice is that there is still only really basic sound support - and was thinking of expanding it - but even the plugin API doesn't really look like you can access the currently playing sounds etc. (unless I missed it) - and only supports getting the DirectSound interface (also, since DirectSound is deprecated is this now Xaudio2 on Windows under the hood?).

Anyway, I'm happy to write a plugin that has some expanded sound capabilities, but not sure if it's even possible?

For example, it'd be amazing to be able to dynamically pitch SFX slightly to create extra variation in say, footstep samples. Or to apply lowpass filters, reverb, etc. All of which are supported by DirectX. Just add a bit of extra variation...

Also - move beyond 8 channels.

Speaking of footsteps - what if you want to support different ground materials? I guess you can't use the handy view sound field and have to script it manually?

Great program, love that you can get right down to making games instead of writing yet another inventory system...

Calin Leafshade

I would personally love some more advanced sound capabilities.

A DSP line would be nice for example.

This should be perfectly possible since you could theoretically just abandon AGS's sound system altogether and just use the plugin interface.

frogfrost

I just discovered that the current beta version has a rewritten audio system which supports panning at least, and is object driven so maybe you could grab the handles and alter the pitch.

If you had access to the DirectSound buffers it'd be easy to extend functionality without having to completely duplicate the system.

GarageGothic

I've been wanting to do something quite similar in terms of graphics, replacing the Allegro based renderer with something faster as well as including additional functionality to not have to rely on the slow DrawingSurface functions for effects. But I also ran into problems with limitations in the plugin API (no way to override the viewport initialization, and therefore no higher resolution support). Still working on the plugin though, but I'm crossing my fingers that CJ will eventually allow more direct screen manipulation through the API.

Originally my plan was to also include OpenAL based audio layer, but since the new audio channels implementation seems to still be evolving, I've pushed it way down the feature priority list until I know how it turns out. My main motivation was to add support for multi-channel (i.e. 5.1) mp3 and ogg playback which unfortunately doesn't work with the current Allegro codecs -  or at least not the versions used in AGS.

xenogia

OpenAL would be fantastic to use. Push Push Push :)

Pumaman

I looked into some alternative systems a while back, at the time none of them had support for loading all of OGG, MP3, WAV, VOC, XM, S3M, MOD and MIDI; which are all formats that the current Allegro audio system supports. That was the main reason why it hasn't been changed so far.

frogfrost

That's cool. Hey, I've written my share of audio engines, and getting things to be robust and stable especially with streaming is a royal pain. I wouldn't want to change either. I think it'd be awesome just to either have buffer access and let people write scripts or plugins *or* and speaking as a sound designer, you wouldn't believe how far you can push stuff with JUST pitch control and a low pass filter. Even just the ability to change the playback frequency as a "free" pitch shift is huge for creating dynamic sfx.

Calin Leafshade

As a fellow sound engineer I totally agree :p

Sound and music is something that is heavily neglected in AGS games in general and some more flexibility would be very welcome

SMF spam blocked by CleanTalk