public override Sound SoundCreateDataBuffer(SoundMode mode, int channels, int frequency, int bufferSize, DataReadDelegate dataReadCallback) { criticalSection.Enter(); Sound sound; if ((mode & SoundMode.Record) != 0) { OpenALCaptureSound captureSound = new OpenALCaptureSound( mode, channels, frequency, bufferSize); if (captureSound.alCaptureDevice == IntPtr.Zero) { criticalSection.Leave(); return(null); } sound = captureSound; } else { sound = new OpenALDataStreamSound(mode, channels, frequency, bufferSize, dataReadCallback); } criticalSection.Leave(); return(sound); }
public static Sound SoundCreateDataBuffer(SoundModes mode, int channels, int frequency, int bufferSize, DataReadDelegate dataReadCallback) { return(instance._SoundCreateDataBuffer(mode, channels, frequency, bufferSize, dataReadCallback)); }
protected abstract Sound _SoundCreateDataBuffer(SoundModes mode, int channels, int frequency, int bufferSize, DataReadDelegate dataReadCallback);
unsafe public override Sound SoundCreateDataBuffer(SoundMode mode, int channels, int frequency, int bufferSize, DataReadDelegate dataReadCallback) { criticalSection.Enter(); Sound sound; if ((int)(mode & SoundMode.Record) != 0) { DirectCaptureSound captureSound = new DirectCaptureSound( mode, channels, frequency, bufferSize); if (captureSound.soundCapture == null) { captureSound = null; } sound = captureSound; } else { sound = new DirectDataStreamSound(mode, channels, frequency, bufferSize, dataReadCallback); } criticalSection.Leave(); return(sound); }
protected override Sound _SoundCreateDataBuffer(SoundModes mode, int channels, int frequency, int bufferSize, DataReadDelegate dataBufferCallback) { return(null); }
unsafe public override Sound SoundCreateDataBuffer( SoundMode mode, int channels, int frequency, int bufferSize, DataReadDelegate dataReadCallback ) { criticalSection.Enter(); Sound sound; if( (int)( mode & SoundMode.Record ) != 0 ) { DirectCaptureSound captureSound = new DirectCaptureSound( mode, channels, frequency, bufferSize ); if( captureSound.soundCapture == null ) captureSound = null; sound = captureSound; } else { sound = new DirectDataStreamSound( mode, channels, frequency, bufferSize, dataReadCallback ); } criticalSection.Leave(); return sound; }
public override Sound SoundCreateDataBuffer( SoundMode mode, int channels, int frequency, int bufferSize, DataReadDelegate dataReadCallback ) { criticalSection.Enter(); Sound sound; if( ( mode & SoundMode.Record ) != 0 ) { OpenALCaptureSound captureSound = new OpenALCaptureSound( mode, channels, frequency, bufferSize ); if( captureSound.alCaptureDevice == IntPtr.Zero ) { criticalSection.Leave(); return null; } sound = captureSound; } else { sound = new OpenALDataStreamSound( mode, channels, frequency, bufferSize, dataReadCallback ); } criticalSection.Leave(); return sound; }