This is a technical overview of the Double Agent project. It's intended for developers who want
to understand how Double Agent is built and distributed.
Double Agent is currently written entirely in C++ and exclusively for the Windows operating system.
- Animation and sound effects are rendered using Windows DirectShow technology. There are
several reasons for this choice.
- Although using DirectShow introduces an intrinsic dependency on Windows, it also leverages the existing collection
of DirectShow filters.
- DirectShow is tightly integrated with other Windows components. This allows very efficient media
rendering without any noticeable effect on application performance.
- The DirectShow filter graph implements a composite media stream with both visual and audio components.
It allows each component to be prepared independently while keeping rendering exactly synchronized.
- Double Agent version 1.x includes a custom video rendering filter. The DirectShow 9.0 Video Mixing Renderer
(VMR) doesn't include support for transparent rendering of the base video stream, and it's overkill
for Double Agent's animations. However, as a future enhancement the VMR could easily be used
to allow character animations to be overlaid on another video stream (for example) or even a
- The Audio Compression Manager (ACM) filter is used to handle all of the different sound formats that
can be found in existing character files.
- The Direct Show Audio Renderer is used to handle all of the possible audio output devices (although
version 1.x only uses the default audio device, allowing a choice of audio devices will be a very
- Double Agent uses the Windows Speech API (SAPI) for text-to-speech and speech recognition.
- The 32-bit build supports both SAPI4 and SAPI5 for text-to-speech. For speech recognition, it
uses SAPI5 only.
- The 64-bit build uses SAPI5 only. SAPI4 is a 32-bit-only runtime.
- SAPI5 is pre-installed with Windows. SAPI4 (and its associated voices) can be downloaded and installed
separately. If, for some reason, SAPI is not available, Double Agent will still function, but
the text-to-speech and speech recognition won't be available.
- Although version 1.x uses only the default input and output devices, allowing a choice of devices
will be a very simple enhancement.
- The speech balloon is implemented as a Windows ToolTip control.
- This isn't strictly required. However, because of its text-to-speech features, Agent is often
used by the visually impaired. The native ToolTip control is recognized and properly handled by
screen reader software, thus keeping Double Agent accessible.
Double Agent has no runtime dependencies other than Windows itself. Although it was designed for
Windows 7, it's been kept compatible with Windows XP and Windows Vista. This allows application
developers to develop and distribute Double Agent applications on those Windows platforms as well as
In development, Double Agent has as few dependencies as possible. Here's a summary of the build
environment for Double Agent 1.x.
- Microsoft Visual C++ 2008
- The compiler version was 15.00.21022.08
- The resource compiler version was 6.1.7600.16385
- The linker version was 9.00.21022.08
- Microsoft Windows SDK version 7.0
- For backward compatibility, DirectShow version 9.0 is used.
- For backward compatibility, the old Windows XP thread pooling API is used rather than the newer Windows
Vista thread pooling.
- Microsoft Foundation Classes (MFC) version 9.0
- MFC is statically linked to avoid any runtime dependencies.
- MFC is the only dependency that isn't available with Visual C++ Express Edition.
The Double Agent installation is packaged as a set of Windows Installer Package (.msi) files and associated
Cabinet (.cab) files. The installer packages contain the basic runtime components, and the cabinets
contain optional development components. Thus, end-users require only the installer packages while
developers can download and install the development components as required.
When the installation is run, the installer package will check for the optional cabinet files (in the
same directory as the installer package) and will enable or disable the optional components accordingly.
There are three separate installations, depending on the target environment:
- This is the 32-bit build for the 32-bit versions of Windows 7, Windows Vista, and Windows XP.
- The samples cabinet includes all of the sample programs.
- This is the combined 64-bit and 32-bit builds for 64-bit versions of Windows 7 and Windows Vista.
- 64-bit runtimes (and debugging symbols) are installed in
while 32-bit runtimes (and debugging symbols) are installed in
Program Files (x86).
- The sample programs that are compatible with 64-bit development are installed in
Program Files, and those that are only compatible with 32-bit development (such as VB6) are installed
Program Files (x86).
- This is the 64-bit build for the 64-bit versions of Windows 7 and Windows Vista.
- The samples cabinet includes only those samples that are compatible with 64-bit development.
- Since end-users will likely run a combination of 32-bit and 64-bit applications, this installation is
not recommended for them.