diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2009-04-16 15:07:00 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2009-04-16 15:07:00 +0800 |
commit | 762b56daa33c9dea6d256692827c0186416cd8c1 (patch) | |
tree | b966a93418b5ed147be32a639f24a7000d446850 /src | |
parent | 366c05d01cba8ab0e7e4ca62ecf42eb6dc6c7be6 (diff) |
winmm: shrink audio buffer count to 4.
This decrease audio output latency a lot.
Diffstat (limited to 'src')
-rw-r--r-- | src/device.cpp | 2 | ||||
-rw-r--r-- | src/device_mm.cpp | 2 | ||||
-rw-r--r-- | src/device_mm.h | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/device.cpp b/src/device.cpp index 76af8f0..fd0d160 100644 --- a/src/device.cpp +++ b/src/device.cpp @@ -234,7 +234,7 @@ namespace audiere { TRY_GROUP("winmm"); TRY_GROUP("alsa"); TRY_GROUP("oss"); - TRY_GROUP("coreaudio"); + TRY_GROUP("coreaudio"); return 0; } diff --git a/src/device_mm.cpp b/src/device_mm.cpp index e48a126..97c683c 100644 --- a/src/device_mm.cpp +++ b/src/device_mm.cpp @@ -107,7 +107,7 @@ namespace audiere { } } } - Sleep(10); + Sleep(2); } diff --git a/src/device_mm.h b/src/device_mm.h index 2dfa228..ae4f73e 100644 --- a/src/device_mm.h +++ b/src/device_mm.h @@ -26,10 +26,10 @@ namespace audiere { const char* ADR_CALL getName(); private: - // 16 buffers of 1000 frames is 4000 frames at 44100 Hz is about - // 364 milliseconds of audio + // 4 buffers of 1000 frames is 4000 frames at 44100 Hz is about + // 91 milliseconds of audio enum { - BUFFER_COUNT = 16, + BUFFER_COUNT = 4, BUFFER_LENGTH = 1000 * 4, // 1000 samples, 4000 bytes }; |