[sldev] [VWR] openAL wind generator WIP
Robin Cornelius
robin.cornelius at gmail.com
Sat Jan 12 12:38:52 PST 2008
Carsten Juttner wrote:
> Robin Cornelius wrote:
>> 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 :-)
>
> Alright, took a look at it as promised, it does not work because the
> wind buffers are never associated with the source (which produced an
> error in the log, maybe your diff was not against the final version
> you were using?) and also the position of the wind is set somewhere
> far away from the listener (close to the origin) so once that position
> is set up you never hear it.
Thanks for that. Doh!, i though i had set the buffers to the source, the
version i had posted was my most recent effort. Ohh and the source
position is a bit embarising too. lol. /me hangs head in coding shame.
>
> Another problem is that the wind generating code is using as input the
> same buffer that it writes to which produces a surreal reverberating
> sound.
>
Yea, i had not really written optimal code here yet, but at least it
makes noise! i think a round-robin buffer or a fifio buffer system etc
should solve this.
> IIRC, in FMOD, the DSP is inserted after the final result of all
> sources, so the incoming buffer is the final mixdown of all sources
> (without the internet stream). OpenAL seems not to give access to this
> final output stage so it will probably be hard to make it work in the
> same fashion.
>
Yea, i noticed that, but what it appears is fmod is doing a callback on
about 20ms interval from what i can determine then the calback code
mixes in the generated windbuffer.
> But think it should be enough to simply play back the wind as it is
> generated though I get the feeling the sound is still not exactly the
> same, I will make some comparisons later.
>
We need buffers, updatewind() is called once per frame (from the main
loop) so we could do with stacking some buffers up as we might "run out
of wind" if we hit a frame rate lag or if our
no_buffers*length_sound*framerate < 1
> Thanks for your and Segs effort, it is great to finally have full open
> source sound output. :)
>
Thanks for spotting my mistakes!
Robin
More information about the SLDev
mailing list