[Openal] Spectrum analyzer - mouth movements
jmtrivi at google.com
Mon Oct 18 10:19:50 PDT 2010
If you want to animate mouth movements based on your waveform, you can't use
a single sample value to decide by how much the mouth is open.
Let's say you animate the mouth at 60fps, then you need to compute the
energy of the last 16ms (1000/60) of audio (around your iOffset) to
On Sat, Oct 16, 2010 at 12:34 AM, Nameless <mrnameless at hotmail.sk> wrote:
> I came to a problem, which I can't resolve by myself, that's why I'm asking
> here. I need mouth movements( byte 0 - 255 (255 - opened mouth, 0 - closed)
> which should be controlled by current spectrum / cur. frequency of actual
> byte/sample offset. For now, I've done this:
> alGetSourcei(m_pActiveSamples[i]->Source, AL_BYTE_OFFSET, &iOffset);
> if(m_pActiveSamples[i]->pCache->nBitRes == 8)
> iMouthOpen = *(m_pActiveSamples[i]->pCache->pSampleData + iOffset);
> iMouthOpen = *(m_pActiveSamples[i]->pCache->pSampleData + iOffset *
> pSample data is data chunk from wave file. But mouth movements are weird
> I don't know how to "clean" them. So I'm asking if somebody knows how to
> resolve this.
> Richard Rohac.
> View this message in context:
> Sent from the OpenAL - User mailing list archive at Nabble.com.
> Openal mailing list
> Openal at opensource.creative.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openal