h&(r%      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST 2016@present Mark Karpov BSD 3 clause$Mark Karpov  experimentalportable Safe-Inferred"%&%hUwave8A helpers type synonym for the function to lift parsers.Vwave6A helper type synonym for give up function signatures.WwaveA @ds64@ chunk used in RF64 WAVE extension. This type is not public.XwaveSize of RIFF chunk (64 bits)YwaveSize of data chunk (64 bits)Zwave!Total number of samples (64 bits)[waveA RIFF chunk allowing for different representations of its body. This type is not public.\waveFour-byte chunk tag]wave Chunk size^waveChunk body in some formwave!Exceptions the library can throw.waveFormat of the given file doesn't look like anything familiar. The first argument is a message explaining what's wrong and the second argument is the file name.wave)The library found a chunk which is not a data chunk but is way too long. The first argument is the tag of the chunk and the second argument is the file name.waveThe specified format is non-PCM, it's vanilla WAVE, but the @fact@ chunk is missing.waveSpeaker positions clarifying which exactly channels are packed in the WAVE file.wave Front leftwave Front rightwave Front centerwave Sub-woofer wave Back left wave Back right waveFront left of center waveFront right of center wave Back centerwave Side leftwave Side rightwave Top centerwaveTop front leftwaveTop front centerwaveTop front rightwave Top back leftwaveTop back centerwaveTop back rightwave)Sample formats with associated bit depth.waveUnsigned/signed integers, the argument is the number of bits per sample (8 bit and less are encoded as unsigned integers).wave*Samples are 32 bit floating point numbers.wave*Samples are 64 bit floating point numbers.wave as a flavor of WAVE file.wave'Classic WAVE file, 4 Gb size limitationwaveWAVE file with RF64 extensionwaveRepresentation of the @essential@ information about a WAVE file. Every field in this record is an orthogonal piece of information, so no field can be calculated from other fields. The fields are complemented by the functions that calculate derivative parameters: (, ), *, +, and ,. waveThe format of the file this ) record was extracted/to be written to, . Default value is: .!wave%Sample rate in Hz, default is: 44100."waveSample format. The library supports signed/unsigned integers and floats. Default value:  16.#waveThe channel mask as a _ of s. Default value is /.$waveThe offset in bytes where the actual sample data begins. Default value: 0.%wave2Size of the audio data in bytes. Default value: 0.&waveThe total number of samples in the audio stream. @Samples@ here mean multi-channel samples, so one second of 44.1 kHz audio will have 44100 samples regardless of the number of channels. For PCM format it's deduced from the size of the data block, for other formats it's read from/written to the @fact@ chunk. Default value: 0.'waveOther chunks as  (tag, body)& pairs. Only the first four bytes of tag are significant and it must be four bytes long, if it's too short it will be padded by null bytes. Default value: [].`waveThe default value of .awaveThe default value of W.(waveThe byte rate of a given  file. The byte rate is the number of bytes it takes to encode one second of audio.)wave$The bit rate in kilobits per second.*wave+The number of significant bits in a sample.+waveThe block alignment of samples as the number of bits per sample (rounded towards the next multiplier of 8 if necessary) multiplied by the number of channels. This is how many bytes it takes to encode a single multi-channel sample.,wave9The total number of channels present in the audio stream.-waveThe duration in seconds..waveFront center (C)./wave Front left (L), front right (R).0wave&L, R, back left (Lb), back right (Rb).1wave3Surround: L, R, front center (C), back center (Cb).2wave%L, R, C, Lb, Rb, low frequency (LFE).3waveL, R, C, Lb, Rb, front left-of-center, front right-of-center, LFE.4wave.L, R, C, side left (Ls), side right (Rs), LFE.5waveL, R, C, Lb, Rb, Ls, Rs, LFE.6waveRead a  record from a WAVE file found at given path. This action throws - if the file is malformed and cannot be read.Vanilla WAVE and RF64 files are supported. The format is detected automatically from the contents of the file, not by extension.Only PCM with samples in the form of integers or floats are supported, see .Finally, if @fmt@ chunk is not extensible, we try to guess the channel mask from the number of channels alone, here is how: 1 channel: front center (C)+2 channels: front left (L), front right (R)3 channels: L, R, C14 channels: L, R, back left (Lb), back right (Rb)5 channels: L, R, C, Lb, Rb 6 channels: L, R, C, LFE, Lb, Rb7 channels: L, R, C, LFE, back center (Cb), side left (Ls), side right (Rs)(8 channels: L, R, C, LFE, Lb, Rb, Ls, Rs)N channels: first N items are taken from [minBound..maxBound] of sbwaveParse a classic WAVE file.cwaveParse an RF64 file.dwaveRead four bytes from the given e0 and throw an exception if they are not @WAVE@.fwaveRead WAVE chunks.gwaveRead a @ds64@ chunk which contains RIFF chunk/data chunk lengths as 64 bit values and the total number of samples.hwave'Parse the WAVE format chunk from given i. Return error in j in case of failure.kwaveRead the @fact@ chunk.lwave Read a RIFF [ (32 bit tag + 32 bit size).7waveWrite a WAVE file. The   value specifies in which of the supported formats the file should be written. The action uses the provided callback to write WAVE audio data. $ and % from  are ignored, instead the values are inferred dynamically after using the callback. Further, the function takes care of the requirement that WAVE data should end on an @even byte boundary@. The pad byte is written if necessary and included in the data size.The &< field will be inferred, so the provided value is not used.If  specifies the floating point sample format, the @fact@ chunk is automatically generated and written (the chunk is required for all non-PCM formats by the spec), but only for vanilla WAVE.mwaveWrite a vanilla WAVE file.nwaveWrite an RF64 file.owaveWrite no data at all.pwave/Write a chunk given its tag and body as strict is.qwave"Render a @ds64@ chunk as a stirct i.rwave$Render the format chunk as a strict i from a given .swave"Render the fact chunk as a strict i.twave Write a RIFF [. It's the responsibility of the programmer to ensure that the specified size matches the size of the body that is actually written.uwave$Pulse-code modulation, vanilla WAVE.vwave+IEEE floats, 32 bit floating point samples.wwaveExtensible format type.xwave6GUID for extensible format chunk corresponding to PCM.ywave=GUID for extensible format chunk corresponding to IEEE float.zwave$ to corresponding bit flag, as per  https://msdn.microsoft.com/en-us/library/windows/desktop/dd390971(v=vs.85).aspx.{waveGet speaker mask from a _ of s.|wave&Transform a 4-byte mask into a set of s.}wave;Get the default speaker set for a given number of channels.~wave Does this 6 record require an extensible format chunk to be used?waveDetermine if the given  is not PCM.waveRound bits per sample to the next multiplier of 8, if necessary.wave?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnophqrstuvwxyz{|}~!wave-0.2.1-6iMaO8QPsbcKqqFuhMnLqeCodec.Audio.Wave WaveException BadFileFormatNonDataChunkIsTooLongNonPcmFormatButMissingFactSpeakerPositionSpeakerFrontLeftSpeakerFrontRightSpeakerFrontCenterSpeakerLowFrequencySpeakerBackLeftSpeakerBackRightSpeakerFrontLeftOfCenterSpeakerFrontRightOfCenterSpeakerBackCenterSpeakerSideLeftSpeakerSideRightSpeakerTopCenterSpeakerTopFrontLeftSpeakerTopFrontCenterSpeakerTopFrontRightSpeakerTopBackLeftSpeakerTopBackCenterSpeakerTopBackRight SampleFormatSampleFormatPcmIntSampleFormatIeeeFloat32BitSampleFormatIeeeFloat64Bit WaveFormat WaveVanillaWaveRF64WavewaveFileFormatwaveSampleRatewaveSampleFormatwaveChannelMaskwaveDataOffset waveDataSizewaveSamplesTotalwaveOtherChunks waveByteRate waveBitRatewaveBitsPerSamplewaveBlockAlign waveChannels waveDuration speakerMono speakerStereo speakerQuadspeakerSurround speaker5_1 speaker7_1speaker5_1Surroundspeaker7_1Surround readWaveFile writeWaveFile$fExceptionWaveException$fShowWaveException$fReadWaveException$fEqWaveException$fDataWaveException $fShowWave $fReadWave$fEqWave $fOrdWave $fDataWave$fShowSpeakerPosition$fReadSpeakerPosition$fEqSpeakerPosition$fOrdSpeakerPosition$fBoundedSpeakerPosition$fEnumSpeakerPosition$fDataSpeakerPosition$fShowSampleFormat$fReadSampleFormat$fEqSampleFormat$fOrdSampleFormat$fDataSampleFormat$fShowWaveFormat$fReadWaveFormat$fEqWaveFormat$fOrdWaveFormat$fBoundedWaveFormat$fEnumWaveFormat$fDataWaveFormatLiftGetGiveUpDs64 ds64RiffSize ds64DataSizeds64SamplesTotalChunkchunkTag chunkSize chunkBodycontainers-0.6.5.1Data.Set.InternalSet defaultWave defaultDs64readWaveVanilla readWaveRF64 grabWaveTagbaseGHC.IO.Handle.TypesHandlegrabWaveChunksreadDs64 readWaveFmtbytestring-0.11.3.1Data.ByteString.Internal ByteString Data.EitherLeftreadFact readChunkwriteWaveVanilla writeWaveRF64 writeNoData writeBsChunkrenderDs64ChunkrenderFmtChunkrenderFactChunk writeChunk waveFormatPcmwaveFormatIeeeFloatwaveFormatExtensibleksdataformatSubtypePcmksdataformatSubtypeIeeeFloat speakerToFlag toSpeakerMaskfromSpeakerMaskdefaultSpeakerSetisExtensibleFmtisNonPcmroundBitsPerSamplepcmSamplesTotal