Improved UI
This commit is contained in:
@@ -9,7 +9,7 @@ namespace Car_simulation
|
||||
// Audio properties - smaller buffer for less latency
|
||||
private const uint SAMPLE_RATE = 44100;
|
||||
private const ushort CHANNEL_COUNT = 2; // Stereo
|
||||
private const float BUFFER_DURATION = 0.01f; // 10ms instead of 50ms!
|
||||
private const float BUFFER_DURATION = 0.05f; // 10ms instead of 50ms!
|
||||
|
||||
// Engine sound properties - NO SMOOTHING for instant response
|
||||
private volatile float _currentRPM = 800f; // volatile for thread safety
|
||||
@@ -44,8 +44,6 @@ namespace Car_simulation
|
||||
{
|
||||
_harmonicPhases[i] = (float)(_random.NextDouble() * 2 * Math.PI);
|
||||
}
|
||||
|
||||
Console.WriteLine($"EngineSound initialized: {BUFFER_DURATION * 1000:F0}ms buffer, {CylinderCount} cylinders");
|
||||
}
|
||||
|
||||
// CALL THIS FROM YOUR PHYSICS THREAD - INSTANT UPDATE
|
||||
|
||||
Reference in New Issue
Block a user