Hi guys,
I am experiencing a quite strange XACT3 problem I so far
can't find a way to fix.
The problem happens in the following conditions :
- XACT3 ( November 2008 DirectX SDK )
- machine having a "SoundMAX Integrated Digital Audio" sound chip
with the presence of the "Unimodem Half-Duplex Audio Device"
- device above when listed seems to look as
Device name : WaveOut 1
Description : Modem #0 Line Playback (emulated)
GUID : c2ad1800 - b243 - 11ce - a8a4 - 00aa006c4501
- project simply trying to initialize the XACT engine with
"standard default parameters" ( most important pRendererID = NULL ).
The situation that happens is the following :
- this "Unimodem" device is erroneously taken as the "GlobalDefaultDevice"
- m_pXACT3Engine->Initialize() fails
If run in DEBUG mode we can see this happening :
XAUDIO2: Thread 3e4: 5935.578ms: x2engine.cpp:352: IXAudio2::GetDeviceCount: API call: Entry (this=0x00AE0768)
XAUDIO2: Thread 3e4: 5935.959ms: x2engine.cpp:1647: CX2Engine::CreateLeapIfNeeded: Entry (this=0x00AE0768)
XAUDIO2: Thread 3e4: 5936.239ms: x2engine.cpp:1647: CX2Engine::CreateLeapIfNeeded: Exit (S_OK)
XAUDIO2: Thread 3e4: 5936.492ms: system.cpp:494: ILeap::GetRendererCount: API call: Entry (this=0x00AE8A38)
XAUDIO2: Thread 3e4: 5936.784ms: system.cpp:2379: CLeapSystem::GetRendererCountDS: Entry (this=0x00AE8A38)
XAUDIO2: Thread 3e4: 5937.077ms: dsoundrendererconnection.cpp:320: CDSoundDeviceList::Initialize: Entry (this=0x00AE8A50)
XAUDIO2: Thread 3e4: 6565.864ms: dsoundrendererconnection.cpp:476: CDSoundDeviceList::DSoundEnumerateCallBack: Entry
XAUDIO2: Thread 3e4: 6566.210ms: dsoundrendererconnection.cpp:476: CDSoundDeviceList::DSoundEnumerateCallBack: Exit (S_OK)
XAUDIO2: Thread 3e4: 6567.064ms: dsoundrendererconnection.cpp:476: CDSoundDeviceList::DSoundEnumerateCallBack: Entry
XAUDIO2: Thread 3e4: 6621.139ms: dsoundrendererconnection.cpp:135: CreateOptimalDSoundBuffer: Entry
XAUDIO2: Thread 3e4: 6621.622ms: dsoundrendererconnection.cpp:58: TryToCreateDSoundBuffer: Entry
XAUDIO2: Thread 3e4: 6623.343ms: dsoundrendererconnection.cpp:58: TryToCreateDSoundBuffer: Exit (S_OK)
XAUDIO2: Thread 3e4: 6623.753ms: dsoundrendererconnection.cpp:135: CreateOptimalDSoundBuffer: Exit (S_OK)
XAUDIO2: Thread 3e4: 6629.259ms: dsoundrendererconnection.cpp:476: CDSoundDeviceList::DSoundEnumerateCallBack: Exit (S_OK)
XAUDIO2: Thread 3e4: 6629.647ms: dsoundrendererconnection.cpp:476: CDSoundDeviceList::DSoundEnumerateCallBack: Entry
XAUDIO2: Thread 3e4: 6656.591ms: dsoundrendererconnection.cpp:476: CDSoundDeviceList::DSoundEnumerateCallBack: FAILED (DSERR_ALLOCATED: DirectSound call failed because resources were already in use)
XAUDIO2: Thread 3e4: 6657.090ms: dsoundrendererconnection.cpp:320: CDSoundDeviceList::Initialize: Exit (S_OK)
XAUDIO2: Thread 3e4: 6657.401ms: system.cpp:2379: CLeapSystem::GetRendererCountDS: Exit (S_OK)
XAUDIO2: Thread 3e4: 6657.680ms: system.cpp:494: ILeap::GetRendererCount: API call: Exit (S_OK)
XAUDIO2: Thread 3e4: 6657.946ms: x2engine.cpp:352: IXAudio2::GetDeviceCount: API call: Exit (S_OK)
You can see the problem happening at 6656.591 ms the FAILure.
At this point we tried various things to overcome the problem, first of all was to try
to use GetDeviceID ( &DSDEVID_DefaultPlayback, &DevPlayGUID ); and the convert the
obtained DevPlayGUID into a string simply with that :
swprintf (pguid,L"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
pGUID->Data1,pGUID->Data2,pGUID->Data3,
pGUID->Data4[0],
pGUID->Data4[1],
pGUID->Data4[2],
pGUID->Data4[3],
pGUID->Data4[4],
pGUID->Data4[5],
pGUID->Data4[6],
pGUID->Data4[7] );
finally converting all uppercase and passing it to pRendererID
The GUID obtained with this method seems to be correct, it correctly gets the other device, not the Unimodem
one as "Default Playback".
However it seems not to be working, like if the XACT3 does not care at all about the passed GUID, actually I
found out that if the GUID is not exactly in the format {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxx} it gives an error
but even when I pass a correct one it seems it still tries to initialise "something else" rather than the
GUID of the device I am passing by.
The only workaround so far we found is to go in control panel and disable such device.
Has anyone else seen/had the same problem and knows about how to solve it ?
We are having quite some troubles here, this device unfortunately seems to be quite
popular among some kind of Dell laptops and our recently made game does not work because of
this silly thing.
Any help will be greatly appreciated, thanks in advance.
Ivan Z.