Partager via


Modifying the DirectSound Audio Driver Test

The DirectSound Audio Driver Test executes the s tux –o –d dsndtest command line on default execution. This command plays and captures one-second tones on an audio device and performs basic functional testing. To perform in-depth testing of your driver, you must set up your device with a microphone and speaker, turn on interaction capabilities, and then confirm that audio plays and records.

To set up the test correctly, connect a speaker and a microphone, if supported, to the device simultaneously. Place the microphone between 1 and 6 inches from the speaker. While you run the test for the first time, adjust the distance between the speaker and the microphone to reduce feedback and find the distance where the sound played by the test is similar to the sound that is recorded. A difference in volume between the sound played and the sound recorded is not a problem and is to be expected during the test. The test plays a tone that is a smooth sine wave. The tone should not contain ticking or other noise.

You can modify the test by editing the command line. For information about how to edit the command line for a test, see Editing the Command Line for a Test. The following table shows the modifications you can make to the test.

To modify the DirectSound Audio Driver Test

To Add this command-line parameter
Instruct the test to stop and prompt you for confirmation.

You can run the test with this command-line parameter to manually confirm that audio plays and records correctly.

-i
Change the duration of the tone being played or captured for all test cases. Specify the duration in units of seconds.

The default value is 1 second.

-d duration
Enable half-duplex testing and disables sound output when capturing. You must supply your own sound into the microphone when the test attempts to record sound.

You must use this parameter if your driver or hardware cannot play and capture sound simultaneously.

-e
Specify which device to test. If your device is not the default device, use this parameter to specify the device that must be tested.

The default device has a device identifier of 0.

-w device identifier

To specify one or more optional command-line entries in the test library, you must use the –c Tux option. The -c option forces Tux to pass the optional command-line entry into the test library. For example, the s tux -o -d dsndtest -c "-i -d 5 -e" command line runs the test interactively with tones of five second duration and tests the driver as a half-duplex driver.

The following table shows the test cases for the DirectSound Audio Driver Test.

Test case Description
100: Build Verification Test Ensures that all components for the test are present. Refer to the test result to determine the likely cause of failure. Warnings that affect the behavior of the test will also appear in this test case if appropriate. This test case can cause other test cases to be skipped if the required components are not present.
2000: Playback Capabilities Displays the capabilities reported by the driver along with extended functions that are supported by the driver.
2001: Playback Plays a tone for all of the supported formats using a hardware buffer if available; otherwise a software buffer will be used.
2002: Playback Notifications Performs playback using the DirectSoundNotify function.
2003: Playback Using Extended Functions Performs playback changing extended functions for frequency, pan and volume.
2004: Playback Software Plays a tone for all supported formats using a software buffer. This test case is skipped if the -a option is not specified in the command line.
2005: Playback Hardware (Streaming) Plays a tone for all of supported formats using a streaming hardware buffer, if available. This test case is skipped if the -a option is not specified in the command line.
2006: Playback Hardware (Static) Plays a tone for all of the supported formats using a static hardware buffer, if available. This test case is skipped if the -a option is not specified in the command line.
3000: Capture Capabilities Displays the capabilities reported by driver.
3001: Capture Captures a tone for all of the supported formats.
3002: Capture Notifications Captures using the DirectSoundNotify function.

Remarks

This test library can have one or more optional command-line entries to change the behavior of the test. To specify one or more optional command-line entries to the test library, you must use the –c command-line option. This option forces Tux to pass the specified string into the test library.

Full duplex drivers are typically tested with the s tux -o -d dsndtest -c "-i -d 5" command line, which uses five-second tones and prompts for confirmation.

Half duplex drivers are typically tested with the s tux -o -d dsndtest -c "-i -d 5 -e" command line, which also uses five-second tones and prompts for confirmation. You must provide sound when the device records because the hardware or driver does not support playback and capture simultaneously.

See Also

DirectSound Audio Driver Test

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.