aradicev 0 Newbie Poster

Hi,

I have run into an obstacle while trying to restart a direct sound device on windows 7. What I'm doing is clasical stuff:

  1. Create the interface
    DirectSoundCaptureCreate8(CConfig::GetMainSoundDeviceCaptureGUID(), &m_radioRecordObj, NULL);
  2. Create the buffer
    m_radioRecordObj->CreateCaptureBuffer(&m_radioRecordDesc, &pDsb, NULL);
    ...
    pDsb->QueryInterface(IID_IDirectSoundCaptureBuffer8, (LPVOID*) &m_radioRecordBuf);
  3. Start the buffer
    m_radioRecordBuf->Start(DSCBSTART_LOOPING);

after some time I'm stopping and releasing the buffer
m_radioRecordBuf->Stop()
m_radioRecordBuf->Release();

and after that i repeat the former sequence for creating the interface and creating and starting of the buffer.

The scenario is: I start the program on a remote machine and it runs smoothly, even the restarting of the sound interface, up to the point when I dissconnect (not logging out, just dissconect) from the remote machine. After that, the first sond interface restart produces an error (DSERR_NODRIVER) when calling DirectSoundCaptureCreate8.

I have produced this behaviour on a local macnine too by locking the machine (Windows logo key and the + L).

Further more, I have tried to schedule the start of the application after I have dissconected from the machine. And guess what, the applicaton runs ok, but only until I connect to it via remote desktop when it again breaks with DSERR_NODRIVER on the first sound interface restart.

Hope that someone has stumbled over this problem and has a solution to it.

Regards

Andrija

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.