port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
#pragma once
struct SVUMeter
{
const static int m_iBufferLength= 441;
float m_fVUData[ m_iBufferLength ];
int m_iLastPos;
SVUMeter()
{
m_iLastPos= 0;
for( int i= 0; i < m_iBufferLength; ++i )
{
m_fVUData[ i ]= 0.0f;
}
}
void Set( int iPos,
float fVal )
{
iPos= iPos % m_iBufferLength;
while( true )
{
m_fVUData[ m_iLastPos ]= fVal;
if( m_iLastPos != iPos )
{
m_iLastPos++;
m_iLastPos= m_iLastPos % m_iBufferLength;
}
else
{
break;
}
}
}
float Get( int iPos )
{
iPos= iPos % m_iBufferLength;
return m_fVUData[ iPos ];
}
};