Ejemplo n.º 1
0
        //

        public OpenALCaptureSound(SoundModes mode, int channels, int frequency, int bufferSize)
        {
            mode |= SoundModes.Loop | SoundModes.Software;

            int alFormat = channels == 2 ? Al.AL_FORMAT_STEREO16 : Al.AL_FORMAT_MONO16;

            alCaptureDevice = Alc.alcCaptureOpenDevice(OpenALSoundWorld.captureDeviceName, frequency, alFormat, bufferSize);
            if (alCaptureDevice == IntPtr.Zero)
            {
                return;
            }

            this.channels  = channels;
            this.frequency = frequency;

            Init(null, mode, 100000.0f, channels, frequency);
        }