Introduction |
|
Getting the MSVAD samples from the Windows DDK disk
to compile and run under Windows 2000
is a little more complicated than you might expect.
The following details the problems I encountered, and workarounds for each of them. Before you go down this road, consider that the problems described below are all limited to the Windows 2000 build environment. If you instead build in the XP environment (on a W2K machine) the drivers build cleanly out of the box. |
Build Environment |
| Todo. |
Building The MSVAD Drivers | |||
The instructions included in the DDK are out of date:
Those instructions are from an older version of the DDK, and are of no use. I found it necessary to first build the support libraries, and then build the msvad drivers. We will cover the problems getting the support libraries to build first.
|
invalid include statement: importlib(STDOLE_TLB) | |||
The BUILD script generates warnings like the following
The problem here is that the BUILD script is scanning for dependencies, and is not smart enough to expand macros like this:
|
Cannot Find Include File <ole.h> | ||
The next set of errors from BUILD are these
This is another problem with the BUILD script looking for dependencies. The file ole.h exists at D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE, which is not in the include path by default. For my setup I can get rid of the ole.h warning with the following:
|
Cannot Find Include File <macwin32.h> | ||
Once again the BUILD script is failing. In this case it is ignoring an #ifdef and trying to scan for a file that doesn't exist. These warnings can be safely ignored. If you want to get rid of the warning you can create an empty include file like this:
|
Cannot Find Include File <alpharef.h> | ||
|
Clean Library Build | |
At this point I get a clean build in the audio directory, but the drivers themselves are not built:
|
Building the Drivers | |
Once the support libraries have been built, you can move onto the msvad drivers.
|
The first error I encountered building the MSVAD drivers was this
|
Missing ';' before identifier 'm_pDrmPort' | |
The next problem looks like this
I ported a bunch of the definitions from \WINDDK\2600\inc\ddk\wxp\portcls.h and \WINDDK\2600\inc\ddk\wxp\drmk.h over to w2k, but it began to look like a house of cards. Since my iterest is not in the DRM drivers, I don't really care if they don't build. So I left them failing. |
don't know how to make 'D:\WINDDK\2600\lib\w2k\i386\stdunk.lib' | ||
The final major build error was during linking.
|
Final MSVAD Build | |
|
Installing The Drivers |
| To install the drivers, use Start->Settings->Control Panel->Add/Remove Hardware Then in the wizard select Add/Troubleshoot a Device->Add a new device->No, I want to select the hardware from a list->Sound, video and game controllers->Have Disk->Browse and browse to \WINDDK\2600\src\wdm\audio\msvad\msvad.inf Select the driver you want to install. I started with Simple. Remember that the DRM problems mean that only these drivers are available: Simple, AC3, DirectSound 2D HW Acceleration. The sys files are not found by the installer, and you will be prompted for the path to the .sys file. For the simple driver, it is: \WINDDK\2600\src\wdm\audio\msvad\simple\objfre_w2k\i386 The driver wizard will prompt you to reboot once installation is complete. Crazy, but true - you have to reboot before the driver can be used. |
Bugs in MSVAD | ||||
There is a bug in MSVAD which results in only the first sound being recorded. Subsequent recordings result in empty wave files. The error is in savedata.cpp here:
The second bug is in basedma.cpp. I haven't heard any reports of it actually causing problems, but it is a bug nonetheless:
|
More Information |
| If you are working with MSVAD, do yourself a huge favour and subscribe to the WDMAUDIODEV mailing list. |