Blender Git Commit Log

Git Commits -> Revision d10e80f

March 6, 2015, 16:22 (GMT)
Attempted fix for OpenAL synchronization.

This hit animators already, basically when using sound sync we can
hit negative frames. This happens because we always subtracted the full
range of the triple buffer size from the timing, even when buffers were
flushed.

Also, old code read the offset from the offset of the reader. The
problem here, is that due to threading there is a time offset between
the when this offset is set and when it is offloaded to the buffers,
which means that we could get quite some variance between time
reporting.

Now sounds keep a private byte offset which is incremented right before
invalidating old buffers. This should make the combination of OpenAL
time report + byte offset more accurate. For even more accuracy we might
spinlock while updating those values but for now left it as is for fear
of the lock interfering with frame update performance. We can try to be
smarter here, storing old value while update is happening, and use
trylock and the old values if it fails but for now commit the simple
version.

Commit Details:

Full Hash: d10e80fe792c1c8f00c9c7ce4409002a4515570d
Parent Commit: bd56eca
Lines Changed: +14, -5

3 Modified Paths:

/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp (+11, -4) (Diff)
/intern/audaspace/OpenAL/AUD_OpenALDevice.h (+2, -0) (Diff)
/source/blender/blenkernel/intern/sound.c (+1, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021