public void SetPeriodSizeNear(ref uint periodSize, ref int dir) { int error = AlsaNativeMethods.snd_pcm_hw_params_set_period_size_near(_pcmPtr, _hardwareParamsPtr, ref periodSize, ref dir); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_hw_params_set_period_size_near)); } }
public void SetPeriodSize(uint periodSize, int dir) { int error = AlsaNativeMethods.snd_pcm_hw_params_set_period_size(_pcmPtr, _hardwareParamsPtr, periodSize, dir); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_hw_params_set_period_size)); } }
/// <summary> /// would be nice to know what this does... /// </summary> public void Any() { int error = AlsaNativeMethods.snd_pcm_hw_params_any(_pcmPtr, _hardwareParamsPtr); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_hw_params_any)); } }
public void SetRateNear(ref uint rate, ref int dir) { int error = AlsaNativeMethods.snd_pcm_hw_params_set_rate_near(_pcmPtr, _hardwareParamsPtr, ref rate, ref dir); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_hw_params_set_rate_near)); } }
public void SetBufferNear(ref uint frames) { int error = AlsaNativeMethods.snd_pcm_hw_params_set_buffer_size_near(_pcmPtr, _hardwareParamsPtr, ref frames); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_hw_params_set_buffer_size_near)); } }
public void Reset() { int error = AlsaNativeMethods.snd_pcm_reset(_pcmPtr); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_reset)); } }
public void Drop() { int error = AlsaNativeMethods.snd_pcm_drop(_pcmPtr); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_drop)); } }
public SoundPcm(string name, snd_pcm_stream_t streamType, int mode) { int error = AlsaNativeMethods.snd_pcm_open(out _pcmPtr, name, streamType, mode); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_open)); } }
public void Resume() { int error = AlsaNativeMethods.snd_pcm_pause(_pcmPtr, 0); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_pause)); } }
public void Prepare() { int error = AlsaNativeMethods.snd_pcm_prepare(_pcmPtr); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_prepare)); } }
public SoundPcmHardwareParams(SoundPcm pcm) { _pcmPtr = pcm.Ptr; int error = AlsaNativeMethods.snd_pcm_hw_params_malloc(out _hardwareParamsPtr); if (error < 0) { throw new AlsaNativeError(error, nameof(AlsaNativeMethods.snd_pcm_hw_params_malloc)); } }
public int Available() { int result = AlsaNativeMethods.snd_pcm_avail(_pcmPtr); if (result < 0) { throw new AlsaNativeError(result, nameof(AlsaNativeMethods.snd_pcm_avail)); } return(result); }
protected virtual void Dispose(bool disposing) { if (!_disposedValue) { if (disposing) { AlsaNativeMethods.snd_pcm_hw_params_free(_hardwareParamsPtr); } _disposedValue = true; } }
protected virtual void Dispose(bool disposing) { if (!_disposedValue) { if (disposing) { AlsaNativeMethods.snd_pcm_close(_pcmPtr); } _disposedValue = true; } }
public int WriteInterleaved(short[] buffer, uint length) { return(AlsaNativeMethods.snd_pcm_writei(_pcmPtr, buffer, length)); }
public int ReadInterleaved(short[] buffer, uint length) { return(AlsaNativeMethods.snd_pcm_readi(_pcmPtr, buffer, length)); }