To create the DirectSound object I use this snippet member function of the Implementation Class
// First Create the DirectSoundObject hr = DirectSoundCreate8( NULL, &m_pDSound, NULL ); CHRM(hr, "DirectSoundCreate8"); //CHRM(CoInitializeEx(NULL, 0), "CoInitializeEx"); CHRM(m_pDSound->SetCooperativeLevel(m_hwnd, DSSCL_PRIORITY), "SetCooperativeLevel");
and then when I delete the implementation class this code snippet is called
if(m_pDSoundBuffer)
{
m_pDSoundBuffer->Stop();
m_pDSoundBuffer->Release();
m_pDSoundBuffer = NULL;
}
if(m_pDSound)
{
m_pDSound->Release();
m_pDSound = NULL;
}
So the way that the implementation is generated is through a factory class which then passes the implementation to an object which contains the sound data. Both implementation and data classes are abstracted but I doubt that this could somehow interfere with DirectSound. Basically what happens is that at program exit the implementatio class is deleted and this code is called but in the end the console simply hangs although it is not running any of my code. It seems like there is something else referencing the DirectSound object but I can't seem to figure out what that is. It definitely is not my code since at this point I have stripped out everything except creating and deleting the DirectSound object.
Any help would be greatly appreciated, thanks!
djb











