Re: blocking / non-blocking capturing
Philipp Kraus <[email protected]> Tue, 7 Aug 2012 14:58:20 +0200
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
On 2012-07-29 00:56:21 +0200, Chris Robinson said: > On 07/28/2012 01:41 PM, Philipp Kraus wrote: >> If I show my l_buffer values, it generates always the same data, so it >> seems, I have created an error dyring the alcCaptureSamples >> or the interface results wrong data. I have initializate my interface >> with the sampling frequency 44.1k and mono 8 bit. The interface is named >> on OSX with "CoreAudio Default". > > If you're capturing 8-bit, then you need to store it using ALubyte > instead of ALshort. > > If the data it captures is always silence (values are all near 128), > then check to make sure other OSX apps can properly capture audio. Make > sure also that you've called alcCaptureStart(l_capturedevice), and that > no errors are being generated (check alcGetError(l_capturedevice)). Sorry, I have not enough time to test it, but I will try it in the next days. So imho I have create a C++ class and do this code for creating a capture audio device: 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? Thanks Phil _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal