From bc4826552f7145851c12bd2ecf4084f66063b5b5 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Thu, 8 Mar 2012 15:55:04 +0100 Subject: [PATCH] deactivated SyncTimer in PortAudio, set AudioLatency to 100ms --- Vocaluxe/Base/CConfig.cs | 2 +- Vocaluxe/Lib/Sound/CPortAudioPlay.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 902328ac..74c13ce6 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -191,7 +191,7 @@ namespace Vocaluxe.Base public static EPlaybackLib PlayBackLib = EPlaybackLib.PortAudio; public static ERecordLib RecordLib = ERecordLib.PortAudio; public static EBufferSize AudioBufferSize = EBufferSize.b2048; - public static int AudioLatency = 0; + public static int AudioLatency = 100; public static int BackgroundMusicVolume = 50; public static EOffOn BackgroundMusic = EOffOn.TR_CONFIG_ON; public static EBackgroundMusicSource BackgroundMusicSource = EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC; diff --git a/Vocaluxe/Lib/Sound/CPortAudioPlay.cs b/Vocaluxe/Lib/Sound/CPortAudioPlay.cs index b5266015..43623c5c 100644 --- a/Vocaluxe/Lib/Sound/CPortAudioPlay.cs +++ b/Vocaluxe/Lib/Sound/CPortAudioPlay.cs @@ -847,7 +847,7 @@ namespace Vocaluxe.Lib.Sound float latency = buf.Length / _BytesPerSecond + CConfig.AudioLatency/1000f; float time = _TimeCode - _data.BytesNotRead / _BytesPerSecond - latency; - _CurrentTime = _SyncTimer.Update(time); + _CurrentTime = time; // _SyncTimer.Update(time); } try