diff --git a/.gitignore b/.gitignore
index 7310c8a1..09f284f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,6 +56,8 @@ espeak-ng.pc
# Windows builds
+src/pcaudiolib/
+
!src/windows/config.h
*.obj
diff --git a/README.md b/README.md
index 30189f22..1d1acd49 100644
--- a/README.md
+++ b/README.md
@@ -166,7 +166,9 @@ To build eSpeak NG on Windows, you will need:
1. a copy of Visual Studio 2015, such as the Community Edition;
2. the Windows 8.1 SDK;
-3. the [WiX installer](http://wixtoolset.org) plugin.
+3. the [WiX installer](http://wixtoolset.org) plugin;
+4. the [pcaudiolib](http://github.com/rhdunn/pcaudiolib) project checked out to
+ `src` (as `src/pcaudiolib`).
You can then open and build the `src/windows/espeak-ng.sln` solution in Visual
Studio.
diff --git a/src/libespeak-ng/speech.c b/src/libespeak-ng/speech.c
index aa00c16c..d5a59561 100644
--- a/src/libespeak-ng/speech.c
+++ b/src/libespeak-ng/speech.c
@@ -116,7 +116,9 @@ static int dispatch_audio(short *outbuf, int length, espeak_EVENT *event)
if (out_samplerate != 0) {
// sound was previously open with a different sample rate
audio_object_close(my_audio);
+#ifdef HAVE_SLEEP
sleep(1);
+#endif
}
#endif
out_samplerate = voice_samplerate;
diff --git a/src/windows/libespeak-ng.vcxproj b/src/windows/libespeak-ng.vcxproj
index 21c50c03..56c5ec85 100644
--- a/src/windows/libespeak-ng.vcxproj
+++ b/src/windows/libespeak-ng.vcxproj
@@ -87,14 +87,15 @@
TurnOffAllWarnings
Disabled
- $(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../include/compat
- LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_MBROLA;%(PreprocessorDefinitions)
+ $(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../pcaudiolib/src/include;$(ProjectDir)/../include/compat
+ LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_MBROLA;HAVE_PCAUDIOLIB_AUDIO_H;%(PreprocessorDefinitions)
$(IntDir)libespeak-ng.pdb
Windows
true
libespeak-ng.def
+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
@@ -103,14 +104,15 @@
TurnOffAllWarnings
Disabled
- LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_MBROLA;%(PreprocessorDefinitions)
+ LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_MBROLA;HAVE_PCAUDIOLIB_AUDIO_H;%(PreprocessorDefinitions)
$(IntDir)libespeak-ng.pdb
- $(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../include/compat
+ $(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../pcaudiolib/src/include;$(ProjectDir)/../include/compat
Windows
true
libespeak-ng.def
+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
@@ -121,8 +123,8 @@
MaxSpeed
true
true
- $(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../include/compat
- LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_MBROLA;%(PreprocessorDefinitions)
+ $(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../pcaudiolib/src/include;$(ProjectDir)/../include/compat
+ LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_MBROLA;HAVE_PCAUDIOLIB_AUDIO_H;%(PreprocessorDefinitions)
$(IntDir)libespeak-ng.pdb
@@ -131,6 +133,7 @@
true
true
libespeak-ng.def
+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
@@ -141,9 +144,9 @@
MaxSpeed
true
true
- LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_MBROLA;%(PreprocessorDefinitions)
+ LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_MBROLA;HAVE_PCAUDIOLIB_AUDIO_H;%(PreprocessorDefinitions)
$(IntDir)libespeak-ng.pdb
- $(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../include/compat
+ $(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../pcaudiolib/src/include;$(ProjectDir)/../include/compat
Windows
@@ -151,6 +154,7 @@
true
true
libespeak-ng.def
+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
@@ -177,6 +181,9 @@
+
+
+
@@ -193,6 +200,8 @@
+
+
diff --git a/src/windows/libespeak-ng.vcxproj.filters b/src/windows/libespeak-ng.vcxproj.filters
index eaffecd5..49d0d60d 100644
--- a/src/windows/libespeak-ng.vcxproj.filters
+++ b/src/windows/libespeak-ng.vcxproj.filters
@@ -19,6 +19,9 @@
{77d943b9-0670-4e38-b6ad-592ad6c85094}
+
+ {2e01ca9c-ccf8-4acf-b2aa-0ac89b34fc31}
+
@@ -96,6 +99,15 @@
Source Files\com
+
+ pcaudiolib
+
+
+ pcaudiolib
+
+
+ pcaudiolib
+
@@ -137,6 +149,12 @@
Header Files
+
+ pcaudiolib
+
+
+ pcaudiolib
+