!O+U      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST 2016 2019 Mark Karpov BSD 3 clause$Mark Karpov <markkarpov92@gmail.com> experimentalportableNone"#2SXg`Uwave8A helpers type synonym for the function to lift parsers.Vwave6A helper type synonym for give up function signatures.WwaveDA 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)[waveZA 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 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 datar chunk but is way too long. The first argument is the tag of the chunk and the second argument is the file name.waveQThe specified format is non-PCM, it's vanilla WAVE, but fact  chunk is missing.waveQSpeaker 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 rightwave9Sample formats with associated bit depth (when variable).wave{Unsigned/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 flavor of WAVE file.wave'Classic WAVE file, 4 Gb size limitationwaveWAVE file with RF64 extensionwaveRepresentation of essential  information about a WAVE file. Every field in this record provides orthogonal piece of information, so no field can be calculated from other fields. The fields are complemented by the following functions that calculate some derivative parameters: (, ), *, +, and ,. waveFormat of file this ) record was extracted/to be written to, . Default value is: .!wave%Sample rate in Hz, default is: 44100."waveYSample format. The library supports signed/unsigned integers and floats. Default value:  16.#waveThe channel mask as a _ of s. Default value is /.$wave^Offset in bytes from the beginning of file where actual sample data begins. Default value: 0.%wave.Size of audio data in bytes. Default value: 0.&wave>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 size of data-block, for other formats it's read from/written to the fact  chunk. Default value: 0.'waveOther chunks as  (tag, body)! pairs. Only first four bytes of tagw are significant (and it must be four bytes long, if it's too short it will be padded by null bytes). Default value: [].`waveDefault value of .awaveDefault value of W.(waveByte rate of a given P file. Byte rate is the number of bytes it takes to encode one second of audio.)wave Bit rate in kilobits per second.*wave+Number of significant bits in every sample.+waveBlock alignment of samples as number of bits per sample (rounded towards next multiplier of 8 if necessary) multiplied by number of channels. This is how many bytes it takes to encode a single multi-channel sample.,wave5Total number of channels present in the audio stream.-waveDuration 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).3waveBL, 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 B record from a WAVE file found at given path. This action throws - if the file is malformed and cannot be read.You can feed vanilla WAVE and RF64 files. The actual format is detected automatically from the contents of the file, not by extension.IPCM with samples in form of integers and floats only are supported, see ^. Addition of other formats will be performed on request, please feel free to contact me at  %https://github.com/mrkkrp/wave/issues.tFinally, if fmt  chunk is not extensible, we try to guess channel mask from 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, RbK7 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 given e0 and throw an exception if they are not WAVE .fwaveRead WAVE chunks.gwavesRead 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.lwaveRead a classic 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 even byte boundary . The pad byte is written for you if necessary and included in the data size.The & field will be inferred for PCM (including formats with samples represented as floats, i.e. always right now), so the provided value is not used.If  specifies 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 format chunk as a strict i from a given .swaveRender fact chunk as a strict i.twave Write a RIFF [y. It's the responsibility of the programmer to ensure that specified size matches size of 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  Ohttps://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.}wave5Get default speaker set for given number of channels.~wave Does this 4 record requires extensible format chunk to be used?waveDetermine if given  is not PCM.wave<Round bits per sample to next multiplier of 8, if necessary.wave8Estimate total number of samples for a PCM audio stream. 6waveLocation of file to readbwavee to read fromwaveHow to give upwaveHow to lift parserswave The resultcwavee to read fromwaveHow to give upwaveHow to lift parserswave The resultfwavee to read fromwaveHow to give upwaveHow to lift parserswave/Size of data chunk to use if 0xffffffff is readwave.Number of samples to use if 0xffffffff is readwaveApply modifications to this wave The resultlwaveOpened e to read the chunk fromwave1Maximum size of chunk we want to grab into memorywaveError message or a [7waveWhere to save the filewaveParameters of the WAVE filewave-Callback that will be used to write WAVE datamwavee to write towaveParameters of the WAVE filewaveCallback that writes WAVE datapwavee where to writewave Chunk tagwave Chunk bodytwaveOpened e where to write the [waveThe [ to write8  !"#$%&'()*+,-./012345678 !"#$%&' ()*+,-./01234567       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnophqrstuvwxyz{|}~!wave-0.2.0-59XIZ6ypirw9rfnt1lBEQNCodec.Audio.Wave WaveException BadFileFormatNonDataChunkIsTooLongNonPcmFormatButMissingFactSpeakerPositionSpeakerFrontLeftSpeakerFrontRightSpeakerFrontCenterSpeakerLowFrequencySpeakerBackLeftSpeakerBackRightSpeakerFrontLeftOfCenterSpeakerFrontRightOfCenterSpeakerBackCenterSpeakerSideLeftSpeakerSideRightSpeakerTopCenterSpeakerTopFrontLeftSpeakerTopFrontCenterSpeakerTopFrontRightSpeakerTopBackLeftSpeakerTopBackCenterSpeakerTopBackRight SampleFormatSampleFormatPcmIntSampleFormatIeeeFloat32BitSampleFormatIeeeFloat64Bit WaveFormat WaveVanillaWaveRF64WavewaveFileFormatwaveSampleRatewaveSampleFormatwaveChannelMaskwaveDataOffset waveDataSizewaveSamplesTotalwaveOtherChunks waveByteRate waveBitRatewaveBitsPerSamplewaveBlockAlign waveChannels waveDuration speakerMono speakerStereo speakerQuadspeakerSurround speaker5_1 speaker7_1speaker5_1Surroundspeaker7_1Surround readWaveFile writeWaveFile$fExceptionWaveException$fShowWaveFormat$fReadWaveFormat$fEqWaveFormat$fOrdWaveFormat$fBoundedWaveFormat$fEnumWaveFormat$fDataWaveFormat$fShowSampleFormat$fReadSampleFormat$fEqSampleFormat$fOrdSampleFormat$fDataSampleFormat$fShowSpeakerPosition$fReadSpeakerPosition$fEqSpeakerPosition$fOrdSpeakerPosition$fBoundedSpeakerPosition$fEnumSpeakerPosition$fDataSpeakerPosition $fShowWave $fReadWave$fEqWave $fOrdWave $fDataWave$fShowWaveException$fReadWaveException$fEqWaveException$fDataWaveExceptionLiftGetGiveUpDs64 ds64RiffSize ds64DataSizeds64SamplesTotalChunkchunkTag chunkSize chunkBodycontainers-0.6.0.1Data.Set.InternalSet defaultWave defaultDs64readWaveVanilla readWaveRF64 grabWaveTagbaseGHC.IO.Handle.TypesHandlegrabWaveChunksreadDs64 readWaveFmtbytestring-0.10.8.2Data.ByteString.Internal ByteString Data.EitherLeftreadFact readChunkwriteWaveVanilla writeWaveRF64 writeNoData writeBsChunkrenderDs64ChunkrenderFmtChunkrenderFactChunk writeChunk waveFormatPcmwaveFormatIeeeFloatwaveFormatExtensibleksdataformatSubtypePcmksdataformatSubtypeIeeeFloat speakerToFlag toSpeakerMaskfromSpeakerMaskdefaultSpeakerSetisExtensibleFmtisNonPcmroundBitsPerSamplepcmSamplesTotal