[sldev] [VWR] openAL wind generator WIP

Robin Cornelius robin.cornelius at gmail.com
Thu Jan 10 02:28:01 PST 2008


Hi Guys,

I have been hacking up Seg's openAL patch again and have started 
implementing wind noise generation. I know many of you don't care about 
wind noise (but thats a seperate discussion) but to be "feature 
complete" wrt FMOD it needs implementing.

I have it working to a point, but get no wind sound. I am not quite sure 
why yet, so if any one has an idea please let me know. I can see the 
openAL buffers being processed but no audio appears at the speakers.

Heres the link to the patch :-

http://www.byteme.org.uk/uploads/openALv4.patch

As its not complete i have not pushed it to JIRA yet and i am not 
currently doing diff's against Seg's original patch because diffs of 
diffs become a mess quickly.

Additional changes are that it does not now jump up and down on FMOD. 
FMOD and OpenAL can be build time enabled with FMOD=? and OPENAL=? scons 
lines (which generate -DLL_OPENAL flags to include/exclude code same as 
fmod always did). Can also be runtime selected. The LL_BAD_ALSA etc all 
effect FMOD only and a new LL_BAD_OPENAL will effect openal only. FMOD 
is attempted to be run first if it can't start due to not being compiled 
in, or due to all 3 LL_BAD_* lines being set, OpenAL is attempted next.

The patch also contains the last gstreamer update too, for streaming sound.

As for wind noise, i am currently doing the following :-

OpenAL does not have callbacks as FMOD does. FMOD currently issues a 
call back to process a "DSP" unit or a buffer of sound. The wind 
generator code fills this buffer with the wind noise. With OpenAL i am 
allocating a number of buffers pushing them to the openAL queue then 
every updatewind() freeing any played buffers and generating new wind 
for the newly empy buffers and pushing to the queue again. It *should* 
at least make a noise even if i have miss aligned sound data. I get no 
openAL errors so i reckon that the gain must be very low or some other 
parameter is not set.

If any one has any ideas on completing the wind noise, from comments 
left on the openAL JIRA it appears it may not be too long before we can 
look at merging :-)

There are still a few "magic" numbers in (my) wind code and a couple of 
other small issues but we are getting there.

Robin



More information about the SLDev mailing list