module Sound.ALSA.PCM.Parameters.Hardware (
T, SampleFreq, Time, Size,
Interleaved, Noninterleaved,
HwParams.canMmapSampleResolution,
HwParams.isDouble,
HwParams.isBatch,
HwParams.isBlockTransfer,
HwParams.canOverrange,
HwParams.canPause,
HwParams.canResume,
HwParams.isHalfDuplex,
HwParams.isJointDuplex,
HwParams.canSyncStart,
HwParams.getRateNumden,
HwParams.getSbits,
HwParams.getFifoSize,
HwParams.getChannels,
HwParams.getChannelsMin,
HwParams.getChannelsMax,
HwParams.testChannels,
setChannels,
setChannelsMin,
setChannelsMax,
setChannelsMinmax,
setChannelsNear,
setChannelsFirst,
setChannelsLast,
HwParams.getRate,
HwParams.getRateMin,
HwParams.getRateMax,
HwParams.testRate,
HwParams.setRate,
HwParams.setRateMin,
HwParams.setRateMax,
HwParams.setRateMinmax,
HwParams.setRateNear,
HwParams.setRateFirst,
HwParams.setRateLast,
HwParams.setRateResample,
HwParams.getRateResample,
HwParams.setExportBuffer,
HwParams.getExportBuffer,
HwParams.getPeriodTime,
HwParams.getPeriodTimeMin,
HwParams.getPeriodTimeMax,
HwParams.testPeriodTime,
HwParams.setPeriodTime,
HwParams.setPeriodTimeMin,
HwParams.setPeriodTimeMax,
HwParams.setPeriodTimeMinmax,
HwParams.setPeriodTimeNear,
HwParams.setPeriodTimeFirst,
HwParams.setPeriodTimeLast,
HwParams.getPeriodSize,
HwParams.getPeriodSizeMin,
HwParams.getPeriodSizeMax,
HwParams.testPeriodSize,
HwParams.setPeriodSize,
HwParams.setPeriodSizeMin,
HwParams.setPeriodSizeMax,
HwParams.setPeriodSizeMinmax,
HwParams.setPeriodSizeNear,
HwParams.setPeriodSizeFirst,
HwParams.setPeriodSizeLast,
HwParams.setPeriodSizeInteger,
HwParams.getPeriods,
HwParams.getPeriodsMin,
HwParams.getPeriodsMax,
HwParams.testPeriods,
HwParams.setPeriods,
HwParams.setPeriodsMin,
HwParams.setPeriodsMax,
HwParams.setPeriodsMinmax,
HwParams.setPeriodsNear,
HwParams.setPeriodsFirst,
HwParams.setPeriodsLast,
HwParams.setPeriodsInteger,
HwParams.getBufferTime,
HwParams.getBufferTimeMin,
HwParams.getBufferTimeMax,
HwParams.testBufferTime,
HwParams.setBufferTime,
HwParams.setBufferTimeMin,
HwParams.setBufferTimeMax,
HwParams.setBufferTimeMinmax,
HwParams.setBufferTimeNear,
HwParams.setBufferTimeFirst,
HwParams.setBufferTimeLast,
HwParams.getBufferSize,
HwParams.getBufferSizeMin,
HwParams.getBufferSizeMax,
HwParams.testBufferSize,
HwParams.setBufferSize,
HwParams.setBufferSizeMin,
HwParams.setBufferSizeMax,
HwParams.setBufferSizeMinmax,
HwParams.setBufferSizeNear,
HwParams.setBufferSizeFirst,
HwParams.setBufferSizeLast,
HwParams.getTickTime,
HwParams.getTickTimeMin,
HwParams.getTickTimeMax,
HwParams.testTickTime,
HwParams.setTickTime,
HwParams.setTickTimeMin,
HwParams.setTickTimeMax,
HwParams.setTickTimeMinmax,
HwParams.setTickTimeNear,
HwParams.setTickTimeFirst,
HwParams.setTickTimeLast,
HwParams.getMinAlign,
setRateBufferTime,
) where
import qualified Sound.ALSA.PCM.Core.HwParams as HwParams
import Sound.ALSA.PCM.Core.HwParams (T, )
import Sound.ALSA.PCM.Core.Handle
(SampleFreq, Time, Size, Interleaved, Noninterleaved, )
import Data.Word (Word, )
setChannels :: Word -> T Noninterleaved y ()
setChannels = HwParams.setChannels
setChannelsMin :: Word -> T Noninterleaved y Word
setChannelsMin = HwParams.setChannelsMin
setChannelsMax :: Word -> T Noninterleaved y Word
setChannelsMax = HwParams.setChannelsMax
setChannelsMinmax :: Word -> Word -> T Noninterleaved y (Word, Word)
setChannelsMinmax = HwParams.setChannelsMinmax
setChannelsNear :: Word -> T Noninterleaved y Word
setChannelsNear = HwParams.setChannelsNear
setChannelsFirst :: Word -> T Noninterleaved y Word
setChannelsFirst = HwParams.setChannelsFirst
setChannelsLast :: Word -> T Noninterleaved y Word
setChannelsLast = HwParams.setChannelsLast
setRateBufferTime ::
SampleFreq
-> Time
-> Time
-> T Interleaved y (Size,Size)
setRateBufferTime rate bufferTime periodTime = do
HwParams.setRate rate EQ
_ <- HwParams.setBufferTimeNear bufferTime EQ
bufferSize <- HwParams.getBufferSize
_ <- HwParams.setPeriodTimeNear periodTime EQ
(periodSize,_) <- HwParams.getPeriodSize
return (bufferSize,periodSize)