[Openal] Unable to open the device capture ???
wassim_belhadj
wassim_belhadj at topnet.tn
Sat Jun 21 06:26:48 PDT 2008
I noticed that the sound card that I use does not make to record sound
when the device(sound card) is open.
Indeed, alcCaptureOpenDevice me always returns NULL when the device is
opened.
To run the capture I always have to close the device before starting the
capture and then reopen again to play the sound like this:
/**********************************************************/
ALCcontext* ptrCntxt = alcGetCurrentContext();
ALCdevice* ptrDvc = alcGetContextsDevice(ptrCntxt);
alcMakeContextCurrent(NULL);
alcDestroyContext(ptrCntxt);
alcCloseDevice(ptrDvc);
CptrDvc=alcCaptureOpenDevice(ptrucDvcNm, 44100, AL_FORMAT_MONO16, 44100);
/......................../
alcCaptureStop(CptrDvc);
//reopen again the device
Dvc = alcOpenDevice(NULL);
ALCcontext* ptrCntxt = alcCreateContext(Dvc, NULL);
alcMakeContextCurrent(ptrCntxt);
/**********************************************************************************************/
The problem is that sometimes the capture fails because the device is open
(I do not know how ????) Maybe it was opened twice
Are there any way to close all open device?
Are there any way to circumvent what I do ...
Help me please
More information about the Openal
mailing list