[Bf-committers] Game Engine Audio status

Gabriel Beloin gbeloin at caramail.com
Tue Dec 28 23:12:09 CET 2004


i following your work with interest.
Quick question,
will your code be usefull to the sequencer which, i think also use openal?
	


> De: Alexander Ewering <blender at instinctive.de>
> A: bf-committers at blender.org
> Objet: [Bf-committers] Game Engine Audio status
> Date: Tue, 28 Dec 2004 22:56:35 +0100 (CET)

> Short status overview:
> 
> (NOTE: As I don't know how much of the game engine sound worked BEFORE
> (and it
> seems like nobody knows :) - some of this information may be redundant
> or not
> too surprising :)
> 
> - WAV files of any format can be used (might try to extend this to mp3)
> 
> - Attenuation of sounds with distance. There's a new value "Dist:",
> which
>    is the half-power distance (like with Quad lamps).
> 
> - "Volume:" is also used as an extra absolute scaling factor
> for volume
> 
> - 3D Panning of sounds depending on the position of the sound source relative
>    to the listener is implemented. Works for both mono and stereo sources
> (though
>    for stereo sources it's probably a bit stupid).
> 
>    The 'width' of the 3d panning (how far it pans when hard left/right
> of the
>    listener) can be adjusted by the new per-sound "PanFac" parameter.
> 
> - "Pitch:" implemented. I don't think this was implemented before
> (looking at
>    the code). So now, you can control a sound's / sound actuator's pitch
> in
>    (fractions of) semitones.
> 
> - Sound culling. When a sound is so soft that it's below factor 4/128 of
> the total
>    mix volume, it is removed from the mixing process, saving CPU cycles.
> It is
>    resumed as soon as it returns in the range of the listener (above 4/128).
>    Because of the inverse quadratic attenuation, a sound never is truly
>    'unheard'.
> 
> - Overall latency is very low. I'm using a 512 samples buffer, which is
> in the
>    range of 10 milliseconds, and about 30-50 times better/faster than with
> the former
>    openal implementation. For being safe from dropouts, 2048 samples (about
> 40 ms)
>    are still a bareable latency for untrained ears, and safer from dropouts.
> 
> There might still be 1 or 2 memory leaks I'll have to find - if any.
> 
> If there are any questions, feel free to post them...
> 
> I did this in instinctive-blender, but it's easy to port (i'll do it) should
> there
> be interest to have it in the official tree...
> 
> For *me*, this means the *first time* i can use sound in the game engine
> :)
> 
> | alexander ewering              instinctive mediaworks
> | ae[@]instinctive[.]de   <A HREF="http://www" TARGET="_blank">http://www</A>[.]instinctive[.]de
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> <A HREF="http://projects.blender.org/mailman/listinfo/bf-committers" TARGET="_blank">http://projects.blender.org/mailman/listinfo/bf-committers</A>

C est le moment de dynamiser votre boîte mail en découvrant les offres CaraMail Max et Pro - http://www.caramail.com



More information about the Bf-committers mailing list