mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
disable crashing lattice mouse code, fix diffclock for audio render
This commit is contained in:
parent
8b4fa7c009
commit
bd62514fb5
2 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@ const float AMPLITUDE_RATIO_AT_90 = 0.5;
|
|||
const short RING_BUFFER_FRAMES = 10;
|
||||
const short RING_BUFFER_SIZE_SAMPLES = RING_BUFFER_FRAMES * BUFFER_LENGTH_SAMPLES;
|
||||
|
||||
const short JITTER_BUFFER_LENGTH_MSECS = 50;
|
||||
const short JITTER_BUFFER_LENGTH_MSECS = 40;
|
||||
const int SAMPLE_RATE = 22050;
|
||||
|
||||
const short NUM_AUDIO_SOURCES = 2;
|
||||
|
@ -422,7 +422,7 @@ void Audio::render(int screenWidth, int screenHeight)
|
|||
float remainingBuffer = 0;
|
||||
timeval currentTime;
|
||||
gettimeofday(¤tTime, NULL);
|
||||
float timeLeftInCurrentBuffer = diffclock(currentTime, data->lastCallback)/(1000.0*(float)BUFFER_LENGTH_SAMPLES/(float)SAMPLE_RATE) * frameWidth;
|
||||
float timeLeftInCurrentBuffer = diffclock(data->lastCallback, currentTime)/(1000.0*(float)BUFFER_LENGTH_SAMPLES/(float)SAMPLE_RATE) * frameWidth;
|
||||
//float timeLeftInCurrentBuffer = diffclock(currentTime, data->lastCallback)/23.22 * frameWidth;
|
||||
|
||||
remainingBuffer = data->ringBuffer->diffLastWriteNextOutput() / BUFFER_LENGTH_SAMPLES * frameWidth;
|
||||
|
|
|
@ -842,7 +842,7 @@ void mouseFunc( int button, int state, int x, int y )
|
|||
mouse_x = x;
|
||||
mouse_y = y;
|
||||
mouse_pressed = 1;
|
||||
lattice.mouseClick((float)x/(float)WIDTH,(float)y/(float)HEIGHT);
|
||||
// lattice.mouseClick((float)x/(float)WIDTH,(float)y/(float)HEIGHT);
|
||||
}
|
||||
if( button == GLUT_LEFT_BUTTON && state == GLUT_UP )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue