Capture device names truncated on Vista SP1

SamLam

New Member
Hello,

We are having an issue with DirectSound on Vista Service Pack 1. We use DirectSound API to enumerate audio devices. Returned audio capture devices have all their device names truncated to 31 characters. Playback devices are correct, meaning that the names are complete.

Using the same application on Vista without Service Pack 1, the device names appear fine.

The test application has been built on XP and linked with March 2008 DirectX SDK. We tried both Visual Studio 6 and Visual Studio 2008.

Here’s the source code:

// TestDirectSound.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "stdio.h"
#include "Dsound.h"

int g_numDevices = 1;

BOOL CALLBACK DSEnumCallbackAll(LPGUID lpGuid, LPCSTR lpcstrDescription, LPCSTR lpcstrModule, LPVOID lpContext);

int main(int argc, char* argv[])
{
printf("Capture devices:\n");
DirectSoundCaptureEnumerate(DSEnumCallbackAll, NULL);

g_numDevices = 1;
printf("\nPlayback devices:\n");
DirectSoundEnumerate(DSEnumCallbackAll, NULL);

return 0;
}

BOOL CALLBACK DSEnumCallbackAll(LPGUID lpGuid, LPCSTR lpcstrDescription, LPCSTR lpcstrModule, LPVOID lpContext)
{
printf("Device %i is %s\n", g_numDevices++, lpcstrDescription);

return TRUE;
}

Here’s a sample output:

Capture devices:
Device 1 is Primary Sound Capture Driver
Device 2 is Aux (Realtek High Definition Au
Device 3 is Headset Microphone (Plantronics

Playback devices:
Device 1 is Primary Sound Driver
Device 2 is Speakers (Realtek High Definition Audio)
Device 3 is Headset Earphone (Plantronics Headset)

Here are the versions of dsound.dll:

Vista: 6.0.6000.16386
Vista SP1: 6.0.6001.18000

We tried copying 6.0.6000.16386 version (Vista without SP1) to where the test application is located. We got exactly the same results.

We wrote a small python program that does the same thing. The results were identical, namely capture devices were all truncated. However copying 6.0.6000.16386 version (Vista without SP1) to where the test application is located now resulted in a correct output. It implies that Python application used the local dsound.dll and it fixes the enumeration problem.

We conclude that Vista’s dsound.dll (6.0.6001.18000) has an issue with enumerating capture devices.

Has anyone encountered the same problem?

Sam.
 

My Computer

Back
Top