Re: Re: blocking / non-blocking capturing
Chris Robinson <[email protected]> Wed, 08 Aug 2012 00:08:32 -0700
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
On 08/07/2012 05:58 AM, Philipp Kraus wrote: > in the ctor I create the device > > m_device is a pointer to ALCdevice and p_device the capture device name. > > m_device( alcOpenDevice( p_device.c_str() ) ) > > in my capture methode I call this > ALCdevice* l_capturedevice = alcCaptureOpenDevice( > alcGetString(m_device, ALC_CAPTURE_DEVICE_SPECIFIER), > (ALCuint)p_samplefrequency, AL_FORMAT_MONO8, (ALCsizei)p_buffersize) > alcCaptureStart(l_capturedevice); > // here I will read the samples with a blocking structure > > Is this correct? Unfortunately that's not correct. You can't rely on capture devices having the same name as playback devices, or a capture device even having a corresponding playback device. You would need to call alcCaptureOpenDevice with the name passed in, while making sure the name came from the list of enumerated capture device names. It's also not technically valid to get the ALC_CAPTURE_DEVICE_SPECIFIER string on a playback device, as far as I'm aware. It would likely be best to remove the m_device stuff for playback, and open the capture device when the class initializes instead. _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal