From 5106e945565af73db594596c0d9c4db4e4722cad Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Sat, 10 Sep 2022 20:57:57 +0800 Subject: [PATCH] Remove Android platform support --- Assets/Plugins/NAudio.dll | Bin 0 -> 479232 bytes Assets/Plugins/NAudio.dll.meta | 33 + Assets/Scripts/Audio/NAudio.meta | 8 - Assets/Scripts/Audio/NAudio/Codecs.meta | 8 - .../Audio/NAudio/Codecs/ALawDecoder.cs | 63 - .../Audio/NAudio/Codecs/ALawDecoder.cs.meta | 11 - .../Audio/NAudio/Codecs/ALawEncoder.cs | 65 - .../Audio/NAudio/Codecs/ALawEncoder.cs.meta | 11 - .../Scripts/Audio/NAudio/Codecs/G722Codec.cs | 628 ---- .../Audio/NAudio/Codecs/G722Codec.cs.meta | 11 - .../Audio/NAudio/Codecs/MuLawDecoder.cs | 60 - .../Audio/NAudio/Codecs/MuLawDecoder.cs.meta | 11 - .../Audio/NAudio/Codecs/MuLawEncoder.cs | 53 - .../Audio/NAudio/Codecs/MuLawEncoder.cs.meta | 11 - Assets/Scripts/Audio/NAudio/CoreAudioApi.meta | 8 - .../NAudio/CoreAudioApi/AudioCaptureClient.cs | 85 - .../CoreAudioApi/AudioCaptureClient.cs.meta | 11 - .../Audio/NAudio/CoreAudioApi/AudioClient.cs | 357 --- .../NAudio/CoreAudioApi/AudioClient.cs.meta | 11 - .../CoreAudioApi/AudioClientBufferFlags.cs | 29 - .../AudioClientBufferFlags.cs.meta | 11 - .../CoreAudioApi/AudioClientProperties.cs | 30 - .../AudioClientProperties.cs.meta | 11 - .../CoreAudioApi/AudioClientShareMode.cs | 19 - .../CoreAudioApi/AudioClientShareMode.cs.meta | 11 - .../CoreAudioApi/AudioClientStreamFlags.cs | 32 - .../AudioClientStreamFlags.cs.meta | 11 - .../CoreAudioApi/AudioClientStreamOptions.cs | 17 - .../AudioClientStreamOptions.cs.meta | 11 - .../NAudio/CoreAudioApi/AudioClockClient.cs | 128 - .../CoreAudioApi/AudioClockClient.cs.meta | 11 - .../CoreAudioApi/AudioEndpointVolume.cs | 226 -- .../CoreAudioApi/AudioEndpointVolume.cs.meta | 11 - .../AudioEndpointVolumeCallback.cs | 74 - .../AudioEndpointVolumeCallback.cs.meta | 11 - .../AudioEndpointVolumeChannel.cs | 95 - .../AudioEndpointVolumeChannel.cs.meta | 11 - .../AudioEndpointVolumeChannels.cs | 76 - .../AudioEndpointVolumeChannels.cs.meta | 11 - ...AudioEndpointVolumeNotificationDelegate.cs | 32 - ...EndpointVolumeNotificationDelegate.cs.meta | 11 - .../AudioEndpointVolumeStepInformation.cs | 57 - ...AudioEndpointVolumeStepInformation.cs.meta | 11 - .../AudioEndpointVolumeVolumeRange.cs | 67 - .../AudioEndpointVolumeVolumeRange.cs.meta | 11 - .../CoreAudioApi/AudioMeterInformation.cs | 83 - .../AudioMeterInformation.cs.meta | 11 - .../AudioMeterInformationChannels.cs | 76 - .../AudioMeterInformationChannels.cs.meta | 11 - .../NAudio/CoreAudioApi/AudioRenderClient.cs | 56 - .../CoreAudioApi/AudioRenderClient.cs.meta | 11 - .../CoreAudioApi/AudioSessionControl.cs | 237 -- .../CoreAudioApi/AudioSessionControl.cs.meta | 11 - .../AudioSessionEventsCallback.cs | 135 - .../AudioSessionEventsCallback.cs.meta | 11 - .../CoreAudioApi/AudioSessionManager.cs | 144 - .../CoreAudioApi/AudioSessionManager.cs.meta | 11 - .../CoreAudioApi/AudioSessionNotification.cs | 24 - .../AudioSessionNotification.cs.meta | 11 - .../CoreAudioApi/AudioStreamCategory.cs | 41 - .../CoreAudioApi/AudioStreamCategory.cs.meta | 11 - .../NAudio/CoreAudioApi/AudioStreamVolume.cs | 170 - .../CoreAudioApi/AudioStreamVolume.cs.meta | 11 - .../AudioVolumeNotificationData.cs | 104 - .../AudioVolumeNotificationData.cs.meta | 11 - .../Audio/NAudio/CoreAudioApi/DataFlow.cs | 29 - .../NAudio/CoreAudioApi/DataFlow.cs.meta | 11 - .../Audio/NAudio/CoreAudioApi/DeviceState.cs | 55 - .../NAudio/CoreAudioApi/DeviceState.cs.meta | 11 - .../CoreAudioApi/EEndpointHardwareSupport.cs | 45 - .../EEndpointHardwareSupport.cs.meta | 11 - .../Audio/NAudio/CoreAudioApi/Interfaces.meta | 8 - .../AudioVolumeNotificationDataStruct.cs | 52 - .../AudioVolumeNotificationDataStruct.cs.meta | 11 - .../NAudio/CoreAudioApi/Interfaces/Blob.cs | 58 - .../CoreAudioApi/Interfaces/Blob.cs.meta | 11 - .../NAudio/CoreAudioApi/Interfaces/ClsCtx.cs | 39 - .../CoreAudioApi/Interfaces/ClsCtx.cs.meta | 11 - .../CoreAudioApi/Interfaces/ErrorCodes.cs | 66 - .../Interfaces/ErrorCodes.cs.meta | 11 - .../Interfaces/IAudioCaptureClient.cs | 34 - .../Interfaces/IAudioCaptureClient.cs.meta | 11 - .../CoreAudioApi/Interfaces/IAudioClient.cs | 61 - .../Interfaces/IAudioClient.cs.meta | 11 - .../CoreAudioApi/Interfaces/IAudioClock2.cs | 35 - .../Interfaces/IAudioClock2.cs.meta | 11 - .../Interfaces/IAudioEndpointVolume.cs | 52 - .../Interfaces/IAudioEndpointVolume.cs.meta | 11 - .../IAudioEndpointVolumeCallback.cs | 39 - .../IAudioEndpointVolumeCallback.cs.meta | 11 - .../Interfaces/IAudioMeterInformation.cs | 36 - .../Interfaces/IAudioMeterInformation.cs.meta | 11 - .../Interfaces/IAudioRenderClient.cs | 16 - .../Interfaces/IAudioRenderClient.cs.meta | 11 - .../Interfaces/IAudioSessionControl.cs | 260 -- .../Interfaces/IAudioSessionControl.cs.meta | 11 - .../Interfaces/IAudioSessionEnumerator.cs | 17 - .../IAudioSessionEnumerator.cs.meta | 11 - .../Interfaces/IAudioSessionEvents.cs | 177 -- .../Interfaces/IAudioSessionEvents.cs.meta | 11 - .../Interfaces/IAudioSessionEventsHandler.cs | 55 - .../IAudioSessionEventsHandler.cs.meta | 11 - .../Interfaces/IAudioSessionManager.cs | 108 - .../Interfaces/IAudioSessionManager.cs.meta | 11 - .../Interfaces/IAudioSessionNotification.cs | 26 - .../IAudioSessionNotification.cs.meta | 11 - .../Interfaces/IAudioStreamVolume.cs | 37 - .../Interfaces/IAudioStreamVolume.cs.meta | 11 - .../CoreAudioApi/Interfaces/IMMDevice.cs | 23 - .../CoreAudioApi/Interfaces/IMMDevice.cs.meta | 11 - .../Interfaces/IMMDeviceCollection.cs | 15 - .../Interfaces/IMMDeviceCollection.cs.meta | 11 - .../Interfaces/IMMDeviceEnumerator.cs | 24 - .../Interfaces/IMMDeviceEnumerator.cs.meta | 11 - .../CoreAudioApi/Interfaces/IMMEndpoint.cs | 17 - .../Interfaces/IMMEndpoint.cs.meta | 11 - .../Interfaces/IMMNotificationClient.cs | 43 - .../Interfaces/IMMNotificationClient.cs.meta | 11 - .../CoreAudioApi/Interfaces/IPropertyStore.cs | 21 - .../Interfaces/IPropertyStore.cs.meta | 11 - .../Interfaces/ISimpleAudioVolume.cs | 75 - .../Interfaces/ISimpleAudioVolume.cs.meta | 11 - .../Interfaces/MMDeviceEnumeratorComObject.cs | 15 - .../MMDeviceEnumeratorComObject.cs.meta | 11 - .../Interfaces/StorageAccessMode.cs | 25 - .../Interfaces/StorageAccessMode.cs.meta | 11 - .../Audio/NAudio/CoreAudioApi/MMDevice.cs | 301 -- .../NAudio/CoreAudioApi/MMDevice.cs.meta | 11 - .../NAudio/CoreAudioApi/MMDeviceCollection.cs | 95 - .../CoreAudioApi/MMDeviceCollection.cs.meta | 11 - .../NAudio/CoreAudioApi/MMDeviceEnumerator.cs | 157 - .../CoreAudioApi/MMDeviceEnumerator.cs.meta | 11 - .../Audio/NAudio/CoreAudioApi/PropVariant.cs | 291 -- .../NAudio/CoreAudioApi/PropVariant.cs.meta | 11 - .../NAudio/CoreAudioApi/PropVariantNative.cs | 14 - .../CoreAudioApi/PropVariantNative.cs.meta | 11 - .../Audio/NAudio/CoreAudioApi/PropertyKey.cs | 28 - .../NAudio/CoreAudioApi/PropertyKey.cs.meta | 11 - .../Audio/NAudio/CoreAudioApi/PropertyKeys.cs | 100 - .../NAudio/CoreAudioApi/PropertyKeys.cs.meta | 11 - .../NAudio/CoreAudioApi/PropertyStore.cs | 159 - .../NAudio/CoreAudioApi/PropertyStore.cs.meta | 11 - .../CoreAudioApi/PropertyStoreProperty.cs | 61 - .../PropertyStoreProperty.cs.meta | 11 - .../Scripts/Audio/NAudio/CoreAudioApi/Role.cs | 26 - .../Audio/NAudio/CoreAudioApi/Role.cs.meta | 11 - .../NAudio/CoreAudioApi/SessionCollection.cs | 48 - .../CoreAudioApi/SessionCollection.cs.meta | 11 - .../NAudio/CoreAudioApi/SimpleAudioVolume.cs | 89 - .../CoreAudioApi/SimpleAudioVolume.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Dmo.meta | 8 - .../Audio/NAudio/Dmo/AudioMediaSubtypes.cs | 71 - .../NAudio/Dmo/AudioMediaSubtypes.cs.meta | 11 - .../Scripts/Audio/NAudio/Dmo/DmoDescriptor.cs | 29 - .../Audio/NAudio/Dmo/DmoDescriptor.cs.meta | 11 - .../Scripts/Audio/NAudio/Dmo/DmoEnumFlags.cs | 11 - .../Audio/NAudio/Dmo/DmoEnumFlags.cs.meta | 11 - .../Scripts/Audio/NAudio/Dmo/DmoEnumerator.cs | 60 - .../Audio/NAudio/Dmo/DmoEnumerator.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Dmo/DmoGuids.cs | 31 - .../Scripts/Audio/NAudio/Dmo/DmoGuids.cs.meta | 11 - .../Scripts/Audio/NAudio/Dmo/DmoHResults.cs | 17 - .../Audio/NAudio/Dmo/DmoHResults.cs.meta | 11 - .../NAudio/Dmo/DmoInputDataBufferFlags.cs | 28 - .../Dmo/DmoInputDataBufferFlags.cs.meta | 11 - .../Audio/NAudio/Dmo/DmoInputStatusFlags.cs | 11 - .../NAudio/Dmo/DmoInputStatusFlags.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Dmo/DmoInterop.cs | 32 - .../Audio/NAudio/Dmo/DmoInterop.cs.meta | 11 - .../Scripts/Audio/NAudio/Dmo/DmoMediaType.cs | 141 - .../Audio/NAudio/Dmo/DmoMediaType.cs.meta | 11 - .../Audio/NAudio/Dmo/DmoOutputDataBuffer.cs | 109 - .../NAudio/Dmo/DmoOutputDataBuffer.cs.meta | 11 - .../NAudio/Dmo/DmoOutputDataBufferFlags.cs | 32 - .../Dmo/DmoOutputDataBufferFlags.cs.meta | 11 - .../Audio/NAudio/Dmo/DmoPartialMediaType.cs | 25 - .../NAudio/Dmo/DmoPartialMediaType.cs.meta | 11 - .../Audio/NAudio/Dmo/DmoProcessOutputFlags.cs | 20 - .../NAudio/Dmo/DmoProcessOutputFlags.cs.meta | 11 - .../Audio/NAudio/Dmo/DmoSetTypeFlags.cs | 12 - .../Audio/NAudio/Dmo/DmoSetTypeFlags.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Dmo/IEnumDmo.cs | 20 - .../Scripts/Audio/NAudio/Dmo/IEnumDmo.cs.meta | 11 - .../Scripts/Audio/NAudio/Dmo/IMediaBuffer.cs | 42 - .../Audio/NAudio/Dmo/IMediaBuffer.cs.meta | 11 - .../Scripts/Audio/NAudio/Dmo/IMediaObject.cs | 84 - .../Audio/NAudio/Dmo/IMediaObject.cs.meta | 11 - .../Audio/NAudio/Dmo/IMediaParamInfo.cs | 35 - .../Audio/NAudio/Dmo/IMediaParamInfo.cs.meta | 11 - .../Audio/NAudio/Dmo/IWMResamplerProps.cs | 24 - .../NAudio/Dmo/IWMResamplerProps.cs.meta | 11 - .../Audio/NAudio/Dmo/InputStreamInfoFlags.cs | 14 - .../NAudio/Dmo/InputStreamInfoFlags.cs.meta | 11 - .../Scripts/Audio/NAudio/Dmo/MediaBuffer.cs | 142 - .../Audio/NAudio/Dmo/MediaBuffer.cs.meta | 11 - .../Scripts/Audio/NAudio/Dmo/MediaObject.cs | 491 --- .../Audio/NAudio/Dmo/MediaObject.cs.meta | 11 - .../Audio/NAudio/Dmo/MediaObjectSizeInfo.cs | 44 - .../NAudio/Dmo/MediaObjectSizeInfo.cs.meta | 11 - .../Audio/NAudio/Dmo/MediaParamInfo.cs | 64 - .../Audio/NAudio/Dmo/MediaParamInfo.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Dmo/MediaTypes.cs | 72 - .../Audio/NAudio/Dmo/MediaTypes.cs.meta | 11 - .../Audio/NAudio/Dmo/OutputStreamInfoFlags.cs | 14 - .../NAudio/Dmo/OutputStreamInfoFlags.cs.meta | 11 - .../Audio/NAudio/Dmo/ResamplerMediaObject.cs | 80 - .../NAudio/Dmo/ResamplerMediaObject.cs.meta | 11 - .../NAudio/Dmo/WindowsMediaMp3Decoder.cs | 88 - .../NAudio/Dmo/WindowsMediaMp3Decoder.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Dsp.meta | 8 - .../Scripts/Audio/NAudio/Dsp/BiQuadFilter.cs | 322 -- .../Audio/NAudio/Dsp/BiQuadFilter.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Dsp/Complex.cs | 21 - .../Scripts/Audio/NAudio/Dsp/Complex.cs.meta | 11 - .../Audio/NAudio/Dsp/EnvelopeDetector.cs | 108 - .../Audio/NAudio/Dsp/EnvelopeDetector.cs.meta | 11 - .../Audio/NAudio/Dsp/EnvelopeGenerator.cs | 244 -- .../NAudio/Dsp/EnvelopeGenerator.cs.meta | 11 - .../Audio/NAudio/Dsp/FastFourierTransform.cs | 124 - .../NAudio/Dsp/FastFourierTransform.cs.meta | 11 - .../NAudio/Dsp/ImpulseResponseConvolution.cs | 46 - .../Dsp/ImpulseResponseConvolution.cs.meta | 11 - .../Audio/NAudio/Dsp/SimpleCompressor.cs | 89 - .../Audio/NAudio/Dsp/SimpleCompressor.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Dsp/SimpleGate.cs | 73 - .../Audio/NAudio/Dsp/SimpleGate.cs.meta | 11 - .../Audio/NAudio/Dsp/SmbPitchShifter.cs | 295 -- .../Audio/NAudio/Dsp/SmbPitchShifter.cs.meta | 11 - .../Scripts/Audio/NAudio/Dsp/WdlResampler.cs | 708 ----- .../Audio/NAudio/Dsp/WdlResampler.cs.meta | 11 - Assets/Scripts/Audio/NAudio/FileFormats.meta | 8 - .../Scripts/Audio/NAudio/FileFormats/Map.meta | 8 - .../FileFormats/Map/CakewalkDrumMapping.cs | 54 - .../Map/CakewalkDrumMapping.cs.meta | 11 - .../NAudio/FileFormats/Map/CakewalkMapFile.cs | 167 - .../FileFormats/Map/CakewalkMapFile.cs.meta | 11 - .../NAudio/FileFormats/Map/MapBlockHeader.cs | 34 - .../FileFormats/Map/MapBlockHeader.cs.meta | 11 - .../Scripts/Audio/NAudio/FileFormats/Mp3.meta | 8 - .../NAudio/FileFormats/Mp3/ChannelMode.cs | 30 - .../FileFormats/Mp3/ChannelMode.cs.meta | 11 - .../Mp3/DmoMp3FrameDecompressor.cs | 112 - .../Mp3/DmoMp3FrameDecompressor.cs.meta | 11 - .../FileFormats/Mp3/IMp3FrameDecompressor.cs | 31 - .../Mp3/IMp3FrameDecompressor.cs.meta | 11 - .../Audio/NAudio/FileFormats/Mp3/Id3v2Tag.cs | 238 -- .../NAudio/FileFormats/Mp3/Id3v2Tag.cs.meta | 11 - .../Audio/NAudio/FileFormats/Mp3/Mp3Frame.cs | 280 -- .../NAudio/FileFormats/Mp3/Mp3Frame.cs.meta | 11 - .../FileFormats/Mp3/Mp3FrameDecompressor.cs | 95 - .../Mp3/Mp3FrameDecompressor.cs.meta | 11 - .../Audio/NAudio/FileFormats/Mp3/MpegLayer.cs | 29 - .../NAudio/FileFormats/Mp3/MpegLayer.cs.meta | 11 - .../NAudio/FileFormats/Mp3/MpegVersion.cs | 29 - .../FileFormats/Mp3/MpegVersion.cs.meta | 11 - .../NAudio/FileFormats/Mp3/XingHeader.cs | 188 -- .../NAudio/FileFormats/Mp3/XingHeader.cs.meta | 11 - .../Audio/NAudio/FileFormats/SoundFont.meta | 8 - .../NAudio/FileFormats/SoundFont/Generator.cs | 136 - .../FileFormats/SoundFont/Generator.cs.meta | 11 - .../FileFormats/SoundFont/GeneratorBuilder.cs | 59 - .../SoundFont/GeneratorBuilder.cs.meta | 11 - .../FileFormats/SoundFont/GeneratorEnum.cs | 133 - .../SoundFont/GeneratorEnum.cs.meta | 11 - .../NAudio/FileFormats/SoundFont/InfoChunk.cs | 152 - .../FileFormats/SoundFont/InfoChunk.cs.meta | 11 - .../FileFormats/SoundFont/Instrument.cs | 54 - .../FileFormats/SoundFont/Instrument.cs.meta | 11 - .../SoundFont/InstrumentBuilder.cs | 66 - .../SoundFont/InstrumentBuilder.cs.meta | 11 - .../NAudio/FileFormats/SoundFont/Modulator.cs | 114 - .../FileFormats/SoundFont/Modulator.cs.meta | 11 - .../FileFormats/SoundFont/ModulatorBuilder.cs | 38 - .../SoundFont/ModulatorBuilder.cs.meta | 11 - .../FileFormats/SoundFont/ModulatorType.cs | 101 - .../SoundFont/ModulatorType.cs.meta | 11 - .../NAudio/FileFormats/SoundFont/Preset.cs | 92 - .../FileFormats/SoundFont/Preset.cs.meta | 11 - .../FileFormats/SoundFont/PresetBuilder.cs | 63 - .../SoundFont/PresetBuilder.cs.meta | 11 - .../FileFormats/SoundFont/PresetsChunk.cs | 136 - .../SoundFont/PresetsChunk.cs.meta | 11 - .../NAudio/FileFormats/SoundFont/RiffChunk.cs | 164 - .../FileFormats/SoundFont/RiffChunk.cs.meta | 11 - .../FileFormats/SoundFont/SFSampleLink.cs | 41 - .../SoundFont/SFSampleLink.cs.meta | 11 - .../NAudio/FileFormats/SoundFont/SFVersion.cs | 44 - .../FileFormats/SoundFont/SFVersion.cs.meta | 11 - .../FileFormats/SoundFont/SFVersionBuilder.cs | 43 - .../SoundFont/SFVersionBuilder.cs.meta | 11 - .../FileFormats/SoundFont/SampleDataChunk.cs | 28 - .../SoundFont/SampleDataChunk.cs.meta | 11 - .../FileFormats/SoundFont/SampleHeader.cs | 61 - .../SoundFont/SampleHeader.cs.meta | 11 - .../SoundFont/SampleHeaderBuilder.cs | 54 - .../SoundFont/SampleHeaderBuilder.cs.meta | 11 - .../FileFormats/SoundFont/SampleMode.cs | 27 - .../FileFormats/SoundFont/SampleMode.cs.meta | 11 - .../NAudio/FileFormats/SoundFont/SoundFont.cs | 132 - .../FileFormats/SoundFont/SoundFont.cs.meta | 11 - .../FileFormats/SoundFont/StructureBuilder.cs | 39 - .../SoundFont/StructureBuilder.cs.meta | 11 - .../NAudio/FileFormats/SoundFont/Zone.cs | 57 - .../NAudio/FileFormats/SoundFont/Zone.cs.meta | 11 - .../FileFormats/SoundFont/ZoneBuilder.cs | 59 - .../FileFormats/SoundFont/ZoneBuilder.cs.meta | 11 - .../Scripts/Audio/NAudio/FileFormats/Wav.meta | 8 - .../FileFormats/Wav/WaveFileChunkReader.cs | 165 - .../Wav/WaveFileChunkReader.cs.meta | 11 - .../Scripts/Audio/NAudio/MediaFoundation.meta | 8 - .../NAudio/MediaFoundation/AudioSubtypes.cs | 163 - .../MediaFoundation/AudioSubtypes.cs.meta | 11 - .../NAudio/MediaFoundation/IMFActivate.cs | 183 -- .../MediaFoundation/IMFActivate.cs.meta | 11 - .../NAudio/MediaFoundation/IMFAttributes.cs | 170 - .../MediaFoundation/IMFAttributes.cs.meta | 11 - .../NAudio/MediaFoundation/IMFByteStream.cs | 103 - .../MediaFoundation/IMFByteStream.cs.meta | 11 - .../NAudio/MediaFoundation/IMFCollection.cs | 44 - .../MediaFoundation/IMFCollection.cs.meta | 11 - .../NAudio/MediaFoundation/IMFMediaBuffer.cs | 34 - .../MediaFoundation/IMFMediaBuffer.cs.meta | 11 - .../NAudio/MediaFoundation/IMFMediaEvent.cs | 207 -- .../MediaFoundation/IMFMediaEvent.cs.meta | 11 - .../NAudio/MediaFoundation/IMFMediaType.cs | 196 -- .../MediaFoundation/IMFMediaType.cs.meta | 11 - .../IMFReadWriteClassFactory.cs | 32 - .../IMFReadWriteClassFactory.cs.meta | 11 - .../Audio/NAudio/MediaFoundation/IMFSample.cs | 238 -- .../NAudio/MediaFoundation/IMFSample.cs.meta | 11 - .../NAudio/MediaFoundation/IMFSinkWriter.cs | 59 - .../MediaFoundation/IMFSinkWriter.cs.meta | 11 - .../NAudio/MediaFoundation/IMFSourceReader.cs | 99 - .../MediaFoundation/IMFSourceReader.cs.meta | 11 - .../NAudio/MediaFoundation/IMFTransform.cs | 254 -- .../MediaFoundation/IMFTransform.cs.meta | 11 - .../MediaFoundation/MFT_INPUT_STREAM_INFO.cs | 35 - .../MFT_INPUT_STREAM_INFO.cs.meta | 11 - .../MediaFoundation/MFT_MESSAGE_TYPE.cs | 53 - .../MediaFoundation/MFT_MESSAGE_TYPE.cs.meta | 11 - .../MediaFoundation/MFT_OUTPUT_DATA_BUFFER.cs | 28 - .../MFT_OUTPUT_DATA_BUFFER.cs.meta | 11 - .../MediaFoundation/MFT_OUTPUT_STREAM_INFO.cs | 24 - .../MFT_OUTPUT_STREAM_INFO.cs.meta | 11 - .../MediaFoundation/MFT_REGISTER_TYPE_INFO.cs | 21 - .../MFT_REGISTER_TYPE_INFO.cs.meta | 11 - .../MF_SINK_WRITER_STATISTICS.cs | 79 - .../MF_SINK_WRITER_STATISTICS.cs.meta | 11 - .../NAudio/MediaFoundation/MediaEventType.cs | 437 --- .../MediaFoundation/MediaEventType.cs.meta | 11 - .../MediaFoundationAttributes.cs | 286 -- .../MediaFoundationAttributes.cs.meta | 11 - .../MediaFoundation/MediaFoundationErrors.cs | 2764 ----------------- .../MediaFoundationErrors.cs.meta | 11 - .../MediaFoundation/MediaFoundationHelpers.cs | 174 -- .../MediaFoundationHelpers.cs.meta | 11 - .../MediaFoundation/MediaFoundationInterop.cs | 157 - .../MediaFoundationInterop.cs.meta | 11 - .../MediaFoundationTransform.cs | 287 -- .../MediaFoundationTransform.cs.meta | 11 - .../MediaFoundationTransformCategories.cs | 64 - ...MediaFoundationTransformCategories.cs.meta | 11 - .../Audio/NAudio/MediaFoundation/MediaType.cs | 150 - .../NAudio/MediaFoundation/MediaType.cs.meta | 11 - .../NAudio/MediaFoundation/MediaTypes.cs | 64 - .../NAudio/MediaFoundation/MediaTypes.cs.meta | 11 - .../NAudio/MediaFoundation/_MFT_ENUM_FLAG.cs | 48 - .../MediaFoundation/_MFT_ENUM_FLAG.cs.meta | 11 - .../_MFT_INPUT_STATUS_FLAGS.cs | 20 - .../_MFT_INPUT_STATUS_FLAGS.cs.meta | 11 - .../_MFT_INPUT_STREAM_INFO_FLAGS.cs | 48 - .../_MFT_INPUT_STREAM_INFO_FLAGS.cs.meta | 11 - .../_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs | 33 - .../_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs.meta | 11 - .../_MFT_OUTPUT_STATUS_FLAGS.cs | 20 - .../_MFT_OUTPUT_STATUS_FLAGS.cs.meta | 11 - .../_MFT_OUTPUT_STREAM_INFO_FLAGS.cs | 52 - .../_MFT_OUTPUT_STREAM_INFO_FLAGS.cs.meta | 11 - .../_MFT_PROCESS_OUTPUT_FLAGS.cs | 24 - .../_MFT_PROCESS_OUTPUT_FLAGS.cs.meta | 11 - .../_MFT_PROCESS_OUTPUT_STATUS.cs | 20 - .../_MFT_PROCESS_OUTPUT_STATUS.cs.meta | 11 - .../MediaFoundation/_MFT_SET_TYPE_FLAGS.cs | 20 - .../_MFT_SET_TYPE_FLAGS.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Midi.meta | 8 - .../NAudio/Midi/ChannelAfterTouchEvent.cs | 66 - .../Midi/ChannelAfterTouchEvent.cs.meta | 11 - .../Audio/NAudio/Midi/ControlChangeEvent.cs | 120 - .../NAudio/Midi/ControlChangeEvent.cs.meta | 11 - .../Audio/NAudio/Midi/KeySignatureEvent.cs | 90 - .../NAudio/Midi/KeySignatureEvent.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Midi/MetaEvent.cs | 132 - .../Audio/NAudio/Midi/MetaEvent.cs.meta | 11 - .../Audio/NAudio/Midi/MetaEventType.cs | 47 - .../Audio/NAudio/Midi/MetaEventType.cs.meta | 11 - .../Audio/NAudio/Midi/MidiCommandCode.cs | 39 - .../Audio/NAudio/Midi/MidiCommandCode.cs.meta | 11 - .../Audio/NAudio/Midi/MidiController.cs | 42 - .../Audio/NAudio/Midi/MidiController.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Midi/MidiEvent.cs | 399 --- .../Audio/NAudio/Midi/MidiEvent.cs.meta | 11 - .../Audio/NAudio/Midi/MidiEventCollection.cs | 294 -- .../NAudio/Midi/MidiEventCollection.cs.meta | 11 - .../Audio/NAudio/Midi/MidiEventComparer.cs | 50 - .../NAudio/Midi/MidiEventComparer.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Midi/MidiFile.cs | 294 -- .../Audio/NAudio/Midi/MidiFile.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Midi/MidiIn.cs | 162 - .../Scripts/Audio/NAudio/Midi/MidiIn.cs.meta | 11 - .../Audio/NAudio/Midi/MidiInCapabilities.cs | 71 - .../NAudio/Midi/MidiInCapabilities.cs.meta | 11 - .../NAudio/Midi/MidiInMessageEventArgs.cs | 44 - .../Midi/MidiInMessageEventArgs.cs.meta | 11 - .../Scripts/Audio/NAudio/Midi/MidiInterop.cs | 277 -- .../Audio/NAudio/Midi/MidiInterop.cs.meta | 11 - .../Scripts/Audio/NAudio/Midi/MidiMessage.cs | 116 - .../Audio/NAudio/Midi/MidiMessage.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Midi/MidiOut.cs | 162 - .../Scripts/Audio/NAudio/Midi/MidiOut.cs.meta | 11 - .../Audio/NAudio/Midi/MidiOutCapabilities.cs | 181 -- .../NAudio/Midi/MidiOutCapabilities.cs.meta | 11 - .../Audio/NAudio/Midi/MidiOutTechnology.cs | 26 - .../NAudio/Midi/MidiOutTechnology.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Midi/NoteEvent.cs | 185 -- .../Audio/NAudio/Midi/NoteEvent.cs.meta | 11 - .../Scripts/Audio/NAudio/Midi/NoteOnEvent.cs | 150 - .../Audio/NAudio/Midi/NoteOnEvent.cs.meta | 11 - .../Audio/NAudio/Midi/PatchChangeEvent.cs | 119 - .../NAudio/Midi/PatchChangeEvent.cs.meta | 11 - .../NAudio/Midi/PitchWheelChangeEvent.cs | 99 - .../NAudio/Midi/PitchWheelChangeEvent.cs.meta | 11 - .../Scripts/Audio/NAudio/Midi/RawMetaEvent.cs | 50 - .../Audio/NAudio/Midi/RawMetaEvent.cs.meta | 11 - .../NAudio/Midi/SequencerSpecificEvent.cs | 84 - .../Midi/SequencerSpecificEvent.cs.meta | 11 - .../Audio/NAudio/Midi/SmpteOffsetEvent.cs | 118 - .../NAudio/Midi/SmpteOffsetEvent.cs.meta | 11 - .../Scripts/Audio/NAudio/Midi/SysexEvent.cs | 80 - .../Audio/NAudio/Midi/SysexEvent.cs.meta | 11 - .../Scripts/Audio/NAudio/Midi/TempoEvent.cs | 87 - .../Audio/NAudio/Midi/TempoEvent.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Midi/TextEvent.cs | 96 - .../Audio/NAudio/Midi/TextEvent.cs.meta | 11 - .../Audio/NAudio/Midi/TimeSignatureEvent.cs | 144 - .../NAudio/Midi/TimeSignatureEvent.cs.meta | 11 - .../NAudio/Midi/TrackSequenceNumberEvent.cs | 65 - .../Midi/TrackSequenceNumberEvent.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Mixer.meta | 8 - .../Audio/NAudio/Mixer/BooleanMixerControl.cs | 55 - .../NAudio/Mixer/BooleanMixerControl.cs.meta | 11 - .../Audio/NAudio/Mixer/CustomMixerControl.cs | 32 - .../NAudio/Mixer/CustomMixerControl.cs.meta | 11 - .../NAudio/Mixer/ListTextMixerControl.cs | 34 - .../NAudio/Mixer/ListTextMixerControl.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Mixer/Mixer.cs | 118 - .../Scripts/Audio/NAudio/Mixer/Mixer.cs.meta | 11 - .../Audio/NAudio/Mixer/MixerControl.cs | 377 --- .../Audio/NAudio/Mixer/MixerControl.cs.meta | 11 - .../Audio/NAudio/Mixer/MixerControlType.cs | 111 - .../NAudio/Mixer/MixerControlType.cs.meta | 11 - .../Scripts/Audio/NAudio/Mixer/MixerFlags.cs | 123 - .../Audio/NAudio/Mixer/MixerFlags.cs.meta | 11 - .../Audio/NAudio/Mixer/MixerInterop.cs | 267 -- .../Audio/NAudio/Mixer/MixerInterop.cs.meta | 11 - .../Scripts/Audio/NAudio/Mixer/MixerLine.cs | 288 -- .../Audio/NAudio/Mixer/MixerLine.cs.meta | 11 - .../NAudio/Mixer/MixerLineComponentType.cs | 114 - .../Mixer/MixerLineComponentType.cs.meta | 11 - .../Audio/NAudio/Mixer/SignedMixerControl.cs | 99 - .../NAudio/Mixer/SignedMixerControl.cs.meta | 11 - .../NAudio/Mixer/UnsignedMixerControl.cs | 108 - .../NAudio/Mixer/UnsignedMixerControl.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Properties.meta | 8 - .../Audio/NAudio/Properties/AssemblyInfo.cs | 36 - .../NAudio/Properties/AssemblyInfo.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Utils.meta | 8 - .../Audio/NAudio/Utils/BufferHelpers.cs | 38 - .../Audio/NAudio/Utils/BufferHelpers.cs.meta | 11 - .../Audio/NAudio/Utils/ByteArrayExtensions.cs | 81 - .../NAudio/Utils/ByteArrayExtensions.cs.meta | 11 - .../Audio/NAudio/Utils/ByteEncoding.cs | 86 - .../Audio/NAudio/Utils/ByteEncoding.cs.meta | 11 - .../Audio/NAudio/Utils/ChunkIdentifier.cs | 25 - .../NAudio/Utils/ChunkIdentifier.cs.meta | 11 - .../Audio/NAudio/Utils/CircularBuffer.cs | 157 - .../Audio/NAudio/Utils/CircularBuffer.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Utils/Decibels.cs | 37 - .../Audio/NAudio/Utils/Decibels.cs.meta | 11 - .../NAudio/Utils/FieldDescriptionAttribute.cs | 33 - .../Utils/FieldDescriptionAttribute.cs.meta | 11 - .../NAudio/Utils/FieldDescriptionHelper.cs | 41 - .../Utils/FieldDescriptionHelper.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Utils/HResult.cs | 75 - .../Audio/NAudio/Utils/HResult.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Utils/IEEE.cs | 146 - .../Scripts/Audio/NAudio/Utils/IEEE.cs.meta | 11 - .../Audio/NAudio/Utils/IgnoreDisposeStream.cs | 121 - .../NAudio/Utils/IgnoreDisposeStream.cs.meta | 11 - .../Audio/NAudio/Utils/MarshalHelpers.cs | 35 - .../Audio/NAudio/Utils/MarshalHelpers.cs.meta | 11 - .../Scripts/Audio/NAudio/Utils/MergeSort.cs | 75 - .../Audio/NAudio/Utils/MergeSort.cs.meta | 11 - .../Audio/NAudio/Utils/NativeMethods.cs | 22 - .../Audio/NAudio/Utils/NativeMethods.cs.meta | 11 - .../Audio/NAudio/Utils/ProgressLog.resx | 120 - .../Audio/NAudio/Utils/ProgressLog.resx.meta | 7 - .../NAudio/Utils/WavePositionExtensions.cs | 20 - .../Utils/WavePositionExtensions.cs.meta | 11 - Assets/Scripts/Audio/NAudio/Wave.meta | 8 - .../Audio/NAudio/Wave/Compression.meta | 8 - .../NAudio/Wave/Compression/AcmDriver.cs | 355 --- .../NAudio/Wave/Compression/AcmDriver.cs.meta | 11 - .../Wave/Compression/AcmDriverAddFlags.cs | 31 - .../Compression/AcmDriverAddFlags.cs.meta | 11 - .../Wave/Compression/AcmDriverDetails.cs | 104 - .../Wave/Compression/AcmDriverDetails.cs.meta | 11 - .../AcmDriverDetailsSupportFlags.cs | 26 - .../AcmDriverDetailsSupportFlags.cs.meta | 11 - .../Wave/Compression/AcmDriverEnumFlags.cs | 19 - .../Compression/AcmDriverEnumFlags.cs.meta | 11 - .../NAudio/Wave/Compression/AcmFormat.cs | 73 - .../NAudio/Wave/Compression/AcmFormat.cs.meta | 11 - .../Wave/Compression/AcmFormatChoose.cs | 89 - .../Wave/Compression/AcmFormatChoose.cs.meta | 11 - .../Compression/AcmFormatChooseStyleFlags.cs | 39 - .../AcmFormatChooseStyleFlags.cs.meta | 11 - .../Wave/Compression/AcmFormatDetails.cs | 50 - .../Wave/Compression/AcmFormatDetails.cs.meta | 11 - .../Wave/Compression/AcmFormatEnumFlags.cs | 63 - .../Compression/AcmFormatEnumFlags.cs.meta | 11 - .../Wave/Compression/AcmFormatSuggestFlags.cs | 31 - .../Compression/AcmFormatSuggestFlags.cs.meta | 11 - .../NAudio/Wave/Compression/AcmFormatTag.cs | 69 - .../Wave/Compression/AcmFormatTag.cs.meta | 11 - .../Wave/Compression/AcmFormatTagDetails.cs | 49 - .../Compression/AcmFormatTagDetails.cs.meta | 11 - .../NAudio/Wave/Compression/AcmInterop.cs | 187 -- .../Wave/Compression/AcmInterop.cs.meta | 11 - .../NAudio/Wave/Compression/AcmMetrics.cs | 44 - .../Wave/Compression/AcmMetrics.cs.meta | 11 - .../NAudio/Wave/Compression/AcmStream.cs | 237 -- .../NAudio/Wave/Compression/AcmStream.cs.meta | 11 - .../Wave/Compression/AcmStreamConvertFlags.cs | 23 - .../Compression/AcmStreamConvertFlags.cs.meta | 11 - .../Wave/Compression/AcmStreamHeader.cs | 128 - .../Wave/Compression/AcmStreamHeader.cs.meta | 11 - .../Compression/AcmStreamHeaderStatusFlags.cs | 23 - .../AcmStreamHeaderStatusFlags.cs.meta | 11 - .../Wave/Compression/AcmStreamHeaderStruct.cs | 41 - .../Compression/AcmStreamHeaderStruct.cs.meta | 11 - .../Wave/Compression/AcmStreamOpenFlags.cs | 51 - .../Compression/AcmStreamOpenFlags.cs.meta | 11 - .../Wave/Compression/AcmStreamSizeFlags.cs | 18 - .../Compression/AcmStreamSizeFlags.cs.meta | 11 - .../NAudio/Wave/Compression/WaveFilter.cs | 30 - .../Wave/Compression/WaveFilter.cs.meta | 11 - .../Scripts/Audio/NAudio/Wave/MmeInterop.meta | 8 - .../NAudio/Wave/MmeInterop/Manufacturers.cs | 376 --- .../Wave/MmeInterop/Manufacturers.cs.meta | 11 - .../NAudio/Wave/MmeInterop/MmException.cs | 53 - .../Wave/MmeInterop/MmException.cs.meta | 11 - .../Audio/NAudio/Wave/MmeInterop/MmResult.cs | 85 - .../NAudio/Wave/MmeInterop/MmResult.cs.meta | 11 - .../Audio/NAudio/Wave/MmeInterop/MmTime.cs | 45 - .../NAudio/Wave/MmeInterop/MmTime.cs.meta | 11 - .../Wave/MmeInterop/WaveCallbackInfo.cs | 96 - .../Wave/MmeInterop/WaveCallbackInfo.cs.meta | 11 - .../Wave/MmeInterop/WaveCallbackStrategy.cs | 29 - .../MmeInterop/WaveCallbackStrategy.cs.meta | 11 - .../NAudio/Wave/MmeInterop/WaveHeader.cs | 30 - .../NAudio/Wave/MmeInterop/WaveHeader.cs.meta | 11 - .../NAudio/Wave/MmeInterop/WaveHeaderFlags.cs | 39 - .../Wave/MmeInterop/WaveHeaderFlags.cs.meta | 11 - .../Wave/MmeInterop/WaveInCapabilities.cs | 106 - .../MmeInterop/WaveInCapabilities.cs.meta | 11 - .../NAudio/Wave/MmeInterop/WaveInEventArgs.cs | 41 - .../Wave/MmeInterop/WaveInEventArgs.cs.meta | 11 - .../NAudio/Wave/MmeInterop/WaveInterop.cs | 164 - .../Wave/MmeInterop/WaveInterop.cs.meta | 11 - .../Wave/MmeInterop/WaveOutCapabilities.cs | 217 -- .../MmeInterop/WaveOutCapabilities.cs.meta | 11 - .../NAudio/Wave/MmeInterop/WaveOutSupport.cs | 24 - .../Wave/MmeInterop/WaveOutSupport.cs.meta | 11 - .../NAudio/Wave/SampleChunkConverters.meta | 8 - .../ISampleChunkConverter.cs | 18 - .../ISampleChunkConverter.cs.meta | 11 - .../Mono16SampleChunkConverter.cs | 47 - .../Mono16SampleChunkConverter.cs.meta | 11 - .../Mono24SampleChunkConverter.cs | 46 - .../Mono24SampleChunkConverter.cs.meta | 11 - .../Mono8SampleChunkConverter.cs | 46 - .../Mono8SampleChunkConverter.cs.meta | 11 - .../MonoFloatSampleChunkConverter.cs | 46 - .../MonoFloatSampleChunkConverter.cs.meta | 11 - .../Stereo16SampleChunkConverter.cs | 47 - .../Stereo16SampleChunkConverter.cs.meta | 11 - .../Stereo24SampleChunkConverter.cs | 49 - .../Stereo24SampleChunkConverter.cs.meta | 11 - .../Stereo8SampleChunkConverter.cs | 45 - .../Stereo8SampleChunkConverter.cs.meta | 11 - .../StereoFloatSampleChunkConverter.cs | 46 - .../StereoFloatSampleChunkConverter.cs.meta | 11 - .../Audio/NAudio/Wave/SampleProviders.meta | 8 - .../SampleProviders/AdsrSampleProvider.cs | 91 - .../AdsrSampleProvider.cs.meta | 11 - .../ConcatenatingSampleProvider.cs | 49 - .../ConcatenatingSampleProvider.cs.meta | 11 - .../FadeInOutSampleProvider.cs | 146 - .../FadeInOutSampleProvider.cs.meta | 11 - .../SampleProviders/MeteringSampleProvider.cs | 102 - .../MeteringSampleProvider.cs.meta | 11 - .../SampleProviders/MixingSampleProvider.cs | 206 -- .../MixingSampleProvider.cs.meta | 11 - .../MonoToStereoSampleProvider.cs | 74 - .../MonoToStereoSampleProvider.cs.meta | 11 - .../MultiplexingSampleProvider.cs | 162 - .../MultiplexingSampleProvider.cs.meta | 11 - .../NotifyingSampleProvider.cs | 57 - .../NotifyingSampleProvider.cs.meta | 11 - .../SampleProviders/OffsetSampleProvider.cs | 255 -- .../OffsetSampleProvider.cs.meta | 11 - .../SampleProviders/PanningSampleProvider.cs | 217 -- .../PanningSampleProvider.cs.meta | 11 - .../Pcm16BitToSampleProvider.cs | 40 - .../Pcm16BitToSampleProvider.cs.meta | 11 - .../Pcm24BitToSampleProvider.cs | 41 - .../Pcm24BitToSampleProvider.cs.meta | 11 - .../Pcm32BitToSampleProvider.cs | 42 - .../Pcm32BitToSampleProvider.cs.meta | 11 - .../Pcm8BitToSampleProvider.cs | 40 - .../Pcm8BitToSampleProvider.cs.meta | 11 - .../SMBPitchShiftingSampleProvider.cs | 151 - .../SMBPitchShiftingSampleProvider.cs.meta | 11 - .../Wave/SampleProviders/SampleChannel.cs | 83 - .../SampleProviders/SampleChannel.cs.meta | 11 - .../SampleProviderConverterBase.cs | 55 - .../SampleProviderConverterBase.cs.meta | 11 - .../SampleProviderConverters.cs | 57 - .../SampleProviderConverters.cs.meta | 11 - .../SampleProviders/SampleToWaveProvider.cs | 42 - .../SampleToWaveProvider.cs.meta | 11 - .../SampleProviders/SampleToWaveProvider16.cs | 78 - .../SampleToWaveProvider16.cs.meta | 11 - .../SampleProviders/SampleToWaveProvider24.cs | 85 - .../SampleToWaveProvider24.cs.meta | 11 - .../Wave/SampleProviders/SignalGenerator.cs | 282 -- .../SampleProviders/SignalGenerator.cs.meta | 11 - .../StereoToMonoSampleProvider.cs | 65 - .../StereoToMonoSampleProvider.cs.meta | 11 - .../SampleProviders/VolumeSampleProvider.cs | 60 - .../VolumeSampleProvider.cs.meta | 11 - .../SampleProviders/WaveToSampleProvider.cs | 41 - .../WaveToSampleProvider.cs.meta | 11 - .../SampleProviders/WaveToSampleProvider64.cs | 42 - .../WaveToSampleProvider64.cs.meta | 11 - .../WdlResamplingSampleProvider.cs | 57 - .../WdlResamplingSampleProvider.cs.meta | 11 - .../Audio/NAudio/Wave/WaveExtensionMethods.cs | 137 - .../NAudio/Wave/WaveExtensionMethods.cs.meta | 11 - .../Audio/NAudio/Wave/WaveFormats.meta | 8 - .../Wave/WaveFormats/AdpcmWaveFormat.cs | 107 - .../Wave/WaveFormats/AdpcmWaveFormat.cs.meta | 11 - .../Wave/WaveFormats/Gsm610WaveFormat.cs | 47 - .../Wave/WaveFormats/Gsm610WaveFormat.cs.meta | 11 - .../Wave/WaveFormats/ImaAdpcmWaveFormat.cs | 42 - .../WaveFormats/ImaAdpcmWaveFormat.cs.meta | 11 - .../NAudio/Wave/WaveFormats/Mp3WaveFormat.cs | 88 - .../Wave/WaveFormats/Mp3WaveFormat.cs.meta | 11 - .../NAudio/Wave/WaveFormats/OggWaveFormat.cs | 14 - .../Wave/WaveFormats/OggWaveFormat.cs.meta | 11 - .../Wave/WaveFormats/TrueSpeechWaveFormat.cs | 48 - .../WaveFormats/TrueSpeechWaveFormat.cs.meta | 11 - .../NAudio/Wave/WaveFormats/WaveFormat.cs | 345 -- .../Wave/WaveFormats/WaveFormat.cs.meta | 11 - .../WaveFormats/WaveFormatCustomMarshaler.cs | 69 - .../WaveFormatCustomMarshaler.cs.meta | 11 - .../Wave/WaveFormats/WaveFormatEncoding.cs | 434 --- .../WaveFormats/WaveFormatEncoding.cs.meta | 11 - .../Wave/WaveFormats/WaveFormatExtensible.cs | 100 - .../WaveFormats/WaveFormatExtensible.cs.meta | 11 - .../Wave/WaveFormats/WaveFormatExtraData.cs | 59 - .../WaveFormats/WaveFormatExtraData.cs.meta | 11 - .../NAudio/Wave/WaveFormats/WmaWaveFormat.cs | 35 - .../Wave/WaveFormats/WmaWaveFormat.cs.meta | 11 - .../Scripts/Audio/NAudio/Wave/WaveInputs.meta | 8 - .../Audio/NAudio/Wave/WaveInputs/IWaveIn.cs | 36 - .../NAudio/Wave/WaveInputs/IWaveIn.cs.meta | 11 - .../NAudio/Wave/WaveInputs/WasapiCapture.cs | 362 --- .../Wave/WaveInputs/WasapiCapture.cs.meta | 11 - .../Wave/WaveInputs/WasapiLoopbackCapture.cs | 57 - .../WaveInputs/WasapiLoopbackCapture.cs.meta | 11 - .../Audio/NAudio/Wave/WaveInputs/WaveIn.cs | 303 -- .../NAudio/Wave/WaveInputs/WaveIn.cs.meta | 11 - .../NAudio/Wave/WaveInputs/WaveInEvent.cs | 256 -- .../Wave/WaveInputs/WaveInEvent.cs.meta | 11 - .../Audio/NAudio/Wave/WaveOutputs.meta | 8 - .../NAudio/Wave/WaveOutputs/AiffFileWriter.cs | 376 --- .../Wave/WaveOutputs/AiffFileWriter.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/BextChunkInfo.cs | 67 - .../Wave/WaveOutputs/BextChunkInfo.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/BwfWriter.cs | 150 - .../NAudio/Wave/WaveOutputs/BwfWriter.cs.meta | 11 - .../Wave/WaveOutputs/CueWaveFileWriter.cs | 67 - .../WaveOutputs/CueWaveFileWriter.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/DirectSoundOut.cs | 928 ------ .../Wave/WaveOutputs/DirectSoundOut.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/IWaveBuffer.cs | 70 - .../Wave/WaveOutputs/IWaveBuffer.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/IWavePlayer.cs | 67 - .../Wave/WaveOutputs/IWavePlayer.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/IWaveProvider.cs | 25 - .../Wave/WaveOutputs/IWaveProvider.cs.meta | 11 - .../Wave/WaveOutputs/IWaveProviderFloat.cs | 28 - .../WaveOutputs/IWaveProviderFloat.cs.meta | 11 - .../WaveOutputs/MediaFoundationEncoder.cs | 306 -- .../MediaFoundationEncoder.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/PlaybackState.cs | 25 - .../Wave/WaveOutputs/PlaybackState.cs.meta | 11 - .../Wave/WaveOutputs/StoppedEventArgs.cs | 28 - .../Wave/WaveOutputs/StoppedEventArgs.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/WasapiOut.cs | 466 --- .../NAudio/Wave/WaveOutputs/WasapiOut.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/WaveBuffer.cs | 242 -- .../Wave/WaveOutputs/WaveBuffer.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/WaveFileWriter.cs | 443 --- .../Wave/WaveOutputs/WaveFileWriter.cs.meta | 11 - .../Audio/NAudio/Wave/WaveOutputs/WaveOut.cs | 425 --- .../NAudio/Wave/WaveOutputs/WaveOut.cs.meta | 11 - .../NAudio/Wave/WaveOutputs/WaveOutEvent.cs | 379 --- .../Wave/WaveOutputs/WaveOutEvent.cs.meta | 11 - .../Audio/NAudio/Wave/WaveProviders.meta | 8 - .../WaveProviders/BufferedWaveProvider.cs | 136 - .../BufferedWaveProvider.cs.meta | 11 - .../WaveProviders/MediaFoundationResampler.cs | 177 -- .../MediaFoundationResampler.cs.meta | 11 - .../WaveProviders/MixingWaveProvider32.cs | 154 - .../MixingWaveProvider32.cs.meta | 11 - .../WaveProviders/MonoToStereoProvider16.cs | 75 - .../MonoToStereoProvider16.cs.meta | 11 - .../WaveProviders/MultiplexingWaveProvider.cs | 185 -- .../MultiplexingWaveProvider.cs.meta | 11 - .../Wave/WaveProviders/SilenceWaveProvider.cs | 33 - .../WaveProviders/SilenceWaveProvider.cs.meta | 11 - .../WaveProviders/StereoToMonoProvider16.cs | 81 - .../StereoToMonoProvider16.cs.meta | 11 - .../WaveProviders/VolumeWaveProvider16.cs | 86 - .../VolumeWaveProvider16.cs.meta | 11 - .../WaveProviders/Wave16toFloatProvider.cs | 78 - .../Wave16toFloatProvider.cs.meta | 11 - .../WaveProviders/WaveFloatTo16Provider.cs | 85 - .../WaveFloatTo16Provider.cs.meta | 11 - .../Wave/WaveProviders/WaveInProvider.cs | 49 - .../Wave/WaveProviders/WaveInProvider.cs.meta | 11 - .../Wave/WaveProviders/WaveProvider16.cs | 67 - .../Wave/WaveProviders/WaveProvider16.cs.meta | 11 - .../Wave/WaveProviders/WaveProvider32.cs | 69 - .../Wave/WaveProviders/WaveProvider32.cs.meta | 11 - .../NAudio/Wave/WaveProviders/WaveRecorder.cs | 57 - .../Wave/WaveProviders/WaveRecorder.cs.meta | 11 - .../Audio/NAudio/Wave/WaveStreams.meta | 8 - .../NAudio/Wave/WaveStreams/AiffFileReader.cs | 324 -- .../Wave/WaveStreams/AiffFileReader.cs.meta | 11 - .../Wave/WaveStreams/AudioFileReader.cs | 165 - .../Wave/WaveStreams/AudioFileReader.cs.meta | 11 - .../WaveStreams/BlockAlignReductionStream.cs | 173 -- .../BlockAlignReductionStream.cs.meta | 11 - .../NAudio/Wave/WaveStreams/ComStream.cs | 163 - .../NAudio/Wave/WaveStreams/ComStream.cs.meta | 11 - .../Audio/NAudio/Wave/WaveStreams/CueList.cs | 282 -- .../NAudio/Wave/WaveStreams/CueList.cs.meta | 11 - .../Wave/WaveStreams/CueWaveFileReader.cs | 37 - .../WaveStreams/CueWaveFileReader.cs.meta | 11 - .../Wave/WaveStreams/ISampleNotifier.cs | 40 - .../Wave/WaveStreams/ISampleNotifier.cs.meta | 11 - .../Wave/WaveStreams/MediaFoundationReader.cs | 392 --- .../WaveStreams/MediaFoundationReader.cs.meta | 11 - .../NAudio/Wave/WaveStreams/Mp3FileReader.cs | 486 --- .../Wave/WaveStreams/Mp3FileReader.cs.meta | 11 - .../Wave/WaveStreams/RawSourceWaveStream.cs | 81 - .../WaveStreams/RawSourceWaveStream.cs.meta | 11 - .../Wave/WaveStreams/ResamplerDmoStream.cs | 195 -- .../WaveStreams/ResamplerDmoStream.cs.meta | 11 - .../NAudio/Wave/WaveStreams/RiffChunk.cs | 42 - .../NAudio/Wave/WaveStreams/RiffChunk.cs.meta | 11 - .../WaveStreams/SimpleCompressorStream.cs | 292 -- .../SimpleCompressorStream.cs.meta | 11 - .../StreamMediaFoundationReader.cs | 42 - .../StreamMediaFoundationReader.cs.meta | 11 - .../Wave/WaveStreams/Wave32To16Stream.cs | 180 -- .../Wave/WaveStreams/Wave32To16Stream.cs.meta | 11 - .../NAudio/Wave/WaveStreams/WaveChannel32.cs | 269 -- .../Wave/WaveStreams/WaveChannel32.cs.meta | 11 - .../NAudio/Wave/WaveStreams/WaveFileReader.cs | 257 -- .../Wave/WaveStreams/WaveFileReader.cs.meta | 11 - .../WaveFormatConversionProvider.cs | 173 -- .../WaveFormatConversionProvider.cs.meta | 11 - .../WaveStreams/WaveFormatConversionStream.cs | 177 -- .../WaveFormatConversionStream.cs.meta | 11 - .../NAudio/Wave/WaveStreams/WaveInBuffer.cs | 158 - .../Wave/WaveStreams/WaveInBuffer.cs.meta | 11 - .../Wave/WaveStreams/WaveMixerStream32.cs | 248 -- .../WaveStreams/WaveMixerStream32.cs.meta | 11 - .../Wave/WaveStreams/WaveOffsetStream.cs | 234 -- .../Wave/WaveStreams/WaveOffsetStream.cs.meta | 11 - .../NAudio/Wave/WaveStreams/WaveOutBuffer.cs | 151 - .../Wave/WaveStreams/WaveOutBuffer.cs.meta | 11 - .../NAudio/Wave/WaveStreams/WaveStream.cs | 133 - .../Wave/WaveStreams/WaveStream.cs.meta | 11 - Assets/Scripts/Audio/NAudio/obj.meta | 8 - Assets/Scripts/Audio/NAudio/obj/Debug.meta | 8 - ...gnTimeResolveAssemblyReferencesInput.cache | Bin 6759 -> 0 bytes ...eResolveAssemblyReferencesInput.cache.meta | 7 - .../NAudio.csproj.AssemblyReference.cache | Bin 11 -> 0 bytes ...NAudio.csproj.AssemblyReference.cache.meta | 7 - .../Audio/NAudio/obj/Debug/TempPE.meta | 8 - Assets/Scripts/umamusume.asmdef | 2 +- ProjectSettings/ProjectSettings.asset | 4 +- ProjectSettings/QualitySettings.asset | 22 +- ProjectSettings/SceneTemplateSettings.json | 167 + 819 files changed, 217 insertions(+), 50153 deletions(-) create mode 100644 Assets/Plugins/NAudio.dll create mode 100644 Assets/Plugins/NAudio.dll.meta delete mode 100644 Assets/Scripts/Audio/NAudio.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs/ALawDecoder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs/ALawDecoder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs/ALawEncoder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs/ALawEncoder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs/G722Codec.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs/G722Codec.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs/MuLawDecoder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs/MuLawDecoder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs/MuLawEncoder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Codecs/MuLawEncoder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioCaptureClient.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioCaptureClient.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClient.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClient.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientBufferFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientBufferFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientProperties.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientProperties.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientShareMode.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientShareMode.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamOptions.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamOptions.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClockClient.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClockClient.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolume.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolume.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeCallback.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeCallback.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannel.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannel.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannels.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannels.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeNotificationDelegate.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeNotificationDelegate.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeStepInformation.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeStepInformation.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeVolumeRange.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeVolumeRange.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformation.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformation.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformationChannels.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformationChannels.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioRenderClient.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioRenderClient.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionControl.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionControl.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionEventsCallback.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionEventsCallback.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionManager.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionManager.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionNotification.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionNotification.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamCategory.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamCategory.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamVolume.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamVolume.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioVolumeNotificationData.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioVolumeNotificationData.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/DataFlow.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/DataFlow.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/DeviceState.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/DeviceState.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/EEndpointHardwareSupport.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/EEndpointHardwareSupport.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/AudioVolumeNotificationDataStruct.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/AudioVolumeNotificationDataStruct.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/Blob.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/Blob.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ClsCtx.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ClsCtx.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ErrorCodes.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ErrorCodes.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioCaptureClient.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioCaptureClient.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClient.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClient.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClock2.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClock2.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolume.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolume.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolumeCallback.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolumeCallback.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioMeterInformation.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioMeterInformation.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioRenderClient.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioRenderClient.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionControl.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionControl.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEnumerator.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEnumerator.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEvents.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEvents.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEventsHandler.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEventsHandler.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionManager.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionManager.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionNotification.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionNotification.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioStreamVolume.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioStreamVolume.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDevice.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDevice.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceCollection.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceCollection.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceEnumerator.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceEnumerator.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMEndpoint.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMEndpoint.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMNotificationClient.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMNotificationClient.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IPropertyStore.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IPropertyStore.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ISimpleAudioVolume.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ISimpleAudioVolume.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/MMDeviceEnumeratorComObject.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/MMDeviceEnumeratorComObject.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/StorageAccessMode.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/StorageAccessMode.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDevice.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDevice.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceCollection.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceCollection.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceEnumerator.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceEnumerator.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariant.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariant.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariantNative.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariantNative.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKey.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKey.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKeys.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKeys.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStore.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStore.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStoreProperty.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStoreProperty.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Role.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/Role.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/SessionCollection.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/SessionCollection.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/SimpleAudioVolume.cs delete mode 100644 Assets/Scripts/Audio/NAudio/CoreAudioApi/SimpleAudioVolume.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/AudioMediaSubtypes.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/AudioMediaSubtypes.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoDescriptor.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoDescriptor.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoEnumFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoEnumFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoEnumerator.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoEnumerator.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoGuids.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoGuids.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoHResults.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoHResults.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoInputDataBufferFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoInputDataBufferFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoInputStatusFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoInputStatusFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoInterop.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoInterop.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoMediaType.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoMediaType.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBuffer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBuffer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBufferFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBufferFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoPartialMediaType.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoPartialMediaType.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoProcessOutputFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoProcessOutputFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoSetTypeFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/DmoSetTypeFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/IEnumDmo.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/IEnumDmo.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/IMediaBuffer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/IMediaBuffer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/IMediaObject.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/IMediaObject.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/IMediaParamInfo.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/IMediaParamInfo.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/IWMResamplerProps.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/IWMResamplerProps.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/InputStreamInfoFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/InputStreamInfoFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/MediaBuffer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/MediaBuffer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/MediaObject.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/MediaObject.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/MediaObjectSizeInfo.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/MediaObjectSizeInfo.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/MediaParamInfo.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/MediaParamInfo.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/MediaTypes.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/MediaTypes.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/OutputStreamInfoFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/OutputStreamInfoFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/ResamplerMediaObject.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/ResamplerMediaObject.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/WindowsMediaMp3Decoder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dmo/WindowsMediaMp3Decoder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/BiQuadFilter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/BiQuadFilter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/Complex.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/Complex.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/EnvelopeDetector.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/EnvelopeDetector.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/EnvelopeGenerator.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/EnvelopeGenerator.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/FastFourierTransform.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/FastFourierTransform.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/ImpulseResponseConvolution.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/ImpulseResponseConvolution.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/SimpleCompressor.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/SimpleCompressor.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/SimpleGate.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/SimpleGate.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/SmbPitchShifter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/SmbPitchShifter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/WdlResampler.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Dsp/WdlResampler.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Map.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkDrumMapping.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkDrumMapping.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkMapFile.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkMapFile.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Map/MapBlockHeader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Map/MapBlockHeader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/ChannelMode.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/ChannelMode.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/DmoMp3FrameDecompressor.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/DmoMp3FrameDecompressor.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/IMp3FrameDecompressor.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/IMp3FrameDecompressor.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Id3v2Tag.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Id3v2Tag.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3Frame.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3Frame.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3FrameDecompressor.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3FrameDecompressor.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegLayer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegLayer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegVersion.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegVersion.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/XingHeader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Mp3/XingHeader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Generator.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Generator.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorBuilder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorBuilder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorEnum.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorEnum.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InfoChunk.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InfoChunk.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Instrument.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Instrument.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InstrumentBuilder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InstrumentBuilder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Modulator.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Modulator.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorBuilder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorBuilder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorType.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorType.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Preset.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Preset.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetBuilder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetBuilder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetsChunk.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetsChunk.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/RiffChunk.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/RiffChunk.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFSampleLink.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFSampleLink.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersion.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersion.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersionBuilder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersionBuilder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleDataChunk.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleDataChunk.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeaderBuilder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeaderBuilder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleMode.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleMode.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SoundFont.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SoundFont.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/StructureBuilder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/StructureBuilder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Zone.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Zone.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ZoneBuilder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ZoneBuilder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Wav.meta delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Wav/WaveFileChunkReader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/FileFormats/Wav/WaveFileChunkReader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/AudioSubtypes.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/AudioSubtypes.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFActivate.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFActivate.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFAttributes.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFAttributes.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFByteStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFByteStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFCollection.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFCollection.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaBuffer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaBuffer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaType.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaType.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFReadWriteClassFactory.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFReadWriteClassFactory.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSample.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSample.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSinkWriter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSinkWriter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSourceReader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSourceReader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFTransform.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/IMFTransform.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_INPUT_STREAM_INFO.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_INPUT_STREAM_INFO.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_MESSAGE_TYPE.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_MESSAGE_TYPE.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_DATA_BUFFER.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_DATA_BUFFER.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_STREAM_INFO.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_STREAM_INFO.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_REGISTER_TYPE_INFO.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_REGISTER_TYPE_INFO.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MF_SINK_WRITER_STATISTICS.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MF_SINK_WRITER_STATISTICS.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaEventType.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaEventType.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationAttributes.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationAttributes.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationErrors.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationErrors.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationHelpers.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationHelpers.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationInterop.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationInterop.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransform.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransform.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransformCategories.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransformCategories.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaType.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaType.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaTypes.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/MediaTypes.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_ENUM_FLAG.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_ENUM_FLAG.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STATUS_FLAGS.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STATUS_FLAGS.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STREAM_INFO_FLAGS.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STREAM_INFO_FLAGS.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STATUS_FLAGS.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STATUS_FLAGS.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STREAM_INFO_FLAGS.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STREAM_INFO_FLAGS.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_FLAGS.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_FLAGS.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_STATUS.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_STATUS.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_SET_TYPE_FLAGS.cs delete mode 100644 Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_SET_TYPE_FLAGS.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/ChannelAfterTouchEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/ChannelAfterTouchEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/ControlChangeEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/ControlChangeEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/KeySignatureEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/KeySignatureEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MetaEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MetaEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MetaEventType.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MetaEventType.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiCommandCode.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiCommandCode.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiController.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiController.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiEventCollection.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiEventCollection.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiEventComparer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiEventComparer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiFile.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiFile.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiIn.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiIn.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiInCapabilities.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiInCapabilities.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiInMessageEventArgs.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiInMessageEventArgs.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiInterop.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiInterop.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiMessage.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiMessage.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiOut.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiOut.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiOutCapabilities.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiOutCapabilities.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiOutTechnology.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/MidiOutTechnology.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/NoteEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/NoteEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/NoteOnEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/NoteOnEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/PatchChangeEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/PatchChangeEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/PitchWheelChangeEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/PitchWheelChangeEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/RawMetaEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/RawMetaEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/SequencerSpecificEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/SequencerSpecificEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/SmpteOffsetEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/SmpteOffsetEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/SysexEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/SysexEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/TempoEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/TempoEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/TextEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/TextEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/TimeSignatureEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/TimeSignatureEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/TrackSequenceNumberEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Midi/TrackSequenceNumberEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/BooleanMixerControl.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/BooleanMixerControl.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/CustomMixerControl.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/CustomMixerControl.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/ListTextMixerControl.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/ListTextMixerControl.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/Mixer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/Mixer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerControl.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerControl.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerControlType.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerControlType.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerInterop.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerInterop.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerLine.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerLine.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerLineComponentType.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/MixerLineComponentType.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/SignedMixerControl.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/SignedMixerControl.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/UnsignedMixerControl.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Mixer/UnsignedMixerControl.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Properties.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Properties/AssemblyInfo.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Properties/AssemblyInfo.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/BufferHelpers.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/BufferHelpers.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/ByteArrayExtensions.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/ByteArrayExtensions.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/ByteEncoding.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/ByteEncoding.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/ChunkIdentifier.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/ChunkIdentifier.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/CircularBuffer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/CircularBuffer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/Decibels.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/Decibels.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionAttribute.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionAttribute.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionHelper.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionHelper.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/HResult.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/HResult.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/IEEE.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/IEEE.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/IgnoreDisposeStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/IgnoreDisposeStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/MarshalHelpers.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/MarshalHelpers.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/MergeSort.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/MergeSort.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/NativeMethods.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/NativeMethods.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/ProgressLog.resx delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/ProgressLog.resx.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/WavePositionExtensions.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Utils/WavePositionExtensions.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriver.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriver.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverAddFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverAddFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetails.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetails.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetailsSupportFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetailsSupportFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverEnumFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverEnumFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormat.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormat.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChoose.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChoose.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChooseStyleFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChooseStyleFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatDetails.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatDetails.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatEnumFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatEnumFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatSuggestFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatSuggestFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTag.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTag.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTagDetails.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTagDetails.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmInterop.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmInterop.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmMetrics.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmMetrics.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamConvertFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamConvertFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStatusFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStatusFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStruct.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStruct.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamOpenFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamOpenFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamSizeFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamSizeFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/WaveFilter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/Compression/WaveFilter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/Manufacturers.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/Manufacturers.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmException.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmException.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmResult.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmResult.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmTime.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmTime.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackInfo.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackInfo.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackStrategy.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackStrategy.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeaderFlags.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeaderFlags.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInCapabilities.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInCapabilities.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInEventArgs.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInEventArgs.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInterop.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInterop.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutCapabilities.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutCapabilities.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutSupport.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutSupport.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/ISampleChunkConverter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/ISampleChunkConverter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono16SampleChunkConverter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono16SampleChunkConverter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono24SampleChunkConverter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono24SampleChunkConverter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono8SampleChunkConverter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono8SampleChunkConverter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/MonoFloatSampleChunkConverter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/MonoFloatSampleChunkConverter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo16SampleChunkConverter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo16SampleChunkConverter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo24SampleChunkConverter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo24SampleChunkConverter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo8SampleChunkConverter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo8SampleChunkConverter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/StereoFloatSampleChunkConverter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/StereoFloatSampleChunkConverter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/AdsrSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/AdsrSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/ConcatenatingSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/ConcatenatingSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/FadeInOutSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/FadeInOutSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MeteringSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MeteringSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MixingSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MixingSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MonoToStereoSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MonoToStereoSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MultiplexingSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MultiplexingSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/NotifyingSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/NotifyingSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/OffsetSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/OffsetSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/PanningSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/PanningSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm16BitToSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm16BitToSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm24BitToSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm24BitToSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm32BitToSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm32BitToSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm8BitToSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm8BitToSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SMBPitchShiftingSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SMBPitchShiftingSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleChannel.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleChannel.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverterBase.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverterBase.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverters.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverters.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider16.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider16.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider24.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider24.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SignalGenerator.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SignalGenerator.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/StereoToMonoSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/StereoToMonoSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/VolumeSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/VolumeSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider64.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider64.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WdlResamplingSampleProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WdlResamplingSampleProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveExtensionMethods.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveExtensionMethods.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/AdpcmWaveFormat.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/AdpcmWaveFormat.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Gsm610WaveFormat.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Gsm610WaveFormat.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/ImaAdpcmWaveFormat.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/ImaAdpcmWaveFormat.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Mp3WaveFormat.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Mp3WaveFormat.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/OggWaveFormat.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/OggWaveFormat.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/TrueSpeechWaveFormat.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/TrueSpeechWaveFormat.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormat.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormat.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatCustomMarshaler.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatCustomMarshaler.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatEncoding.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatEncoding.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtensible.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtensible.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtraData.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtraData.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WmaWaveFormat.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WmaWaveFormat.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs/IWaveIn.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs/IWaveIn.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiCapture.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiCapture.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiLoopbackCapture.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiLoopbackCapture.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveIn.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveIn.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveInEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveInEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/AiffFileWriter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/AiffFileWriter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BextChunkInfo.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BextChunkInfo.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BwfWriter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BwfWriter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/CueWaveFileWriter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/CueWaveFileWriter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/DirectSoundOut.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/DirectSoundOut.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveBuffer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveBuffer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWavePlayer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWavePlayer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProviderFloat.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProviderFloat.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/MediaFoundationEncoder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/MediaFoundationEncoder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/PlaybackState.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/PlaybackState.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/StoppedEventArgs.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/StoppedEventArgs.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WasapiOut.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WasapiOut.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveBuffer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveBuffer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveFileWriter.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveFileWriter.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOut.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOut.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOutEvent.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOutEvent.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/BufferedWaveProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/BufferedWaveProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MediaFoundationResampler.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MediaFoundationResampler.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MixingWaveProvider32.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MixingWaveProvider32.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MonoToStereoProvider16.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MonoToStereoProvider16.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MultiplexingWaveProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MultiplexingWaveProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/SilenceWaveProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/SilenceWaveProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/StereoToMonoProvider16.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/StereoToMonoProvider16.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/VolumeWaveProvider16.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/VolumeWaveProvider16.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/Wave16toFloatProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/Wave16toFloatProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveFloatTo16Provider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveFloatTo16Provider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveInProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveInProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider16.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider16.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider32.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider32.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveRecorder.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveRecorder.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AiffFileReader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AiffFileReader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AudioFileReader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AudioFileReader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/BlockAlignReductionStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/BlockAlignReductionStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ComStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ComStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueList.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueList.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueWaveFileReader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueWaveFileReader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ISampleNotifier.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ISampleNotifier.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/MediaFoundationReader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/MediaFoundationReader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Mp3FileReader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Mp3FileReader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RawSourceWaveStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RawSourceWaveStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ResamplerDmoStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ResamplerDmoStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RiffChunk.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RiffChunk.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/SimpleCompressorStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/SimpleCompressorStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/StreamMediaFoundationReader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/StreamMediaFoundationReader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Wave32To16Stream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Wave32To16Stream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveChannel32.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveChannel32.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFileReader.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFileReader.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionProvider.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionProvider.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveInBuffer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveInBuffer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveMixerStream32.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveMixerStream32.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOffsetStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOffsetStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOutBuffer.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOutBuffer.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveStream.cs delete mode 100644 Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveStream.cs.meta delete mode 100644 Assets/Scripts/Audio/NAudio/obj.meta delete mode 100644 Assets/Scripts/Audio/NAudio/obj/Debug.meta delete mode 100644 Assets/Scripts/Audio/NAudio/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache delete mode 100644 Assets/Scripts/Audio/NAudio/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache.meta delete mode 100644 Assets/Scripts/Audio/NAudio/obj/Debug/NAudio.csproj.AssemblyReference.cache delete mode 100644 Assets/Scripts/Audio/NAudio/obj/Debug/NAudio.csproj.AssemblyReference.cache.meta delete mode 100644 Assets/Scripts/Audio/NAudio/obj/Debug/TempPE.meta create mode 100644 ProjectSettings/SceneTemplateSettings.json diff --git a/Assets/Plugins/NAudio.dll b/Assets/Plugins/NAudio.dll new file mode 100644 index 0000000000000000000000000000000000000000..9425d4029143177f673c145b75691d720855fcac GIT binary patch literal 479232 zcmce<37lM2l?VL#y{cDRcc-hnQ&rtbx+)3Xyi`?pl5P^31V~sU>`T~sF(j;#PRN5- z0X3D^1W?=(AgG9lh=_=|;WCcniioI;I*2=iEh3_$z@XzeuHpOt&%N)}>jlQ2^L<}K z-aYr+d(S=h+;g{cmpWzaCc`oeBZhx3zGxVqfy=-3@_qTw9t5`*Kig`2D)p_!pJ_Vz zTZ_-SbZf12x#zyhJO8rMh3D_s;qEM5aB<1Iaz|_R zU$Ybb<_)@BEUV@_h=wFv2E3YgArQhF%g%zH2siS#9@RDAUA)~zMDl8YXQ6fKtawL9 zk_lL#T=7TVOe1c@jyH|3|4+EdSYZx6XEMqO`A)l;uWshMjNZZxr&U!`?3buURqkyR99qF<`s9%?Pj}mVEz&Wr1tWQq;y)^ zE$!DyiBw6Q4J?XhS}_L-V>_q`itDYYYKZG?aLOloh;zBQHx8aH=LE(dG^mmfEsejt$gb1L;0=*0am(P@qOU!=SH^Y|W^|J^3TG#v=uX5NqfJG{<`pzNH4 z&->~1{}~ZkfsADCrmw!J*@)#2G?h_*G2>dT4=T*+w{n%Hyw4~q6SK}VdxiALBz+1# z{x32JZ-l6*bz*bQsfb|Kg==9G6++&(kTctR6@=iVgc+7W(l}_m>9Sq!c8+3EM6WIl z_!8B#a)U|B=|JdU#(O(R)J{i|UFL3db&$jNP*Te|gBc6PtP{VNXh)ca&e-1j!>m%gSwEE_1~Zjq31uMo@b(-U()kYu$8h*2YN@ozS`icPSTcHC+XS%3w31i zKFgcL-Gc=d_0;{r?nC%KxpnGidwZC}y^sIn)-k z)$WL8W7U>y%=;yaCVHCdh*vhYTh3WvC6SGfO^i5a1B?(7-6PK(P-5XAYuD#Pp)7Yb zXvUmHq@1v`3HKbN%*OL09r0{DSto0QcTXi!q7P5l*!ofsLG*CH9J#q_)om+2(e`o+%I`uZnNP{O4JGBa%pp-fk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!+KWhJT^Z)<= literal 0 HcmV?d00001 diff --git a/Assets/Plugins/NAudio.dll.meta b/Assets/Plugins/NAudio.dll.meta new file mode 100644 index 0000000..186f540 --- /dev/null +++ b/Assets/Plugins/NAudio.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 2c0b0ac3e281b3f4c87f02a42e65baad +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio.meta b/Assets/Scripts/Audio/NAudio.meta deleted file mode 100644 index 0ae19b9..0000000 --- a/Assets/Scripts/Audio/NAudio.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b9b61cdfbf5ba6a48a953e6db3db5905 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Codecs.meta b/Assets/Scripts/Audio/NAudio/Codecs.meta deleted file mode 100644 index 9f21462..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 53e0959db419cbb4ebe8833103de3901 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Codecs/ALawDecoder.cs b/Assets/Scripts/Audio/NAudio/Codecs/ALawDecoder.cs deleted file mode 100644 index 82b5946..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs/ALawDecoder.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Codecs -{ - ///

- /// a-law decoder - /// based on code from: - /// http://hazelware.luggle.com/tutorials/mulawcompression.html - /// - public class ALawDecoder - { - /// - /// only 512 bytes required, so just use a lookup - /// - private static readonly short[] ALawDecompressTable = new short[256] - { - -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, - -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784, - -2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368, - -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392, - -22016,-20992,-24064,-23040,-17920,-16896,-19968,-18944, - -30208,-29184,-32256,-31232,-26112,-25088,-28160,-27136, - -11008,-10496,-12032,-11520,-8960, -8448, -9984, -9472, - -15104,-14592,-16128,-15616,-13056,-12544,-14080,-13568, - -344, -328, -376, -360, -280, -264, -312, -296, - -472, -456, -504, -488, -408, -392, -440, -424, - -88, -72, -120, -104, -24, -8, -56, -40, - -216, -200, -248, -232, -152, -136, -184, -168, - -1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184, - -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696, - -688, -656, -752, -720, -560, -528, -624, -592, - -944, -912, -1008, -976, -816, -784, -880, -848, - 5504, 5248, 6016, 5760, 4480, 4224, 4992, 4736, - 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784, - 2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368, - 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, - 22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944, - 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136, - 11008, 10496, 12032, 11520, 8960, 8448, 9984, 9472, - 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568, - 344, 328, 376, 360, 280, 264, 312, 296, - 472, 456, 504, 488, 408, 392, 440, 424, - 88, 72, 120, 104, 24, 8, 56, 40, - 216, 200, 248, 232, 152, 136, 184, 168, - 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184, - 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, - 688, 656, 752, 720, 560, 528, 624, 592, - 944, 912, 1008, 976, 816, 784, 880, 848 - }; - - /// - /// Converts an a-law encoded byte to a 16 bit linear sample - /// - /// a-law encoded byte - /// Linear sample - public static short ALawToLinearSample(byte aLaw) - { - return ALawDecompressTable[aLaw]; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Codecs/ALawDecoder.cs.meta b/Assets/Scripts/Audio/NAudio/Codecs/ALawDecoder.cs.meta deleted file mode 100644 index cdbe52f..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs/ALawDecoder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9c7731fd64041bc4ca69a7004c59d6c9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Codecs/ALawEncoder.cs b/Assets/Scripts/Audio/NAudio/Codecs/ALawEncoder.cs deleted file mode 100644 index 18bcad4..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs/ALawEncoder.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Codecs -{ - /// - /// A-law encoder - /// - public static class ALawEncoder - { - private const int cBias = 0x84; - private const int cClip = 32635; - private static readonly byte[] ALawCompressTable = new byte[128] - { - 1,1,2,2,3,3,3,3, - 4,4,4,4,4,4,4,4, - 5,5,5,5,5,5,5,5, - 5,5,5,5,5,5,5,5, - 6,6,6,6,6,6,6,6, - 6,6,6,6,6,6,6,6, - 6,6,6,6,6,6,6,6, - 6,6,6,6,6,6,6,6, - 7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7 - }; - - /// - /// Encodes a single 16 bit sample to a-law - /// - /// 16 bit PCM sample - /// a-law encoded byte - public static byte LinearToALawSample(short sample) - { - int sign; - int exponent; - int mantissa; - byte compressedByte; - - sign = ((~sample) >> 8) & 0x80; - if (sign == 0) - sample = (short)-sample; - if (sample > cClip) - sample = cClip; - if (sample >= 256) - { - exponent = (int)ALawCompressTable[(sample >> 8) & 0x7F]; - mantissa = (sample >> (exponent + 3)) & 0x0F; - compressedByte = (byte)((exponent << 4) | mantissa); - } - else - { - compressedByte = (byte)(sample >> 4); - } - compressedByte ^= (byte)(sign ^ 0x55); - return compressedByte; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Codecs/ALawEncoder.cs.meta b/Assets/Scripts/Audio/NAudio/Codecs/ALawEncoder.cs.meta deleted file mode 100644 index 64d5862..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs/ALawEncoder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 49601f5ceda3d7d4abc37b0c09532fb7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Codecs/G722Codec.cs b/Assets/Scripts/Audio/NAudio/Codecs/G722Codec.cs deleted file mode 100644 index 40943b3..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs/G722Codec.cs +++ /dev/null @@ -1,628 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Codecs -{ - /// - /// SpanDSP - a series of DSP components for telephony - /// - /// g722_decode.c - The ITU G.722 codec, decode part. - /// - /// Written by Steve Underwood <steveu@coppice.org> - /// - /// Copyright (C) 2005 Steve Underwood - /// Ported to C# by Mark Heath 2011 - /// - /// Despite my general liking of the GPL, I place my own contributions - /// to this code in the public domain for the benefit of all mankind - - /// even the slimy ones who might try to proprietize my work and use it - /// to my detriment. - /// - /// Based in part on a single channel G.722 codec which is: - /// Copyright (c) CMU 1993 - /// Computer Science, Speech Group - /// Chengxiang Lu and Alex Hauptmann - /// - public class G722Codec - { - /// - /// hard limits to 16 bit samples - /// - static short Saturate(int amp) - { - short amp16; - - // Hopefully this is optimised for the common case - not clipping - amp16 = (short)amp; - if (amp == amp16) - return amp16; - if (amp > Int16.MaxValue) - return Int16.MaxValue; - return Int16.MinValue; - } - - static void Block4(G722CodecState s, int band, int d) - { - int wd1; - int wd2; - int wd3; - int i; - - // Block 4, RECONS - s.Band[band].d[0] = d; - s.Band[band].r[0] = Saturate(s.Band[band].s + d); - - // Block 4, PARREC - s.Band[band].p[0] = Saturate(s.Band[band].sz + d); - - // Block 4, UPPOL2 - for (i = 0; i < 3; i++) - s.Band[band].sg[i] = s.Band[band].p[i] >> 15; - wd1 = Saturate(s.Band[band].a[1] << 2); - - wd2 = (s.Band[band].sg[0] == s.Band[band].sg[1]) ? -wd1 : wd1; - if (wd2 > 32767) - wd2 = 32767; - wd3 = (s.Band[band].sg[0] == s.Band[band].sg[2]) ? 128 : -128; - wd3 += (wd2 >> 7); - wd3 += (s.Band[band].a[2] * 32512) >> 15; - if (wd3 > 12288) - wd3 = 12288; - else if (wd3 < -12288) - wd3 = -12288; - s.Band[band].ap[2] = wd3; - - // Block 4, UPPOL1 - s.Band[band].sg[0] = s.Band[band].p[0] >> 15; - s.Band[band].sg[1] = s.Band[band].p[1] >> 15; - wd1 = (s.Band[band].sg[0] == s.Band[band].sg[1]) ? 192 : -192; - wd2 = (s.Band[band].a[1] * 32640) >> 15; - - s.Band[band].ap[1] = Saturate(wd1 + wd2); - wd3 = Saturate(15360 - s.Band[band].ap[2]); - if (s.Band[band].ap[1] > wd3) - s.Band[band].ap[1] = wd3; - else if (s.Band[band].ap[1] < -wd3) - s.Band[band].ap[1] = -wd3; - - // Block 4, UPZERO - wd1 = (d == 0) ? 0 : 128; - s.Band[band].sg[0] = d >> 15; - for (i = 1; i < 7; i++) - { - s.Band[band].sg[i] = s.Band[band].d[i] >> 15; - wd2 = (s.Band[band].sg[i] == s.Band[band].sg[0]) ? wd1 : -wd1; - wd3 = (s.Band[band].b[i] * 32640) >> 15; - s.Band[band].bp[i] = Saturate(wd2 + wd3); - } - - // Block 4, DELAYA - for (i = 6; i > 0; i--) - { - s.Band[band].d[i] = s.Band[band].d[i - 1]; - s.Band[band].b[i] = s.Band[band].bp[i]; - } - - for (i = 2; i > 0; i--) - { - s.Band[band].r[i] = s.Band[band].r[i - 1]; - s.Band[band].p[i] = s.Band[band].p[i - 1]; - s.Band[band].a[i] = s.Band[band].ap[i]; - } - - // Block 4, FILTEP - wd1 = Saturate(s.Band[band].r[1] + s.Band[band].r[1]); - wd1 = (s.Band[band].a[1] * wd1) >> 15; - wd2 = Saturate(s.Band[band].r[2] + s.Band[band].r[2]); - wd2 = (s.Band[band].a[2] * wd2) >> 15; - s.Band[band].sp = Saturate(wd1 + wd2); - - // Block 4, FILTEZ - s.Band[band].sz = 0; - for (i = 6; i > 0; i--) - { - wd1 = Saturate(s.Band[band].d[i] + s.Band[band].d[i]); - s.Band[band].sz += (s.Band[band].b[i] * wd1) >> 15; - } - s.Band[band].sz = Saturate(s.Band[band].sz); - - // Block 4, PREDIC - s.Band[band].s = Saturate(s.Band[band].sp + s.Band[band].sz); - } - - static readonly int[] wl = { -60, -30, 58, 172, 334, 538, 1198, 3042 }; - static readonly int[] rl42 = { 0, 7, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 0 }; - static readonly int[] ilb = { 2048, 2093, 2139, 2186, 2233, 2282, 2332, 2383, 2435, 2489, 2543, 2599, 2656, 2714, 2774, 2834, 2896, 2960, 3025, 3091, 3158, 3228, 3298, 3371, 3444, 3520, 3597, 3676, 3756, 3838, 3922, 4008 }; - static readonly int[] wh = { 0, -214, 798 }; - static readonly int[] rh2 = { 2, 1, 2, 1 }; - static readonly int[] qm2 = { -7408, -1616, 7408, 1616 }; - static readonly int[] qm4 = { 0, -20456, -12896, -8968, -6288, -4240, -2584, -1200, 20456, 12896, 8968, 6288, 4240, 2584, 1200, 0 }; - static readonly int[] qm5 = { -280, -280, -23352, -17560, -14120, -11664, -9752, -8184, -6864, -5712, -4696, -3784, -2960, -2208, -1520, -880, 23352, 17560, 14120, 11664, 9752, 8184, 6864, 5712, 4696, 3784, 2960, 2208, 1520, 880, 280, -280 }; - static readonly int[] qm6 = { -136, -136, -136, -136, -24808, -21904, -19008, -16704, -14984, -13512, -12280, -11192, -10232, -9360, -8576, -7856, -7192, -6576, -6000, -5456, -4944, -4464, -4008, -3576, -3168, -2776, -2400, -2032, -1688, -1360, -1040, -728, 24808, 21904, 19008, 16704, 14984, 13512, 12280, 11192, 10232, 9360, 8576, 7856, 7192, 6576, 6000, 5456, 4944, 4464, 4008, 3576, 3168, 2776, 2400, 2032, 1688, 1360, 1040, 728, 432, 136, -432, -136 }; - static readonly int[] qmf_coeffs = { 3, -11, 12, 32, -210, 951, 3876, -805, 362, -156, 53, -11, }; - static readonly int[] q6 = { 0, 35, 72, 110, 150, 190, 233, 276, 323, 370, 422, 473, 530, 587, 650, 714, 786, 858, 940, 1023, 1121, 1219, 1339, 1458, 1612, 1765, 1980, 2195, 2557, 2919, 0, 0 }; - static readonly int[] iln = { 0, 63, 62, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 0 }; - static readonly int[] ilp = { 0, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 0 }; - static readonly int[] ihn = { 0, 1, 0 }; - static readonly int[] ihp = { 0, 3, 2 }; - - /// - /// Decodes a buffer of G722 - /// - /// Codec state - /// Output buffer (to contain decompressed PCM samples) - /// - /// Number of bytes in input G722 data to decode - /// Number of samples written into output buffer - public int Decode(G722CodecState state, short[] outputBuffer, byte[] inputG722Data, int inputLength) - { - int dlowt; - int rlow; - int ihigh; - int dhigh; - int rhigh; - int xout1; - int xout2; - int wd1; - int wd2; - int wd3; - int code; - int outlen; - int i; - int j; - - outlen = 0; - rhigh = 0; - for (j = 0; j < inputLength; ) - { - if (state.Packed) - { - // Unpack the code bits - if (state.InBits < state.BitsPerSample) - { - state.InBuffer |= (uint)(inputG722Data[j++] << state.InBits); - state.InBits += 8; - } - code = (int)state.InBuffer & ((1 << state.BitsPerSample) - 1); - state.InBuffer >>= state.BitsPerSample; - state.InBits -= state.BitsPerSample; - } - else - { - code = inputG722Data[j++]; - } - - switch (state.BitsPerSample) - { - default: - case 8: - wd1 = code & 0x3F; - ihigh = (code >> 6) & 0x03; - wd2 = qm6[wd1]; - wd1 >>= 2; - break; - case 7: - wd1 = code & 0x1F; - ihigh = (code >> 5) & 0x03; - wd2 = qm5[wd1]; - wd1 >>= 1; - break; - case 6: - wd1 = code & 0x0F; - ihigh = (code >> 4) & 0x03; - wd2 = qm4[wd1]; - break; - } - - // Block 5L, LOW BAND INVQBL - wd2 = (state.Band[0].det * wd2) >> 15; - - // Block 5L, RECONS - rlow = state.Band[0].s + wd2; - - // Block 6L, LIMIT - if (rlow > 16383) - rlow = 16383; - else if (rlow < -16384) - rlow = -16384; - - // Block 2L, INVQAL - wd2 = qm4[wd1]; - dlowt = (state.Band[0].det * wd2) >> 15; - - // Block 3L, LOGSCL - wd2 = rl42[wd1]; - wd1 = (state.Band[0].nb * 127) >> 7; - wd1 += wl[wd2]; - if (wd1 < 0) - wd1 = 0; - else if (wd1 > 18432) - wd1 = 18432; - state.Band[0].nb = wd1; - - // Block 3L, SCALEL - wd1 = (state.Band[0].nb >> 6) & 31; - wd2 = 8 - (state.Band[0].nb >> 11); - wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2); - state.Band[0].det = wd3 << 2; - - Block4(state, 0, dlowt); - - if (!state.EncodeFrom8000Hz) - { - // Block 2H, INVQAH - wd2 = qm2[ihigh]; - dhigh = (state.Band[1].det * wd2) >> 15; - - // Block 5H, RECONS - rhigh = dhigh + state.Band[1].s; - - // Block 6H, LIMIT - if (rhigh > 16383) - rhigh = 16383; - else if (rhigh < -16384) - rhigh = -16384; - - // Block 2H, INVQAH - wd2 = rh2[ihigh]; - wd1 = (state.Band[1].nb * 127) >> 7; - wd1 += wh[wd2]; - if (wd1 < 0) - wd1 = 0; - else if (wd1 > 22528) - wd1 = 22528; - state.Band[1].nb = wd1; - - // Block 3H, SCALEH - wd1 = (state.Band[1].nb >> 6) & 31; - wd2 = 10 - (state.Band[1].nb >> 11); - wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2); - state.Band[1].det = wd3 << 2; - - Block4(state, 1, dhigh); - } - - if (state.ItuTestMode) - { - outputBuffer[outlen++] = (short)(rlow << 1); - outputBuffer[outlen++] = (short)(rhigh << 1); - } - else - { - if (state.EncodeFrom8000Hz) - { - outputBuffer[outlen++] = (short)(rlow << 1); - } - else - { - // Apply the receive QMF - for (i = 0; i < 22; i++) - state.QmfSignalHistory[i] = state.QmfSignalHistory[i + 2]; - state.QmfSignalHistory[22] = rlow + rhigh; - state.QmfSignalHistory[23] = rlow - rhigh; - - xout1 = 0; - xout2 = 0; - for (i = 0; i < 12; i++) - { - xout2 += state.QmfSignalHistory[2 * i] * qmf_coeffs[i]; - xout1 += state.QmfSignalHistory[2 * i + 1] * qmf_coeffs[11 - i]; - } - outputBuffer[outlen++] = (short)(xout1 >> 11); - outputBuffer[outlen++] = (short)(xout2 >> 11); - } - } - } - return outlen; - } - - /// - /// Encodes a buffer of G722 - /// - /// Codec state - /// Output buffer (to contain encoded G722) - /// PCM 16 bit samples to encode - /// Number of samples in the input buffer to encode - /// Number of encoded bytes written into output buffer - public int Encode(G722CodecState state, byte[] outputBuffer, short[] inputBuffer, int inputBufferCount) - { - int dlow; - int dhigh; - int el; - int wd; - int wd1; - int ril; - int wd2; - int il4; - int ih2; - int wd3; - int eh; - int mih; - int i; - int j; - // Low and high band PCM from the QMF - int xlow; - int xhigh; - int g722_bytes; - // Even and odd tap accumulators - int sumeven; - int sumodd; - int ihigh; - int ilow; - int code; - - g722_bytes = 0; - xhigh = 0; - for (j = 0; j < inputBufferCount; ) - { - if (state.ItuTestMode) - { - xlow = - xhigh = inputBuffer[j++] >> 1; - } - else - { - if (state.EncodeFrom8000Hz) - { - xlow = inputBuffer[j++] >> 1; - } - else - { - // Apply the transmit QMF - // Shuffle the buffer down - for (i = 0; i < 22; i++) - state.QmfSignalHistory[i] = state.QmfSignalHistory[i + 2]; - state.QmfSignalHistory[22] = inputBuffer[j++]; - state.QmfSignalHistory[23] = inputBuffer[j++]; - - // Discard every other QMF output - sumeven = 0; - sumodd = 0; - for (i = 0; i < 12; i++) - { - sumodd += state.QmfSignalHistory[2 * i] * qmf_coeffs[i]; - sumeven += state.QmfSignalHistory[2 * i + 1] * qmf_coeffs[11 - i]; - } - xlow = (sumeven + sumodd) >> 14; - xhigh = (sumeven - sumodd) >> 14; - } - } - // Block 1L, SUBTRA - el = Saturate(xlow - state.Band[0].s); - - // Block 1L, QUANTL - wd = (el >= 0) ? el : -(el + 1); - - for (i = 1; i < 30; i++) - { - wd1 = (q6[i] * state.Band[0].det) >> 12; - if (wd < wd1) - break; - } - ilow = (el < 0) ? iln[i] : ilp[i]; - - // Block 2L, INVQAL - ril = ilow >> 2; - wd2 = qm4[ril]; - dlow = (state.Band[0].det * wd2) >> 15; - - // Block 3L, LOGSCL - il4 = rl42[ril]; - wd = (state.Band[0].nb * 127) >> 7; - state.Band[0].nb = wd + wl[il4]; - if (state.Band[0].nb < 0) - state.Band[0].nb = 0; - else if (state.Band[0].nb > 18432) - state.Band[0].nb = 18432; - - // Block 3L, SCALEL - wd1 = (state.Band[0].nb >> 6) & 31; - wd2 = 8 - (state.Band[0].nb >> 11); - wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2); - state.Band[0].det = wd3 << 2; - - Block4(state, 0, dlow); - - if (state.EncodeFrom8000Hz) - { - // Just leave the high bits as zero - code = (0xC0 | ilow) >> (8 - state.BitsPerSample); - } - else - { - // Block 1H, SUBTRA - eh = Saturate(xhigh - state.Band[1].s); - - // Block 1H, QUANTH - wd = (eh >= 0) ? eh : -(eh + 1); - wd1 = (564 * state.Band[1].det) >> 12; - mih = (wd >= wd1) ? 2 : 1; - ihigh = (eh < 0) ? ihn[mih] : ihp[mih]; - - // Block 2H, INVQAH - wd2 = qm2[ihigh]; - dhigh = (state.Band[1].det * wd2) >> 15; - - // Block 3H, LOGSCH - ih2 = rh2[ihigh]; - wd = (state.Band[1].nb * 127) >> 7; - state.Band[1].nb = wd + wh[ih2]; - if (state.Band[1].nb < 0) - state.Band[1].nb = 0; - else if (state.Band[1].nb > 22528) - state.Band[1].nb = 22528; - - // Block 3H, SCALEH - wd1 = (state.Band[1].nb >> 6) & 31; - wd2 = 10 - (state.Band[1].nb >> 11); - wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2); - state.Band[1].det = wd3 << 2; - - Block4(state, 1, dhigh); - code = ((ihigh << 6) | ilow) >> (8 - state.BitsPerSample); - } - - if (state.Packed) - { - // Pack the code bits - state.OutBuffer |= (uint)(code << state.OutBits); - state.OutBits += state.BitsPerSample; - if (state.OutBits >= 8) - { - outputBuffer[g722_bytes++] = (byte)(state.OutBuffer & 0xFF); - state.OutBits -= 8; - state.OutBuffer >>= 8; - } - } - else - { - outputBuffer[g722_bytes++] = (byte)code; - } - } - return g722_bytes; - } - } - - /// - /// Stores state to be used between calls to Encode or Decode - /// - public class G722CodecState - { - /// - /// ITU Test Mode - /// TRUE if the operating in the special ITU test mode, with the band split filters disabled. - /// - public bool ItuTestMode { get; set; } - - /// - /// TRUE if the G.722 data is packed - /// - public bool Packed { get; private set; } - - /// - /// 8kHz Sampling - /// TRUE if encode from 8k samples/second - /// - public bool EncodeFrom8000Hz { get; private set; } - - /// - /// Bits Per Sample - /// 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. - /// - public int BitsPerSample { get; private set; } - - /// - /// Signal history for the QMF (x) - /// - public int[] QmfSignalHistory { get; private set; } - - /// - /// Band - /// - public Band[] Band { get; private set; } - - /// - /// In bit buffer - /// - public uint InBuffer { get; internal set; } - - /// - /// Number of bits in InBuffer - /// - public int InBits { get; internal set; } - - /// - /// Out bit buffer - /// - public uint OutBuffer { get; internal set; } - - /// - /// Number of bits in OutBuffer - /// - public int OutBits { get; internal set; } - - /// - /// Creates a new instance of G722 Codec State for a - /// new encode or decode session - /// - /// Bitrate (typically 64000) - /// Special options - public G722CodecState(int rate, G722Flags options) - { - this.Band = new Band[2] { new Band(), new Band() }; - this.QmfSignalHistory = new int[24]; - this.ItuTestMode = false; - - if (rate == 48000) - this.BitsPerSample = 6; - else if (rate == 56000) - this.BitsPerSample = 7; - else if (rate == 64000) - this.BitsPerSample = 8; - else - throw new ArgumentException("Invalid rate, should be 48000, 56000 or 64000"); - if ((options & G722Flags.SampleRate8000) == G722Flags.SampleRate8000) - this.EncodeFrom8000Hz = true; - if (((options & G722Flags.Packed) == G722Flags.Packed) && this.BitsPerSample != 8) - this.Packed = true; - else - this.Packed = false; - this.Band[0].det = 32; - this.Band[1].det = 8; - } - } - - /// - /// Band data for G722 Codec - /// - public class Band - { - /// s - public int s; - /// sp - public int sp; - /// sz - public int sz; - /// r - public int[] r = new int[3]; - /// a - public int[] a = new int[3]; - /// ap - public int[] ap = new int[3]; - /// p - public int[] p = new int[3]; - /// d - public int[] d = new int[7]; - /// b - public int[] b = new int[7]; - /// bp - public int[] bp = new int[7]; - /// sg - public int[] sg = new int[7]; - /// nb - public int nb; - /// det - public int det; - } - - /// - /// G722 Flags - /// - [Flags] - public enum G722Flags - { - /// - /// None - /// - None = 0, - /// - /// Using a G722 sample rate of 8000 - /// - SampleRate8000 = 0x0001, - /// - /// Packed - /// - Packed = 0x0002 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Codecs/G722Codec.cs.meta b/Assets/Scripts/Audio/NAudio/Codecs/G722Codec.cs.meta deleted file mode 100644 index ce141f5..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs/G722Codec.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c0905d4344a800341aae597e92687bb7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Codecs/MuLawDecoder.cs b/Assets/Scripts/Audio/NAudio/Codecs/MuLawDecoder.cs deleted file mode 100644 index 730c2bc..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs/MuLawDecoder.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace NAudio.Codecs -{ - /// - /// mu-law decoder - /// based on code from: - /// http://hazelware.luggle.com/tutorials/mulawcompression.html - /// - public static class MuLawDecoder - { - /// - /// only 512 bytes required, so just use a lookup - /// - private static readonly short[] MuLawDecompressTable = new short[256] - { - -32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956, - -23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764, - -15996,-15484,-14972,-14460,-13948,-13436,-12924,-12412, - -11900,-11388,-10876,-10364, -9852, -9340, -8828, -8316, - -7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140, - -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092, - -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004, - -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980, - -1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436, - -1372, -1308, -1244, -1180, -1116, -1052, -988, -924, - -876, -844, -812, -780, -748, -716, -684, -652, - -620, -588, -556, -524, -492, -460, -428, -396, - -372, -356, -340, -324, -308, -292, -276, -260, - -244, -228, -212, -196, -180, -164, -148, -132, - -120, -112, -104, -96, -88, -80, -72, -64, - -56, -48, -40, -32, -24, -16, -8, -1, - 32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956, - 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764, - 15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412, - 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316, - 7932, 7676, 7420, 7164, 6908, 6652, 6396, 6140, - 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092, - 3900, 3772, 3644, 3516, 3388, 3260, 3132, 3004, - 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980, - 1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436, - 1372, 1308, 1244, 1180, 1116, 1052, 988, 924, - 876, 844, 812, 780, 748, 716, 684, 652, - 620, 588, 556, 524, 492, 460, 428, 396, - 372, 356, 340, 324, 308, 292, 276, 260, - 244, 228, 212, 196, 180, 164, 148, 132, - 120, 112, 104, 96, 88, 80, 72, 64, - 56, 48, 40, 32, 24, 16, 8, 0 - }; - - /// - /// Converts a mu-law encoded byte to a 16 bit linear sample - /// - /// mu-law encoded byte - /// Linear sample - public static short MuLawToLinearSample(byte muLaw) - { - return MuLawDecompressTable[muLaw]; - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Codecs/MuLawDecoder.cs.meta b/Assets/Scripts/Audio/NAudio/Codecs/MuLawDecoder.cs.meta deleted file mode 100644 index 845c843..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs/MuLawDecoder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7e8f8f3cc467423488b6e7267d3e29cf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Codecs/MuLawEncoder.cs b/Assets/Scripts/Audio/NAudio/Codecs/MuLawEncoder.cs deleted file mode 100644 index 62551b3..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs/MuLawEncoder.cs +++ /dev/null @@ -1,53 +0,0 @@ -namespace NAudio.Codecs -{ - /// - /// mu-law encoder - /// based on code from: - /// http://hazelware.luggle.com/tutorials/mulawcompression.html - /// - public static class MuLawEncoder - { - private const int cBias = 0x84; - private const int cClip = 32635; - - private static readonly byte[] MuLawCompressTable = new byte[256] - { - 0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3, - 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, - 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, - 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 - }; - - /// - /// Encodes a single 16 bit sample to mu-law - /// - /// 16 bit PCM sample - /// mu-law encoded byte - public static byte LinearToMuLawSample(short sample) - { - int sign = (sample >> 8) & 0x80; - if (sign != 0) - sample = (short)-sample; - if (sample > cClip) - sample = cClip; - sample = (short)(sample + cBias); - int exponent = (int)MuLawCompressTable[(sample >> 7) & 0xFF]; - int mantissa = (sample >> (exponent + 3)) & 0x0F; - int compressedByte = ~(sign | (exponent << 4) | mantissa); - - return (byte)compressedByte; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Codecs/MuLawEncoder.cs.meta b/Assets/Scripts/Audio/NAudio/Codecs/MuLawEncoder.cs.meta deleted file mode 100644 index bbb646c..0000000 --- a/Assets/Scripts/Audio/NAudio/Codecs/MuLawEncoder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fd985b3b8cb2c2544afb6cfdda7804d7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi.meta deleted file mode 100644 index b74a1d8..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a448c0f4734c67041aa149aaa40bf04e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioCaptureClient.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioCaptureClient.cs deleted file mode 100644 index fcf1700..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioCaptureClient.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Capture Client - /// - public class AudioCaptureClient : IDisposable - { - IAudioCaptureClient audioCaptureClientInterface; - - internal AudioCaptureClient(IAudioCaptureClient audioCaptureClientInterface) - { - this.audioCaptureClientInterface = audioCaptureClientInterface; - } - - /// - /// Gets a pointer to the buffer - /// - /// Pointer to the buffer - public IntPtr GetBuffer( - out int numFramesToRead, - out AudioClientBufferFlags bufferFlags, - out long devicePosition, - out long qpcPosition) - { - IntPtr bufferPointer; - Marshal.ThrowExceptionForHR(audioCaptureClientInterface.GetBuffer(out bufferPointer, out numFramesToRead, out bufferFlags, out devicePosition, out qpcPosition)); - return bufferPointer; - } - - /// - /// Gets a pointer to the buffer - /// - /// Number of frames to read - /// Buffer flags - /// Pointer to the buffer - public IntPtr GetBuffer( - out int numFramesToRead, - out AudioClientBufferFlags bufferFlags) - { - IntPtr bufferPointer; - long devicePosition; - long qpcPosition; - Marshal.ThrowExceptionForHR(audioCaptureClientInterface.GetBuffer(out bufferPointer, out numFramesToRead, out bufferFlags, out devicePosition, out qpcPosition)); - return bufferPointer; - } - - /// - /// Gets the size of the next packet - /// - public int GetNextPacketSize() - { - int numFramesInNextPacket; - Marshal.ThrowExceptionForHR(audioCaptureClientInterface.GetNextPacketSize(out numFramesInNextPacket)); - return numFramesInNextPacket; - } - - /// - /// Release buffer - /// - /// Number of frames written - public void ReleaseBuffer(int numFramesWritten) - { - Marshal.ThrowExceptionForHR(audioCaptureClientInterface.ReleaseBuffer(numFramesWritten)); - } - - /// - /// Release the COM object - /// - public void Dispose() - { - if (audioCaptureClientInterface != null) - { - // althugh GC would do this for us, we want it done now - // to let us reopen WASAPI - Marshal.ReleaseComObject(audioCaptureClientInterface); - audioCaptureClientInterface = null; - GC.SuppressFinalize(this); - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioCaptureClient.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioCaptureClient.cs.meta deleted file mode 100644 index b1a8257..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioCaptureClient.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3e2d556c5bc4fee41b67c5bd69f90aa3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClient.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClient.cs deleted file mode 100644 index a964521..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClient.cs +++ /dev/null @@ -1,357 +0,0 @@ -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Runtime.InteropServices; -using NAudio.Utils; -using NAudio.Wave; - -namespace NAudio.CoreAudioApi -{ - /// - /// Windows CoreAudio AudioClient - /// - public class AudioClient : IDisposable - { - private IAudioClient audioClientInterface; - private WaveFormat mixFormat; - private AudioRenderClient audioRenderClient; - private AudioCaptureClient audioCaptureClient; - private AudioClockClient audioClockClient; - private AudioStreamVolume audioStreamVolume; - private AudioClientShareMode shareMode; - - internal AudioClient(IAudioClient audioClientInterface) - { - this.audioClientInterface = audioClientInterface; - } - - /// - /// Retrieves the stream format that the audio engine uses for its internal processing of shared-mode streams. - /// Can be called before initialize - /// - public WaveFormat MixFormat - { - get - { - if (mixFormat == null) - { - IntPtr waveFormatPointer; - Marshal.ThrowExceptionForHR(audioClientInterface.GetMixFormat(out waveFormatPointer)); - var waveFormat = WaveFormat.MarshalFromPtr(waveFormatPointer); - Marshal.FreeCoTaskMem(waveFormatPointer); - mixFormat = waveFormat; - } - return mixFormat; - } - } - - /// - /// Initializes the Audio Client - /// - /// Share Mode - /// Stream Flags - /// Buffer Duration - /// Periodicity - /// Wave Format - /// Audio Session GUID (can be null) - public void Initialize(AudioClientShareMode shareMode, - AudioClientStreamFlags streamFlags, - long bufferDuration, - long periodicity, - WaveFormat waveFormat, - Guid audioSessionGuid) - { - this.shareMode = shareMode; - int hresult = audioClientInterface.Initialize(shareMode, streamFlags, bufferDuration, periodicity, waveFormat, ref audioSessionGuid); - Marshal.ThrowExceptionForHR(hresult); - // may have changed the mix format so reset it - mixFormat = null; - } - - /// - /// Retrieves the size (maximum capacity) of the audio buffer associated with the endpoint. (must initialize first) - /// - public int BufferSize - { - get - { - uint bufferSize; - Marshal.ThrowExceptionForHR(audioClientInterface.GetBufferSize(out bufferSize)); - return (int) bufferSize; - } - } - - /// - /// Retrieves the maximum latency for the current stream and can be called any time after the stream has been initialized. - /// - public long StreamLatency - { - get - { - return audioClientInterface.GetStreamLatency(); - } - } - - /// - /// Retrieves the number of frames of padding in the endpoint buffer (must initialize first) - /// - public int CurrentPadding - { - get - { - int currentPadding; - Marshal.ThrowExceptionForHR(audioClientInterface.GetCurrentPadding(out currentPadding)); - return currentPadding; - } - } - - /// - /// Retrieves the length of the periodic interval separating successive processing passes by the audio engine on the data in the endpoint buffer. - /// (can be called before initialize) - /// - public long DefaultDevicePeriod - { - get - { - long defaultDevicePeriod; - long minimumDevicePeriod; - Marshal.ThrowExceptionForHR(audioClientInterface.GetDevicePeriod(out defaultDevicePeriod, out minimumDevicePeriod)); - return defaultDevicePeriod; - } - } - - /// - /// Gets the minimum device period - /// (can be called before initialize) - /// - public long MinimumDevicePeriod - { - get - { - long defaultDevicePeriod; - long minimumDevicePeriod; - Marshal.ThrowExceptionForHR(audioClientInterface.GetDevicePeriod(out defaultDevicePeriod, out minimumDevicePeriod)); - return minimumDevicePeriod; - } - } - - // TODO: GetService: - // IID_IAudioSessionControl - // IID_IChannelAudioVolume - // IID_ISimpleAudioVolume - - /// - /// Returns the AudioStreamVolume service for this AudioClient. - /// - /// - /// This returns the AudioStreamVolume object ONLY for shared audio streams. - /// - /// - /// This is thrown when an exclusive audio stream is being used. - /// - public AudioStreamVolume AudioStreamVolume - { - get - { - if (shareMode == AudioClientShareMode.Exclusive) - { - throw new InvalidOperationException("AudioStreamVolume is ONLY supported for shared audio streams."); - } - if (audioStreamVolume == null) - { - object audioStreamVolumeInterface; - var audioStreamVolumeGuid = new Guid("93014887-242D-4068-8A15-CF5E93B90FE3"); - Marshal.ThrowExceptionForHR(audioClientInterface.GetService(audioStreamVolumeGuid, out audioStreamVolumeInterface)); - audioStreamVolume = new AudioStreamVolume((IAudioStreamVolume)audioStreamVolumeInterface); - } - return audioStreamVolume; - } - } - - /// - /// Gets the AudioClockClient service - /// - public AudioClockClient AudioClockClient - { - get - { - if (audioClockClient == null) - { - object audioClockClientInterface; - var audioClockClientGuid = new Guid("CD63314F-3FBA-4a1b-812C-EF96358728E7"); - Marshal.ThrowExceptionForHR(audioClientInterface.GetService(audioClockClientGuid, out audioClockClientInterface)); - audioClockClient = new AudioClockClient((IAudioClock)audioClockClientInterface); - } - return audioClockClient; - } - } - - /// - /// Gets the AudioRenderClient service - /// - public AudioRenderClient AudioRenderClient - { - get - { - if (audioRenderClient == null) - { - object audioRenderClientInterface; - var audioRenderClientGuid = new Guid("F294ACFC-3146-4483-A7BF-ADDCA7C260E2"); - Marshal.ThrowExceptionForHR(audioClientInterface.GetService(audioRenderClientGuid, out audioRenderClientInterface)); - audioRenderClient = new AudioRenderClient((IAudioRenderClient)audioRenderClientInterface); - } - return audioRenderClient; - } - } - - /// - /// Gets the AudioCaptureClient service - /// - public AudioCaptureClient AudioCaptureClient - { - get - { - if (audioCaptureClient == null) - { - object audioCaptureClientInterface; - var audioCaptureClientGuid = new Guid("c8adbd64-e71e-48a0-a4de-185c395cd317"); - Marshal.ThrowExceptionForHR(audioClientInterface.GetService(audioCaptureClientGuid, out audioCaptureClientInterface)); - audioCaptureClient = new AudioCaptureClient((IAudioCaptureClient)audioCaptureClientInterface); - } - return audioCaptureClient; - } - } - - /// - /// Determines whether if the specified output format is supported - /// - /// The share mode. - /// The desired format. - /// True if the format is supported - public bool IsFormatSupported(AudioClientShareMode shareMode, - WaveFormat desiredFormat) - { - WaveFormatExtensible closestMatchFormat; - return IsFormatSupported(shareMode, desiredFormat, out closestMatchFormat); - } - - private IntPtr GetPointerToPointer() - { - return Marshal.AllocHGlobal(MarshalHelpers.SizeOf()); - } - - /// - /// Determines if the specified output format is supported in shared mode - /// - /// Share Mode - /// Desired Format - /// Output The closest match format. - /// True if the format is supported - public bool IsFormatSupported(AudioClientShareMode shareMode, WaveFormat desiredFormat, out WaveFormatExtensible closestMatchFormat) - { - IntPtr pointerToPtr = GetPointerToPointer(); // IntPtr.Zero; // Marshal.AllocHGlobal(Marshal.SizeOf()); - closestMatchFormat = null; - int hresult = audioClientInterface.IsFormatSupported(shareMode, desiredFormat, pointerToPtr); - - var closestMatchPtr = MarshalHelpers.PtrToStructure(pointerToPtr); - - if (closestMatchPtr != IntPtr.Zero) - { - closestMatchFormat = MarshalHelpers.PtrToStructure(closestMatchPtr); - Marshal.FreeCoTaskMem(closestMatchPtr); - } - Marshal.FreeHGlobal(pointerToPtr); - // S_OK is 0, S_FALSE = 1 - if (hresult == 0) - { - - // directly supported - return true; - } - if (hresult == 1) - { - return false; - } - if (hresult == (int)AudioClientErrors.UnsupportedFormat) - { - // Succeeded but the specified format is not supported in exclusive mode. - return shareMode != AudioClientShareMode.Exclusive; - } - Marshal.ThrowExceptionForHR(hresult); - // shouldn't get here - throw new NotSupportedException("Unknown hresult " + hresult); - } - - /// - /// Starts the audio stream - /// - public void Start() - { - audioClientInterface.Start(); - } - - /// - /// Stops the audio stream. - /// - public void Stop() - { - audioClientInterface.Stop(); - } - - /// - /// Set the Event Handle for buffer synchro. - /// - /// The Wait Handle to setup - public void SetEventHandle(IntPtr eventWaitHandle) - { - audioClientInterface.SetEventHandle(eventWaitHandle); - } - - /// - /// Resets the audio stream - /// Reset is a control method that the client calls to reset a stopped audio stream. - /// Resetting the stream flushes all pending data and resets the audio clock stream - /// position to 0. This method fails if it is called on a stream that is not stopped - /// - public void Reset() - { - audioClientInterface.Reset(); - } - - #region IDisposable Members - - /// - /// Dispose - /// - public void Dispose() - { - if (audioClientInterface != null) - { - if (audioClockClient != null) - { - audioClockClient.Dispose(); - audioClockClient = null; - } - if (audioRenderClient != null) - { - audioRenderClient.Dispose(); - audioRenderClient = null; - } - if (audioCaptureClient != null) - { - audioCaptureClient.Dispose(); - audioCaptureClient = null; - } - if (audioStreamVolume != null) - { - audioStreamVolume.Dispose(); - audioStreamVolume = null; - } - Marshal.ReleaseComObject(audioClientInterface); - audioClientInterface = null; - GC.SuppressFinalize(this); - } - } - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClient.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClient.cs.meta deleted file mode 100644 index 9461426..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClient.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8a8ce790c8bafe149b00a1541d1fea8e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientBufferFlags.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientBufferFlags.cs deleted file mode 100644 index 53e2fee..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientBufferFlags.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Client Buffer Flags - /// - [Flags] - public enum AudioClientBufferFlags - { - /// - /// None - /// - None, - /// - /// AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY - /// - DataDiscontinuity = 0x1, - /// - /// AUDCLNT_BUFFERFLAGS_SILENT - /// - Silent = 0x2, - /// - /// AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR - /// - TimestampError = 0x4 - - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientBufferFlags.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientBufferFlags.cs.meta deleted file mode 100644 index 8978de0..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientBufferFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 38ba0bfc415031548b63bec98df7b981 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientProperties.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientProperties.cs deleted file mode 100644 index 73c17f6..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientProperties.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// The AudioClientProperties structure is used to set the parameters that describe the properties of the client's audio stream. - /// - /// http://msdn.microsoft.com/en-us/library/windows/desktop/hh968105(v=vs.85).aspx - [StructLayout(LayoutKind.Sequential)] - public struct AudioClientProperties - { - /// - /// The size of the buffer for the audio stream. - /// - public UInt32 cbSize; - /// - /// Boolean value to indicate whether or not the audio stream is hardware-offloaded - /// - public int bIsOffload; - /// - /// An enumeration that is used to specify the category of the audio stream. - /// - public AudioStreamCategory eCategory; - /// - /// A bit-field describing the characteristics of the stream. Supported in Windows 8.1 and later. - /// - public AudioClientStreamOptions Options; - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientProperties.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientProperties.cs.meta deleted file mode 100644 index 0d5272a..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientProperties.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e31c85e7de3c6a44089d7abec81789fd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientShareMode.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientShareMode.cs deleted file mode 100644 index fbde0d8..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientShareMode.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// AUDCLNT_SHAREMODE - /// - public enum AudioClientShareMode - { - /// - /// AUDCLNT_SHAREMODE_SHARED, - /// - Shared, - /// - /// AUDCLNT_SHAREMODE_EXCLUSIVE - /// - Exclusive, - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientShareMode.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientShareMode.cs.meta deleted file mode 100644 index 360d596..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientShareMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8d9bb3bb833766540846ddcfcc0986a8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamFlags.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamFlags.cs deleted file mode 100644 index 31b0419..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamFlags.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// AUDCLNT_STREAMFLAGS - /// - [Flags] - public enum AudioClientStreamFlags - { - /// - /// None - /// - None, - /// - /// AUDCLNT_STREAMFLAGS_CROSSPROCESS - /// - CrossProcess = 0x00010000, - /// - /// AUDCLNT_STREAMFLAGS_LOOPBACK - /// - Loopback = 0x00020000, - /// - /// AUDCLNT_STREAMFLAGS_EVENTCALLBACK - /// - EventCallback = 0x00040000, - /// - /// AUDCLNT_STREAMFLAGS_NOPERSIST - /// - NoPersist = 0x00080000, - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamFlags.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamFlags.cs.meta deleted file mode 100644 index ab43d5a..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b7f5275174aacdf4b8f51153a54bddcd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamOptions.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamOptions.cs deleted file mode 100644 index 0a1e344..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamOptions.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace NAudio.CoreAudioApi -{ - /// - /// Defines values that describe the characteristics of an audio stream. - /// - public enum AudioClientStreamOptions - { - /// - /// No stream options. - /// - None = 0, - /// - /// The audio stream is a 'raw' stream that bypasses all signal processing except for endpoint specific, always-on processing in the APO, driver, and hardware. - /// - Raw = 0x1 - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamOptions.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamOptions.cs.meta deleted file mode 100644 index 7dcfedc..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClientStreamOptions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3398a3960a7a1be4c8f6e66dd9bee3b8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClockClient.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClockClient.cs deleted file mode 100644 index c7f52e9..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClockClient.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Clock Client - /// - public class AudioClockClient : IDisposable - { - IAudioClock audioClockClientInterface; - - internal AudioClockClient(IAudioClock audioClockClientInterface) - { - this.audioClockClientInterface = audioClockClientInterface; - - //Stopwatch.GetTimestamp(); - //Stopwatch.Frequency - } - - /// - /// Characteristics - /// - public int Characteristics - { - get - { - uint characteristics; - Marshal.ThrowExceptionForHR(audioClockClientInterface.GetCharacteristics(out characteristics)); - return (int)characteristics; - } - } - - /// - /// Frequency - /// - public ulong Frequency - { - get - { - ulong freq; - Marshal.ThrowExceptionForHR(audioClockClientInterface.GetFrequency(out freq)); - return freq; - } - } - - /// - /// Get Position - /// - public bool GetPosition(out ulong position, out ulong qpcPosition) - { - var hr = audioClockClientInterface.GetPosition(out position, out qpcPosition); - if (hr == -1) return false; - Marshal.ThrowExceptionForHR(hr); - return true; - } - - /// - /// Adjusted Position - /// - public ulong AdjustedPosition - { - get - { - // figure out ticks per byte (for later) - var byteLatency = (TimeSpan.TicksPerSecond / Frequency); - - ulong pos, qpos; - int cnt = 0; - while (!GetPosition(out pos, out qpos)) - { - if (++cnt == 5) - { - // we've tried too many times, so now we have to just run with what we have... - break; - } - } - - if (Stopwatch.IsHighResolution) - { - // cool, we can adjust our position appropriately - - // get the current qpc count (in ticks) - var qposNow = (ulong)((Stopwatch.GetTimestamp() * 10000000M) / Stopwatch.Frequency); - - // find out how many ticks has passed since the device reported the position - var qposDiff = (qposNow - qpos) / 100; - - // find out how many byte would have played in that time span - var bytes = qposDiff / byteLatency; - - // add it to the position - pos += bytes; - } - return pos; - } - } - - /// - /// Can Adjust Position - /// - public bool CanAdjustPosition - { - get { return Stopwatch.IsHighResolution; } - } - - #region IDisposable Members - - /// - /// Dispose - /// - public void Dispose() - { - if (audioClockClientInterface != null) - { - // althugh GC would do this for us, we want it done now - // to let us reopen WASAPI - Marshal.ReleaseComObject(audioClockClientInterface); - audioClockClientInterface = null; - GC.SuppressFinalize(this); - } - } - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClockClient.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClockClient.cs.meta deleted file mode 100644 index 7ba0bf9..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioClockClient.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f6515848616958440b244d4c0bb10c0c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolume.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolume.cs deleted file mode 100644 index 4cd2a23..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolume.cs +++ /dev/null @@ -1,226 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ - -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Endpoint Volume - /// - public class AudioEndpointVolume : IDisposable - { - private readonly IAudioEndpointVolume audioEndPointVolume; - private readonly AudioEndpointVolumeChannels channels; - private readonly AudioEndpointVolumeStepInformation stepInformation; - private readonly AudioEndpointVolumeVolumeRange volumeRange; - private readonly EEndpointHardwareSupport hardwareSupport; - private AudioEndpointVolumeCallback callBack; - - private Guid notificationGuid = Guid.Empty; - - /// - /// GUID to pass to AudioEndpointVolumeCallback - /// - public Guid NotificationGuid { - get - { - return notificationGuid; - } - set - { - notificationGuid = value; - } - } - - /// - /// On Volume Notification - /// - public event AudioEndpointVolumeNotificationDelegate OnVolumeNotification; - - /// - /// Volume Range - /// - public AudioEndpointVolumeVolumeRange VolumeRange - { - get - { - return volumeRange; - } - } - - /// - /// Hardware Support - /// - public EEndpointHardwareSupport HardwareSupport - { - get - { - return hardwareSupport; - } - } - - /// - /// Step Information - /// - public AudioEndpointVolumeStepInformation StepInformation - { - get - { - return stepInformation; - } - } - - /// - /// Channels - /// - public AudioEndpointVolumeChannels Channels - { - get - { - return channels; - } - } - - /// - /// Master Volume Level - /// - public float MasterVolumeLevel - { - get - { - float result; - Marshal.ThrowExceptionForHR(audioEndPointVolume.GetMasterVolumeLevel(out result)); - return result; - } - set - { - Marshal.ThrowExceptionForHR(audioEndPointVolume.SetMasterVolumeLevel(value, ref notificationGuid)); - } - } - - /// - /// Master Volume Level Scalar - /// - public float MasterVolumeLevelScalar - { - get - { - float result; - Marshal.ThrowExceptionForHR(audioEndPointVolume.GetMasterVolumeLevelScalar(out result)); - return result; - } - set - { - Marshal.ThrowExceptionForHR(audioEndPointVolume.SetMasterVolumeLevelScalar(value, ref notificationGuid)); - } - } - - /// - /// Mute - /// - public bool Mute - { - get - { - bool result; - Marshal.ThrowExceptionForHR(audioEndPointVolume.GetMute(out result)); - return result; - } - set - { - Marshal.ThrowExceptionForHR(audioEndPointVolume.SetMute(value, ref notificationGuid)); - } - } - - /// - /// Volume Step Up - /// - public void VolumeStepUp() - { - Marshal.ThrowExceptionForHR(audioEndPointVolume.VolumeStepUp(ref notificationGuid)); - } - - /// - /// Volume Step Down - /// - public void VolumeStepDown() - { - Marshal.ThrowExceptionForHR(audioEndPointVolume.VolumeStepDown(ref notificationGuid)); - } - - /// - /// Creates a new Audio endpoint volume - /// - /// IAudioEndpointVolume COM interface - internal AudioEndpointVolume(IAudioEndpointVolume realEndpointVolume) - { - uint hardwareSupp; - - audioEndPointVolume = realEndpointVolume; - channels = new AudioEndpointVolumeChannels(audioEndPointVolume); - stepInformation = new AudioEndpointVolumeStepInformation(audioEndPointVolume); - Marshal.ThrowExceptionForHR(audioEndPointVolume.QueryHardwareSupport(out hardwareSupp)); - hardwareSupport = (EEndpointHardwareSupport)hardwareSupp; - volumeRange = new AudioEndpointVolumeVolumeRange(audioEndPointVolume); - callBack = new AudioEndpointVolumeCallback(this); - Marshal.ThrowExceptionForHR(audioEndPointVolume.RegisterControlChangeNotify(callBack)); - } - - internal void FireNotification(AudioVolumeNotificationData notificationData) - { - AudioEndpointVolumeNotificationDelegate del = OnVolumeNotification; - if (del != null) - { - del(notificationData); - } - } - #region IDisposable Members - - /// - /// Dispose - /// - public void Dispose() - { - if (callBack != null) - { - Marshal.ThrowExceptionForHR(audioEndPointVolume.UnregisterControlChangeNotify(callBack)); - callBack = null; - } - Marshal.ReleaseComObject(audioEndPointVolume); - GC.SuppressFinalize(this); - } - - /// - /// Finalizer - /// - ~AudioEndpointVolume() - { - Dispose(); - } - - #endregion - - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolume.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolume.cs.meta deleted file mode 100644 index b297b13..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolume.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ada5f03e052e4fd4aada9e1559850551 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeCallback.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeCallback.cs deleted file mode 100644 index 55773c2..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeCallback.cs +++ /dev/null @@ -1,74 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. - - (Modified for NAudio by Mark Heath) - - */ - -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Runtime.InteropServices; -using NAudio.Utils; - -namespace NAudio.CoreAudioApi -{ - // This class implements the IAudioEndpointVolumeCallback interface, - // it is implemented in this class because implementing it on AudioEndpointVolume - // (where the functionality is really wanted, would cause the OnNotify function - // to show up in the public API. - internal class AudioEndpointVolumeCallback : IAudioEndpointVolumeCallback - { - private readonly AudioEndpointVolume parent; - - internal AudioEndpointVolumeCallback(AudioEndpointVolume parent) - { - this.parent = parent; - } - - public void OnNotify(IntPtr notifyData) - { - //Since AUDIO_VOLUME_NOTIFICATION_DATA is dynamic in length based on the - //number of audio channels available we cannot just call PtrToStructure - //to get all data, thats why it is split up into two steps, first the static - //data is marshalled into the data structure, then with some IntPtr math the - //remaining floats are read from memory. - // - var data = MarshalHelpers.PtrToStructure(notifyData); - - //Determine offset in structure of the first float - var offset = MarshalHelpers.OffsetOf("ChannelVolume"); - //Determine offset in memory of the first float - var firstFloatPtr = (IntPtr)((long)notifyData + (long)offset); - - var voldata = new float[data.nChannels]; - - //Read all floats from memory. - for (int i = 0; i < data.nChannels; i++) - { - voldata[i] = MarshalHelpers.PtrToStructure(firstFloatPtr); - } - - //Create combined structure and Fire Event in parent class. - var notificationData = new AudioVolumeNotificationData(data.guidEventContext, data.bMuted, data.fMasterVolume, voldata, data.guidEventContext); - parent.FireNotification(notificationData); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeCallback.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeCallback.cs.meta deleted file mode 100644 index 136a5b4..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f3587af9c51990145ab25a1038283977 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannel.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannel.cs deleted file mode 100644 index 9fbd530..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannel.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ - -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Endpoint Volume Channel - /// - public class AudioEndpointVolumeChannel - { - private readonly uint channel; - private readonly IAudioEndpointVolume audioEndpointVolume; - - private Guid notificationGuid = Guid.Empty; - - /// - /// GUID to pass to AudioEndpointVolumeCallback - /// - public Guid NotificationGuid - { - get - { - return notificationGuid; - } - set - { - notificationGuid = value; - } - } - - internal AudioEndpointVolumeChannel(IAudioEndpointVolume parent, int channel) - { - this.channel = (uint)channel; - audioEndpointVolume = parent; - } - - /// - /// Volume Level - /// - public float VolumeLevel - { - get - { - float result; - Marshal.ThrowExceptionForHR(audioEndpointVolume.GetChannelVolumeLevel(channel,out result)); - return result; - } - set - { - Marshal.ThrowExceptionForHR(audioEndpointVolume.SetChannelVolumeLevel(channel, value, ref this.notificationGuid)); - } - } - - /// - /// Volume Level Scalar - /// - public float VolumeLevelScalar - { - get - { - float result; - Marshal.ThrowExceptionForHR(audioEndpointVolume.GetChannelVolumeLevelScalar(channel, out result)); - return result; - } - set - { - Marshal.ThrowExceptionForHR(audioEndpointVolume.SetChannelVolumeLevelScalar(channel, value, ref this.notificationGuid)); - } - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannel.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannel.cs.meta deleted file mode 100644 index 8c0913f..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d48e80398c7c89642bd685d7c8c16ae1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannels.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannels.cs deleted file mode 100644 index e31cbe2..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannels.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ - -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Endpoint Volume Channels - /// - public class AudioEndpointVolumeChannels - { - readonly IAudioEndpointVolume audioEndPointVolume; - readonly AudioEndpointVolumeChannel[] channels; - - /// - /// Channel Count - /// - public int Count - { - get - { - int result; - Marshal.ThrowExceptionForHR(audioEndPointVolume.GetChannelCount(out result)); - return result; - } - } - - /// - /// Indexer - get a specific channel - /// - public AudioEndpointVolumeChannel this[int index] - { - get - { - return channels[index]; - } - } - - internal AudioEndpointVolumeChannels(IAudioEndpointVolume parent) - { - int ChannelCount; - audioEndPointVolume = parent; - - ChannelCount = Count; - channels = new AudioEndpointVolumeChannel[ChannelCount]; - for (int i = 0; i < ChannelCount; i++) - { - channels[i] = new AudioEndpointVolumeChannel(audioEndPointVolume, i); - } - } - - - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannels.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannels.cs.meta deleted file mode 100644 index 671f4c9..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeChannels.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a76257c81db832e4f8f7d1086f1767de -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeNotificationDelegate.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeNotificationDelegate.cs deleted file mode 100644 index ea89426..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeNotificationDelegate.cs +++ /dev/null @@ -1,32 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ - -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Endpoint Volume Notifiaction Delegate - /// - /// Audio Volume Notification Data - public delegate void AudioEndpointVolumeNotificationDelegate(AudioVolumeNotificationData data); -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeNotificationDelegate.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeNotificationDelegate.cs.meta deleted file mode 100644 index a75454d..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeNotificationDelegate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6453b96c8b75e5a45a48feaa8016df92 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeStepInformation.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeStepInformation.cs deleted file mode 100644 index 810fd57..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeStepInformation.cs +++ /dev/null @@ -1,57 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Endpoint Volume Step Information - /// - public class AudioEndpointVolumeStepInformation - { - private readonly uint step; - private readonly uint stepCount; - - internal AudioEndpointVolumeStepInformation(IAudioEndpointVolume parent) - { - Marshal.ThrowExceptionForHR(parent.GetVolumeStepInfo(out step, out stepCount)); - } - - /// - /// Step - /// - public uint Step - { - get { return step; } - } - - /// - /// StepCount - /// - public uint StepCount - { - get { return stepCount; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeStepInformation.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeStepInformation.cs.meta deleted file mode 100644 index b074dc7..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeStepInformation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4fb7669af1a21d94ba2cfab59c50abb0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeVolumeRange.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeVolumeRange.cs deleted file mode 100644 index ff6ee6d..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeVolumeRange.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -// modified for NAudio -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Endpoint Volume Volume Range - /// - public class AudioEndpointVolumeVolumeRange - { - readonly float volumeMinDecibels; - readonly float volumeMaxDecibels; - readonly float volumeIncrementDecibels; - - internal AudioEndpointVolumeVolumeRange(IAudioEndpointVolume parent) - { - Marshal.ThrowExceptionForHR(parent.GetVolumeRange(out volumeMinDecibels,out volumeMaxDecibels,out volumeIncrementDecibels)); - } - - /// - /// Minimum Decibels - /// - public float MinDecibels - { - get { return volumeMinDecibels; } - } - - /// - /// Maximum Decibels - /// - public float MaxDecibels - { - get { return volumeMaxDecibels; } - } - - /// - /// Increment Decibels - /// - public float IncrementDecibels - { - get { return volumeIncrementDecibels; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeVolumeRange.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeVolumeRange.cs.meta deleted file mode 100644 index 2376f88..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioEndpointVolumeVolumeRange.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 462f548873fcd3346a9598a0776b4af4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformation.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformation.cs deleted file mode 100644 index 540c885..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformation.cs +++ /dev/null @@ -1,83 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -using System; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Meter Information - /// - public class AudioMeterInformation - { - private readonly IAudioMeterInformation audioMeterInformation; - private readonly EEndpointHardwareSupport hardwareSupport; - private readonly AudioMeterInformationChannels channels; - - internal AudioMeterInformation(IAudioMeterInformation realInterface) - { - int hardwareSupp; - - audioMeterInformation = realInterface; - Marshal.ThrowExceptionForHR(audioMeterInformation.QueryHardwareSupport(out hardwareSupp)); - hardwareSupport = (EEndpointHardwareSupport)hardwareSupp; - channels = new AudioMeterInformationChannels(audioMeterInformation); - - } - - /// - /// Peak Values - /// - public AudioMeterInformationChannels PeakValues - { - get - { - return channels; - } - } - - /// - /// Hardware Support - /// - public EEndpointHardwareSupport HardwareSupport - { - get - { - return hardwareSupport; - } - } - - /// - /// Master Peak Value - /// - public float MasterPeakValue - { - get - { - float result; - Marshal.ThrowExceptionForHR(audioMeterInformation.GetPeakValue(out result)); - return result; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformation.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformation.cs.meta deleted file mode 100644 index 526d25d..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e67b5c7f575a84e4081d1f59384cb96b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformationChannels.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformationChannels.cs deleted file mode 100644 index 654f577..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformationChannels.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Meter Information Channels - /// - public class AudioMeterInformationChannels - { - private readonly IAudioMeterInformation audioMeterInformation; - - /// - /// Metering Channel Count - /// - public int Count - { - get - { - int result; - Marshal.ThrowExceptionForHR(audioMeterInformation.GetMeteringChannelCount(out result)); - return result; - } - } - - /// - /// Get Peak value - /// - /// Channel index - /// Peak value - public float this[int index] - { - get - { - var channels = Count; - if (index >= channels) - { - throw new ArgumentOutOfRangeException(nameof(index), - $"Peak index cannot be greater than number of channels ({channels})"); - } - var peakValues = new float[Count]; - var Params = GCHandle.Alloc(peakValues, GCHandleType.Pinned); - Marshal.ThrowExceptionForHR(audioMeterInformation.GetChannelsPeakValues(peakValues.Length, Params.AddrOfPinnedObject())); - Params.Free(); - return peakValues[index]; - } - } - - internal AudioMeterInformationChannels(IAudioMeterInformation parent) - { - audioMeterInformation = parent; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformationChannels.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformationChannels.cs.meta deleted file mode 100644 index 730d436..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioMeterInformationChannels.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a41adf542de59234eb42e16fc2d8cf16 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioRenderClient.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioRenderClient.cs deleted file mode 100644 index 0d80393..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioRenderClient.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Render Client - /// - public class AudioRenderClient : IDisposable - { - IAudioRenderClient audioRenderClientInterface; - - internal AudioRenderClient(IAudioRenderClient audioRenderClientInterface) - { - this.audioRenderClientInterface = audioRenderClientInterface; - } - - /// - /// Gets a pointer to the buffer - /// - /// Number of frames requested - /// Pointer to the buffer - public IntPtr GetBuffer(int numFramesRequested) - { - IntPtr bufferPointer; - Marshal.ThrowExceptionForHR(audioRenderClientInterface.GetBuffer(numFramesRequested, out bufferPointer)); - return bufferPointer; - } - - /// - /// Release buffer - /// - /// Number of frames written - /// Buffer flags - public void ReleaseBuffer(int numFramesWritten,AudioClientBufferFlags bufferFlags) - { - Marshal.ThrowExceptionForHR(audioRenderClientInterface.ReleaseBuffer(numFramesWritten, bufferFlags)); - } - - /// - /// Release the COM object - /// - public void Dispose() - { - if (audioRenderClientInterface != null) - { - // althugh GC would do this for us, we want it done now - // to let us reopen WASAPI - Marshal.ReleaseComObject(audioRenderClientInterface); - audioRenderClientInterface = null; - GC.SuppressFinalize(this); - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioRenderClient.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioRenderClient.cs.meta deleted file mode 100644 index 0c9b9ec..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioRenderClient.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 27c5dbb82cdd8a1429aba1223fd48d57 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionControl.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionControl.cs deleted file mode 100644 index 22c2c7d..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionControl.cs +++ /dev/null @@ -1,237 +0,0 @@ -// ----------------------------------------- -// milligan22963 - implemented to work with nAudio -// 12/2014 -// ----------------------------------------- - -using System; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.CoreAudioApi -{ - /// - /// AudioSessionControl object for information - /// regarding an audio session - /// - public class AudioSessionControl : IDisposable - { - private readonly IAudioSessionControl audioSessionControlInterface; - private readonly IAudioSessionControl2 audioSessionControlInterface2; - private AudioSessionEventsCallback audioSessionEventCallback; - - /// - /// Constructor. - /// - /// - public AudioSessionControl(IAudioSessionControl audioSessionControl) - { - audioSessionControlInterface = audioSessionControl; - audioSessionControlInterface2 = audioSessionControl as IAudioSessionControl2; - - // ReSharper disable once SuspiciousTypeConversion.Global - var meters = audioSessionControlInterface as IAudioMeterInformation; - // ReSharper disable once SuspiciousTypeConversion.Global - var volume = audioSessionControlInterface as ISimpleAudioVolume; - if (meters != null) - AudioMeterInformation = new AudioMeterInformation(meters); - if (volume != null) - SimpleAudioVolume = new SimpleAudioVolume(volume); - } - - #region IDisposable Members - - /// - /// Dispose - /// - public void Dispose() - { - if (audioSessionEventCallback != null) - { - Marshal.ThrowExceptionForHR(audioSessionControlInterface.UnregisterAudioSessionNotification(audioSessionEventCallback)); - audioSessionEventCallback = null; - } - GC.SuppressFinalize(this); - } - - /// - /// Finalizer - /// - ~AudioSessionControl() - { - Dispose(); - } - - #endregion - - /// - /// Audio meter information of the audio session. - /// - public AudioMeterInformation AudioMeterInformation { get; } - - /// - /// Simple audio volume of the audio session (for volume and mute status). - /// - public SimpleAudioVolume SimpleAudioVolume { get; } - - /// - /// The current state of the audio session. - /// - public AudioSessionState State - { - get - { - AudioSessionState state; - - Marshal.ThrowExceptionForHR(audioSessionControlInterface.GetState(out state)); - - return state; - } - } - - /// - /// The name of the audio session. - /// - public string DisplayName - { - get - { - string displayName; - - Marshal.ThrowExceptionForHR(audioSessionControlInterface.GetDisplayName(out displayName)); - - return displayName; - } - set - { - if (value != String.Empty) - { - Marshal.ThrowExceptionForHR(audioSessionControlInterface.SetDisplayName(value, Guid.Empty)); - } - } - } - - /// - /// the path to the icon shown in the mixer. - /// - public string IconPath - { - get - { - string iconPath; - - Marshal.ThrowExceptionForHR(audioSessionControlInterface.GetIconPath(out iconPath)); - - return iconPath; - } - set - { - if (value != String.Empty) - { - Marshal.ThrowExceptionForHR(audioSessionControlInterface.SetIconPath(value, Guid.Empty)); - } - } - } - - /// - /// The session identifier of the audio session. - /// - public string GetSessionIdentifier - { - get - { - if (audioSessionControlInterface2 == null) throw new InvalidOperationException("Not supported on this version of Windows"); - string str; - Marshal.ThrowExceptionForHR(audioSessionControlInterface2.GetSessionIdentifier(out str)); - return str; - } - } - - /// - /// The session instance identifier of the audio session. - /// - public string GetSessionInstanceIdentifier - { - get - { - if (audioSessionControlInterface2 == null) throw new InvalidOperationException("Not supported on this version of Windows"); - string str; - Marshal.ThrowExceptionForHR(audioSessionControlInterface2.GetSessionInstanceIdentifier(out str)); - return str; - } - } - - /// - /// The process identifier of the audio session. - /// - public uint GetProcessID - { - get - { - if (audioSessionControlInterface2 == null) throw new InvalidOperationException("Not supported on this version of Windows"); - uint pid; - Marshal.ThrowExceptionForHR(audioSessionControlInterface2.GetProcessId(out pid)); - return pid; - } - } - - /// - /// Is the session a system sounds session. - /// - public bool IsSystemSoundsSession - { - get - { - if (audioSessionControlInterface2 == null) throw new InvalidOperationException("Not supported on this version of Windows"); - return (audioSessionControlInterface2.IsSystemSoundsSession() == 0); - } - } - - /// - /// the grouping param for an audio session grouping - /// - /// - public Guid GetGroupingParam() - { - Guid groupingId; - - Marshal.ThrowExceptionForHR(audioSessionControlInterface.GetGroupingParam(out groupingId)); - - return groupingId; - } - - /// - /// For chanigng the grouping param and supplying the context of said change - /// - /// - /// - public void SetGroupingParam(Guid groupingId, Guid context) - { - Marshal.ThrowExceptionForHR(audioSessionControlInterface.SetGroupingParam(groupingId, context)); - } - - /// - /// Registers an even client for callbacks - /// - /// - public void RegisterEventClient(IAudioSessionEventsHandler eventClient) - { - // we could have an array or list of listeners if we like - audioSessionEventCallback = new AudioSessionEventsCallback(eventClient); - Marshal.ThrowExceptionForHR(audioSessionControlInterface.RegisterAudioSessionNotification(audioSessionEventCallback)); - } - - /// - /// Unregisters an event client from receiving callbacks - /// - /// - public void UnRegisterEventClient(IAudioSessionEventsHandler eventClient) - { - // if one is registered, let it go - if (audioSessionEventCallback != null) - { - Marshal.ThrowExceptionForHR(audioSessionControlInterface.UnregisterAudioSessionNotification(audioSessionEventCallback)); - audioSessionEventCallback = null; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionControl.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionControl.cs.meta deleted file mode 100644 index 8c5cc15..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionControl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 489c9772d31f9da42a6deea4b004d0d4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionEventsCallback.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionEventsCallback.cs deleted file mode 100644 index 313c9e2..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionEventsCallback.cs +++ /dev/null @@ -1,135 +0,0 @@ -// ----------------------------------------- -// milligan22963 - implemented to work with nAudio -// 12/2014 -// ----------------------------------------- - -using System; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.CoreAudioApi -{ - /// - /// AudioSessionEvents callback implementation - /// - public class AudioSessionEventsCallback : IAudioSessionEvents - { - private readonly IAudioSessionEventsHandler audioSessionEventsHandler; - - /// - /// Constructor. - /// - /// - public AudioSessionEventsCallback(IAudioSessionEventsHandler handler) - { - audioSessionEventsHandler = handler; - } - - /// - /// Notifies the client that the display name for the session has changed. - /// - /// The new display name for the session. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - public int OnDisplayNameChanged( - [In] [MarshalAs(UnmanagedType.LPWStr)] string displayName, - [In] ref Guid eventContext) - { - audioSessionEventsHandler.OnDisplayNameChanged(displayName); - - return 0; - } - - /// - /// Notifies the client that the display icon for the session has changed. - /// - /// The path for the new display icon for the session. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - public int OnIconPathChanged( - [In] [MarshalAs(UnmanagedType.LPWStr)] string iconPath, - [In] ref Guid eventContext) - { - audioSessionEventsHandler.OnIconPathChanged(iconPath); - - return 0; - } - - /// - /// Notifies the client that the volume level or muting state of the session has changed. - /// - /// The new volume level for the audio session. - /// The new muting state. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - public int OnSimpleVolumeChanged( - [In] [MarshalAs(UnmanagedType.R4)] float volume, - [In] [MarshalAs(UnmanagedType.Bool)] bool isMuted, - [In] ref Guid eventContext) - { - audioSessionEventsHandler.OnVolumeChanged(volume, isMuted); - - return 0; - } - - /// - /// Notifies the client that the volume level of an audio channel in the session submix has changed. - /// - /// The channel count. - /// An array of volumnes cooresponding with each channel index. - /// The number of the channel whose volume level changed. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - public int OnChannelVolumeChanged( - [In] [MarshalAs(UnmanagedType.U4)] UInt32 channelCount, - [In] [MarshalAs(UnmanagedType.SysInt)] IntPtr newVolumes, // Pointer to float array - [In] [MarshalAs(UnmanagedType.U4)] UInt32 channelIndex, - [In] ref Guid eventContext) - { - audioSessionEventsHandler.OnChannelVolumeChanged(channelCount, newVolumes, channelIndex); - - return 0; - } - - /// - /// Notifies the client that the grouping parameter for the session has changed. - /// - /// The new grouping parameter for the session. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - public int OnGroupingParamChanged( - [In] ref Guid groupingId, - [In] ref Guid eventContext) - { - audioSessionEventsHandler.OnGroupingParamChanged(ref groupingId); - - return 0; - } - - /// - /// Notifies the client that the stream-activity state of the session has changed. - /// - /// The new session state. - /// An HRESULT code indicating whether the operation succeeded of failed. - public int OnStateChanged( - [In] AudioSessionState state) - { - audioSessionEventsHandler.OnStateChanged(state); - - return 0; - } - - /// - /// Notifies the client that the session has been disconnected. - /// - /// The reason that the audio session was disconnected. - /// An HRESULT code indicating whether the operation succeeded of failed. - public int OnSessionDisconnected( - [In] AudioSessionDisconnectReason disconnectReason) - { - audioSessionEventsHandler.OnSessionDisconnected(disconnectReason); - - return 0; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionEventsCallback.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionEventsCallback.cs.meta deleted file mode 100644 index e9f0db9..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionEventsCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 258b25fc0a77da44589f4f0cbe8e244e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionManager.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionManager.cs deleted file mode 100644 index 961e3e7..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionManager.cs +++ /dev/null @@ -1,144 +0,0 @@ -// ----------------------------------------- -// milligan22963 - implemented to work with nAudio -// 12/2014 -// ----------------------------------------- - -using System; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.CoreAudioApi -{ - /// - /// AudioSessionManager - /// - /// Designed to manage audio sessions and in particuar the - /// SimpleAudioVolume interface to adjust a session volume - /// - public class AudioSessionManager - { - private readonly IAudioSessionManager audioSessionInterface; - private readonly IAudioSessionManager2 audioSessionInterface2; - private AudioSessionNotification audioSessionNotification; - private SessionCollection sessions; - - private SimpleAudioVolume simpleAudioVolume; - private AudioSessionControl audioSessionControl; - - /// - /// Session created delegate - /// - public delegate void SessionCreatedDelegate(object sender, IAudioSessionControl newSession); - - /// - /// Occurs when audio session has been added (for example run another program that use audio playback). - /// - public event SessionCreatedDelegate OnSessionCreated; - - internal AudioSessionManager(IAudioSessionManager audioSessionManager) - { - audioSessionInterface = audioSessionManager; - audioSessionInterface2 = audioSessionManager as IAudioSessionManager2; - - RefreshSessions(); - } - - /// - /// SimpleAudioVolume object - /// for adjusting the volume for the user session - /// - public SimpleAudioVolume SimpleAudioVolume - { - get - { - if (simpleAudioVolume == null) - { - ISimpleAudioVolume simpleAudioInterface; - - audioSessionInterface.GetSimpleAudioVolume(Guid.Empty, 0, out simpleAudioInterface); - - simpleAudioVolume = new SimpleAudioVolume(simpleAudioInterface); - } - return simpleAudioVolume; - } - } - - /// - /// AudioSessionControl object - /// for registring for callbacks and other session information - /// - public AudioSessionControl AudioSessionControl - { - get - { - if (audioSessionControl == null) - { - IAudioSessionControl audioSessionControlInterface; - - audioSessionInterface.GetAudioSessionControl(Guid.Empty, 0, out audioSessionControlInterface); - - audioSessionControl = new AudioSessionControl(audioSessionControlInterface); - } - return audioSessionControl; - } - } - - internal void FireSessionCreated(IAudioSessionControl newSession) - { - OnSessionCreated?.Invoke(this, newSession); - } - - /// - /// Refresh session of current device. - /// - public void RefreshSessions() - { - UnregisterNotifications(); - - if (audioSessionInterface2 != null) - { - IAudioSessionEnumerator sessionEnum; - Marshal.ThrowExceptionForHR(audioSessionInterface2.GetSessionEnumerator(out sessionEnum)); - sessions = new SessionCollection(sessionEnum); - - audioSessionNotification = new AudioSessionNotification(this); - Marshal.ThrowExceptionForHR(audioSessionInterface2.RegisterSessionNotification(audioSessionNotification)); - } - } - - /// - /// Returns list of sessions of current device. - /// - public SessionCollection Sessions => sessions; - - /// - /// Dispose. - /// - public void Dispose() - { - UnregisterNotifications(); - - GC.SuppressFinalize(this); - } - - private void UnregisterNotifications() - { - sessions = null; - - if (audioSessionNotification != null && audioSessionInterface2 != null) - { - Marshal.ThrowExceptionForHR( - audioSessionInterface2.UnregisterSessionNotification(audioSessionNotification)); - audioSessionNotification = null; - } - } - - /// - /// Finalizer. - /// - ~AudioSessionManager() - { - Dispose(); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionManager.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionManager.cs.meta deleted file mode 100644 index 6437372..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a93077ee64c37d843b465f227fa04835 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionNotification.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionNotification.cs deleted file mode 100644 index 899b455..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionNotification.cs +++ /dev/null @@ -1,24 +0,0 @@ -using NAudio.CoreAudioApi.Interfaces; -using System; -using System.Linq; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - internal class AudioSessionNotification : IAudioSessionNotification - { - private AudioSessionManager parent; - - internal AudioSessionNotification(AudioSessionManager parent) - { - this.parent = parent; - } - - [PreserveSig] - public int OnSessionCreated(IAudioSessionControl newSession) - { - parent.FireSessionCreated(newSession); - return 0; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionNotification.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionNotification.cs.meta deleted file mode 100644 index 8080e83..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioSessionNotification.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a8c952d77ab7de5408e3b5dc71ec75ee -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamCategory.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamCategory.cs deleted file mode 100644 index 9aa1552..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamCategory.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace NAudio.CoreAudioApi -{ - /// - /// Specifies the category of an audio stream. - /// - public enum AudioStreamCategory - { - /// - /// Other audio stream. - /// - Other = 0, - /// - /// Media that will only stream when the app is in the foreground. - /// - ForegroundOnlyMedia, - /// - /// Media that can be streamed when the app is in the background. - /// - BackgroundCapableMedia, - /// - /// Real-time communications, such as VOIP or chat. - /// - Communications, - /// - /// Alert sounds. - /// - Alerts, - /// - /// Sound effects. - /// - SoundEffects, - /// - /// Game sound effects. - /// - GameEffects, - /// - /// Background audio for games. - /// - GameMedia, - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamCategory.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamCategory.cs.meta deleted file mode 100644 index 0d1974d..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamCategory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eee244e0fbc65c94fb561767f32865d3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamVolume.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamVolume.cs deleted file mode 100644 index 54f1b39..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamVolume.cs +++ /dev/null @@ -1,170 +0,0 @@ -using NAudio.CoreAudioApi.Interfaces; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.CoreAudioApi -{ - /// - /// Manages the AudioStreamVolume for the . - /// - public class AudioStreamVolume : IDisposable - { - IAudioStreamVolume audioStreamVolumeInterface; - - internal AudioStreamVolume(IAudioStreamVolume audioStreamVolumeInterface) - { - this.audioStreamVolumeInterface = audioStreamVolumeInterface; - } - - /// - /// Verify that the channel index is valid. - /// - /// - /// - private void CheckChannelIndex(int channelIndex, string parameter) - { - int channelCount = ChannelCount; - if (channelIndex >= channelCount) - { - throw new ArgumentOutOfRangeException(parameter, "You must supply a valid channel index < current count of channels: " + channelCount.ToString()); - } - } - - /// - /// Return the current stream volumes for all channels - /// - /// An array of volume levels between 0.0 and 1.0 for each channel in the audio stream. - public float[] GetAllVolumes() - { - uint channels; - float[] levels; - Marshal.ThrowExceptionForHR(audioStreamVolumeInterface.GetChannelCount(out channels)); - levels = new float[channels]; - Marshal.ThrowExceptionForHR(audioStreamVolumeInterface.GetAllVolumes(channels, levels)); - return levels; - } - - /// - /// Returns the current number of channels in this audio stream. - /// - public int ChannelCount - { - get - { - uint channels; - Marshal.ThrowExceptionForHR(audioStreamVolumeInterface.GetChannelCount(out channels)); - unchecked - { - return (int)channels; - } - } - } - - /// - /// Return the current volume for the requested channel. - /// - /// The 0 based index into the channels. - /// The volume level for the channel between 0.0 and 1.0. - public float GetChannelVolume(int channelIndex) - { - CheckChannelIndex(channelIndex, "channelIndex"); - - uint index; - float level; - unchecked - { - index = (uint)channelIndex; - } - Marshal.ThrowExceptionForHR(audioStreamVolumeInterface.GetChannelVolume(index, out level)); - return level; - } - - /// - /// Set the volume level for each channel of the audio stream. - /// - /// An array of volume levels (between 0.0 and 1.0) one for each channel. - /// - /// A volume level MUST be supplied for reach channel in the audio stream. - /// - /// - /// Thrown when does not contain elements. - /// - public void SetAllVolumes(float[] levels) - { - // Make friendly Net exceptions for common problems: - int channelCount = ChannelCount; - if (levels == null) - { - throw new ArgumentNullException("levels"); - } - if (levels.Length != channelCount) - { - throw new ArgumentOutOfRangeException( - "levels", - String.Format(CultureInfo.InvariantCulture, "SetAllVolumes MUST be supplied with a volume level for ALL channels. The AudioStream has {0} channels and you supplied {1} channels.", - channelCount, levels.Length)); - } - for (int i = 0; i < levels.Length; i++) - { - float level = levels[i]; - if (level < 0.0f) throw new ArgumentOutOfRangeException("levels", "All volumes must be between 0.0 and 1.0. Invalid volume at index: " + i.ToString()); - if (level > 1.0f) throw new ArgumentOutOfRangeException("levels", "All volumes must be between 0.0 and 1.0. Invalid volume at index: " + i.ToString()); - } - unchecked - { - Marshal.ThrowExceptionForHR(audioStreamVolumeInterface.SetAllVoumes((uint)channelCount, levels)); - } - } - - /// - /// Sets the volume level for one channel in the audio stream. - /// - /// The 0-based index into the channels to adjust the volume of. - /// The volume level between 0.0 and 1.0 for this channel of the audio stream. - public void SetChannelVolume(int index, float level) - { - CheckChannelIndex(index, "index"); - - if (level < 0.0f) throw new ArgumentOutOfRangeException("level", "Volume must be between 0.0 and 1.0"); - if (level > 1.0f) throw new ArgumentOutOfRangeException("level", "Volume must be between 0.0 and 1.0"); - unchecked - { - Marshal.ThrowExceptionForHR(audioStreamVolumeInterface.SetChannelVolume((uint)index, level)); - } - } - - #region IDisposable Members - - /// - /// Dispose - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Release/cleanup objects during Dispose/finalization. - /// - /// True if disposing and false if being finalized. - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - if (audioStreamVolumeInterface != null) - { - // although GC would do this for us, we want it done now - Marshal.ReleaseComObject(audioStreamVolumeInterface); - audioStreamVolumeInterface = null; - } - } - } - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamVolume.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamVolume.cs.meta deleted file mode 100644 index f55fb7d..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioStreamVolume.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5af5c8c992d1ad846abbd103ec12452f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioVolumeNotificationData.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioVolumeNotificationData.cs deleted file mode 100644 index 2629631..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioVolumeNotificationData.cs +++ /dev/null @@ -1,104 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// Audio Volume Notification Data - /// - public class AudioVolumeNotificationData - { - private readonly Guid eventContext; - private readonly bool muted; - private readonly float masterVolume; - private readonly int channels; - private readonly float[] channelVolume; - private readonly Guid guid; - - /// - /// Event Context - /// - public Guid EventContext - { - get { return eventContext; } - } - - /// - /// Muted - /// - public bool Muted - { - get { return muted; } - } - - /// - /// Guid that raised the event - /// - public Guid Guid - { - get { return guid; } - } - - /// - /// Master Volume - /// - public float MasterVolume - { - get { return masterVolume; } - } - - /// - /// Channels - /// - public int Channels - { - get { return channels; } - } - - /// - /// Channel Volume - /// - public float[] ChannelVolume - { - get { return channelVolume; } - } - - /// - /// Audio Volume Notification Data - /// - /// - /// - /// - /// - /// - public AudioVolumeNotificationData(Guid eventContext, bool muted, float masterVolume, float[] channelVolume, Guid guid) - { - this.eventContext = eventContext; - this.muted = muted; - this.masterVolume = masterVolume; - channels = channelVolume.Length; - this.channelVolume = channelVolume; - this.guid = guid; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioVolumeNotificationData.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioVolumeNotificationData.cs.meta deleted file mode 100644 index 3dc4000..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/AudioVolumeNotificationData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a96bfcae2cdcb38459d6276cbd2eefa7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/DataFlow.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/DataFlow.cs deleted file mode 100644 index d70259c..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/DataFlow.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// The EDataFlow enumeration defines constants that indicate the direction - /// in which audio data flows between an audio endpoint device and an application - /// - public enum DataFlow - { - /// - /// Audio rendering stream. - /// Audio data flows from the application to the audio endpoint device, which renders the stream. - /// - Render, - /// - /// Audio capture stream. Audio data flows from the audio endpoint device that captures the stream, - /// to the application - /// - Capture, - /// - /// Audio rendering or capture stream. Audio data can flow either from the application to the audio - /// endpoint device, or from the audio endpoint device to the application. - /// - All - }; - - -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/DataFlow.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/DataFlow.cs.meta deleted file mode 100644 index 38c67be..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/DataFlow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 78249ef88ae0d554bbd08d9d26bb2911 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/DeviceState.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/DeviceState.cs deleted file mode 100644 index 8e6c4b1..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/DeviceState.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -// adapted for NAudio, -// updated to be in line with http://msdn.microsoft.com/en-us/library/dd370823%28v=vs.85%29.aspx -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// Device State - /// - [Flags] - public enum DeviceState - { - /// - /// DEVICE_STATE_ACTIVE - /// - Active = 0x00000001, - /// - /// DEVICE_STATE_DISABLED - /// - Disabled = 0x00000002, - /// - /// DEVICE_STATE_NOTPRESENT - /// - NotPresent = 0x00000004, - /// - /// DEVICE_STATE_UNPLUGGED - /// - Unplugged = 0x00000008, - /// - /// DEVICE_STATEMASK_ALL - /// - All = 0x0000000F - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/DeviceState.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/DeviceState.cs.meta deleted file mode 100644 index b82dc84..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/DeviceState.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c0e2f7774f6b928478d0f98e34b811dc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/EEndpointHardwareSupport.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/EEndpointHardwareSupport.cs deleted file mode 100644 index 4023a50..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/EEndpointHardwareSupport.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// Endpoint Hardware Support - /// - [Flags] - public enum EEndpointHardwareSupport - { - /// - /// Volume - /// - Volume = 0x00000001, - /// - /// Mute - /// - Mute = 0x00000002, - /// - /// Meter - /// - Meter = 0x00000004 - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/EEndpointHardwareSupport.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/EEndpointHardwareSupport.cs.meta deleted file mode 100644 index 27de633..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/EEndpointHardwareSupport.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f25c53b846f4fc14bb669c766b2f6c5d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces.meta deleted file mode 100644 index 1a0748d..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 839424e4ce312b84fbecc270ee3a12f7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/AudioVolumeNotificationDataStruct.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/AudioVolumeNotificationDataStruct.cs deleted file mode 100644 index 20c4919..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/AudioVolumeNotificationDataStruct.cs +++ /dev/null @@ -1,52 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ - -using System; - -namespace NAudio.CoreAudioApi.Interfaces -{ - internal struct AudioVolumeNotificationDataStruct - { - public Guid guidEventContext; - public bool bMuted; - public float fMasterVolume; - public uint nChannels; - public float ChannelVolume; - - //Code Should Compile at warning level4 without any warnings, - //However this struct will give us Warning CS0649: Field [Fieldname] - //is never assigned to, and will always have its default value - //You can disable CS0649 in the project options but that will disable - //the warning for the whole project, it's a nice warning and we do want - //it in other places so we make a nice dummy function to keep the compiler - //happy. - private void FixCS0649() - { - guidEventContext = Guid.Empty; - bMuted = false; - fMasterVolume = 0; - nChannels = 0; - ChannelVolume = 0; - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/AudioVolumeNotificationDataStruct.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/AudioVolumeNotificationDataStruct.cs.meta deleted file mode 100644 index ca7b651..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/AudioVolumeNotificationDataStruct.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a0836d3a7bc79c3449fd114cedd50316 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/Blob.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/Blob.cs deleted file mode 100644 index 214dbfd..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/Blob.cs +++ /dev/null @@ -1,58 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -// Adapted for NAudio -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// Representation of binary large object container. - /// - public struct Blob - { - /// - /// Length of binary object. - /// - public int Length; - /// - /// Pointer to buffer storing data. - /// - public IntPtr Data; - - //Code Should Compile at warning level4 without any warnings, - //However this struct will give us Warning CS0649: Field [Fieldname] - //is never assigned to, and will always have its default value - //You can disable CS0649 in the project options but that will disable - //the warning for the whole project, it's a nice warning and we do want - //it in other places so we make a nice dummy function to keep the compiler - //happy. - private void FixCS0649() - { - Length = 0; - Data = IntPtr.Zero; - } - } -} - diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/Blob.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/Blob.cs.meta deleted file mode 100644 index 282deaf..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/Blob.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 78e5f968a86b62f43a324078f4a06df2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ClsCtx.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ClsCtx.cs deleted file mode 100644 index 0699e2f..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ClsCtx.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// is defined in WTypes.h - /// - [Flags] - enum ClsCtx - { - INPROC_SERVER = 0x1, - INPROC_HANDLER = 0x2, - LOCAL_SERVER = 0x4, - INPROC_SERVER16 = 0x8, - REMOTE_SERVER = 0x10, - INPROC_HANDLER16 = 0x20, - //RESERVED1 = 0x40, - //RESERVED2 = 0x80, - //RESERVED3 = 0x100, - //RESERVED4 = 0x200, - NO_CODE_DOWNLOAD = 0x400, - //RESERVED5 = 0x800, - NO_CUSTOM_MARSHAL = 0x1000, - ENABLE_CODE_DOWNLOAD = 0x2000, - NO_FAILURE_LOG = 0x4000, - DISABLE_AAA = 0x8000, - ENABLE_AAA = 0x10000, - FROM_DEFAULT_CONTEXT = 0x20000, - ACTIVATE_32_BIT_SERVER = 0x40000, - ACTIVATE_64_BIT_SERVER = 0x80000, - ENABLE_CLOAKING = 0x100000, - PS_DLL = unchecked ( (int) 0x80000000 ), - INPROC = INPROC_SERVER | INPROC_HANDLER, - SERVER = INPROC_SERVER | LOCAL_SERVER | REMOTE_SERVER, - ALL = SERVER | INPROC_HANDLER - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ClsCtx.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ClsCtx.cs.meta deleted file mode 100644 index 36762bc..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ClsCtx.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 42c523645eb94624f840e795a27f35e1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ErrorCodes.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ErrorCodes.cs deleted file mode 100644 index aa3e3ce..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ErrorCodes.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// Audio Client WASAPI Error Codes (HResult) - /// - public enum AudioClientErrors - { - /// - /// AUDCLNT_E_NOT_INITIALIZED - /// - NotInitialized = unchecked((int)0x88890001), - /// - /// AUDCLNT_E_UNSUPPORTED_FORMAT - /// - UnsupportedFormat = unchecked((int)0x88890008), - /// - /// AUDCLNT_E_DEVICE_IN_USE - /// - DeviceInUse = unchecked((int)0x8889000A), - /// - /// AUDCLNT_E_RESOURCES_INVALIDATED - /// - ResourcesInvalidated = unchecked((int)0x88890026), - } - - static class ErrorCodes - { - // AUDCLNT_ERR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, n) - // AUDCLNT_SUCCESS(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_AUDCLNT, n) - // ReSharper disable InconsistentNaming - public const int SEVERITY_ERROR = 1; - public const int FACILITY_AUDCLNT = 0x889; - public static readonly int AUDCLNT_E_NOT_INITIALIZED = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x001); - public static readonly int AUDCLNT_E_ALREADY_INITIALIZED = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x002); - public static readonly int AUDCLNT_E_WRONG_ENDPOINT_TYPE = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x003); - public static readonly int AUDCLNT_E_DEVICE_INVALIDATED = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x004); - public static readonly int AUDCLNT_E_NOT_STOPPED = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x005); - public static readonly int AUDCLNT_E_BUFFER_TOO_LARGE = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x006); - public static readonly int AUDCLNT_E_OUT_OF_ORDER = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x007); - public static readonly int AUDCLNT_E_UNSUPPORTED_FORMAT = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x008); - public static readonly int AUDCLNT_E_INVALID_SIZE = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x009); - public static readonly int AUDCLNT_E_DEVICE_IN_USE = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x00A); - public static readonly int AUDCLNT_E_BUFFER_OPERATION_PENDING = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x00B); - public static readonly int AUDCLNT_E_THREAD_NOT_REGISTERED = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x00C); - public static readonly int AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x00E); - public static readonly int AUDCLNT_E_ENDPOINT_CREATE_FAILED = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x00F); - public static readonly int AUDCLNT_E_SERVICE_NOT_RUNNING = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x010); - public static readonly int AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x011); - public static readonly int AUDCLNT_E_EXCLUSIVE_MODE_ONLY = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x0012); - public static readonly int AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x013); - public static readonly int AUDCLNT_E_EVENTHANDLE_NOT_SET = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x014); - public static readonly int AUDCLNT_E_INCORRECT_BUFFER_SIZE = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x015); - public static readonly int AUDCLNT_E_BUFFER_SIZE_ERROR = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x016); - public static readonly int AUDCLNT_E_CPUUSAGE_EXCEEDED = HResult.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, 0x017); - public static readonly int AUDCLNT_E_RESOURCES_INVALIDATED = unchecked((int) 0x88890026); - // ReSharper restore InconsistentNaming - /*static readonly int AUDCLNT_S_BUFFER_EMPTY AUDCLNT_SUCCESS(0x001) - static readonly int AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x002) - static readonly int AUDCLNT_S_POSITION_STALLED AUDCLNT_SUCCESS(0x003)*/ - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ErrorCodes.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ErrorCodes.cs.meta deleted file mode 100644 index 7934cab..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ErrorCodes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b9d37ab47ed6e1c408aa46667cd77c0b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioCaptureClient.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioCaptureClient.cs deleted file mode 100644 index f04c7c7..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioCaptureClient.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - - - [Guid("C8ADBD64-E71E-48a0-A4DE-185C395CD317"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IAudioCaptureClient - { - /*HRESULT GetBuffer( - BYTE** ppData, - UINT32* pNumFramesToRead, - DWORD* pdwFlags, - UINT64* pu64DevicePosition, - UINT64* pu64QPCPosition - );*/ - - int GetBuffer( - out IntPtr dataBuffer, - out int numFramesToRead, - out AudioClientBufferFlags bufferFlags, - out long devicePosition, - out long qpcPosition); - - int ReleaseBuffer(int numFramesRead); - - int GetNextPacketSize(out int numFramesInNextPacket); - - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioCaptureClient.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioCaptureClient.cs.meta deleted file mode 100644 index ea8ce22..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioCaptureClient.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e17c700f3a6a899419af842802610b80 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClient.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClient.cs deleted file mode 100644 index 4ce6d26..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClient.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.Wave; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// Windows CoreAudio IAudioClient interface - /// Defined in AudioClient.h - /// - [Guid("1CB9AD4C-DBFA-4c32-B178-C2F568A703B2"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown), - ComImport] - internal interface IAudioClient - { - [PreserveSig] - int Initialize(AudioClientShareMode shareMode, - AudioClientStreamFlags streamFlags, - long hnsBufferDuration, // REFERENCE_TIME - long hnsPeriodicity, // REFERENCE_TIME - [In] WaveFormat pFormat, - [In] ref Guid audioSessionGuid); - - /// - /// The GetBufferSize method retrieves the size (maximum capacity) of the endpoint buffer. - /// - int GetBufferSize(out uint bufferSize); - - [return: MarshalAs(UnmanagedType.I8)] - long GetStreamLatency(); - - int GetCurrentPadding(out int currentPadding); - - [PreserveSig] - int IsFormatSupported( - AudioClientShareMode shareMode, - [In] WaveFormat pFormat, - IntPtr closestMatchFormat); - - int GetMixFormat(out IntPtr deviceFormatPointer); - - // REFERENCE_TIME is 64 bit int - int GetDevicePeriod(out long defaultDevicePeriod, out long minimumDevicePeriod); - - int Start(); - - int Stop(); - - int Reset(); - - int SetEventHandle(IntPtr eventHandle); - - /// - /// The GetService method accesses additional services from the audio client object. - /// - /// The interface ID for the requested service. - /// Pointer to a pointer variable into which the method writes the address of an instance of the requested interface. - [PreserveSig] - int GetService([In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceId, [Out, MarshalAs(UnmanagedType.IUnknown)] out object interfacePointer); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClient.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClient.cs.meta deleted file mode 100644 index 39d0c34..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClient.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3d567d49a7f8a7b48b20954cd6c16dad -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClock2.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClock2.cs deleted file mode 100644 index ab82811..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClock2.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// Defined in AudioClient.h - /// - [Guid("CD63314F-3FBA-4a1b-812C-EF96358728E7"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IAudioClock - { - [PreserveSig] - int GetFrequency(out ulong frequency); - - [PreserveSig] - int GetPosition(out ulong devicePosition, out ulong qpcPosition); - - [PreserveSig] - int GetCharacteristics(out uint characteristics); - } - - /// - /// Defined in AudioClient.h - /// - [Guid("6f49ff73-6727-49AC-A008-D98CF5E70048"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IAudioClock2 : IAudioClock - { - [PreserveSig] - int GetDevicePosition(out ulong devicePosition, out ulong qpcPosition); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClock2.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClock2.cs.meta deleted file mode 100644 index 472f39e..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioClock2.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cb0ad5003fe76d64290037f92ac376bd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolume.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolume.cs deleted file mode 100644 index b9d5de0..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolume.cs +++ /dev/null @@ -1,52 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - [Guid("5CDF2C82-841E-4546-9722-0CF74078229A"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IAudioEndpointVolume - { - int RegisterControlChangeNotify(IAudioEndpointVolumeCallback pNotify); - int UnregisterControlChangeNotify(IAudioEndpointVolumeCallback pNotify); - int GetChannelCount(out int pnChannelCount); - int SetMasterVolumeLevel(float fLevelDB, ref Guid pguidEventContext); - int SetMasterVolumeLevelScalar(float fLevel, ref Guid pguidEventContext); - int GetMasterVolumeLevel(out float pfLevelDB); - int GetMasterVolumeLevelScalar(out float pfLevel); - int SetChannelVolumeLevel(uint nChannel, float fLevelDB, ref Guid pguidEventContext); - int SetChannelVolumeLevelScalar(uint nChannel, float fLevel, ref Guid pguidEventContext); - int GetChannelVolumeLevel(uint nChannel, out float pfLevelDB); - int GetChannelVolumeLevelScalar(uint nChannel, out float pfLevel); - int SetMute([MarshalAs(UnmanagedType.Bool)] Boolean bMute, ref Guid pguidEventContext); - int GetMute(out bool pbMute); - int GetVolumeStepInfo(out uint pnStep, out uint pnStepCount); - int VolumeStepUp(ref Guid pguidEventContext); - int VolumeStepDown(ref Guid pguidEventContext); - int QueryHardwareSupport(out uint pdwHardwareSupportMask); - int GetVolumeRange(out float pflVolumeMindB, out float pflVolumeMaxdB, out float pflVolumeIncrementdB); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolume.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolume.cs.meta deleted file mode 100644 index 255a3e6..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolume.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8909dfd17d01b2d47856fda72eccf2c4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolumeCallback.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolumeCallback.cs deleted file mode 100644 index ecc7dbe..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolumeCallback.cs +++ /dev/null @@ -1,39 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. - - (Modified for NAudio by Mark Heath) - -*/ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - [Guid("657804FA-D6AD-4496-8A60-352752AF4F89"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IAudioEndpointVolumeCallback - { - void OnNotify(IntPtr notifyData); - }; - -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolumeCallback.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolumeCallback.cs.meta deleted file mode 100644 index b181d94..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioEndpointVolumeCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6e51cde0c844461498d2a546cba34418 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioMeterInformation.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioMeterInformation.cs deleted file mode 100644 index d89fccb..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioMeterInformation.cs +++ /dev/null @@ -1,36 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - [Guid("C02216F6-8C67-4B5B-9D00-D008E73E0064"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IAudioMeterInformation - { - int GetPeakValue(out float pfPeak); - int GetMeteringChannelCount(out int pnChannelCount); - int GetChannelsPeakValues(int u32ChannelCount, [In] IntPtr afPeakValues); - int QueryHardwareSupport(out int pdwHardwareSupportMask); - }; -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioMeterInformation.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioMeterInformation.cs.meta deleted file mode 100644 index 25cf218..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioMeterInformation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fba18c1048759cf4e93c9e5c1c284de4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioRenderClient.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioRenderClient.cs deleted file mode 100644 index 6678416..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioRenderClient.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - [Guid("F294ACFC-3146-4483-A7BF-ADDCA7C260E2"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown), - ComImport] - interface IAudioRenderClient - { - int GetBuffer(int numFramesRequested, out IntPtr dataBufferPointer); - int ReleaseBuffer(int numFramesWritten, AudioClientBufferFlags bufferFlags); - } - - -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioRenderClient.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioRenderClient.cs.meta deleted file mode 100644 index f7ae830..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioRenderClient.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dfd9dc6141ee0124d9e884913bde689d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionControl.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionControl.cs deleted file mode 100644 index 1de06b8..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionControl.cs +++ /dev/null @@ -1,260 +0,0 @@ -// ----------------------------------------- -// SoundScribe (TM) and related software. -// -// Copyright (C) 2007-2011 Vannatech -// http://www.vannatech.com -// All rights reserved. -// -// This source code is subject to the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// ----------------------------------------- -// milligan22963 - ported to nAudio -// ----------------------------------------- - -using System; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// Windows CoreAudio IAudioSessionControl interface - /// Defined in AudioPolicy.h - /// - [Guid("F4B1A599-7266-4319-A8CA-E70ACB11E8CD"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IAudioSessionControl - { - /// - /// Retrieves the current state of the audio session. - /// - /// Receives the current session state. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetState( - [Out] out AudioSessionState state); - - /// - /// Retrieves the display name for the audio session. - /// - /// Receives a string that contains the display name. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetDisplayName( - [Out] [MarshalAs(UnmanagedType.LPWStr)] out string displayName); - - /// - /// Assigns a display name to the current audio session. - /// - /// A string that contains the new display name for the session. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int SetDisplayName( - [In] [MarshalAs(UnmanagedType.LPWStr)] string displayName, - [In] [MarshalAs(UnmanagedType.LPStruct)] Guid eventContext); - - /// - /// Retrieves the path for the display icon for the audio session. - /// - /// Receives a string that specifies the fully qualified path of the file that contains the icon. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetIconPath( - [Out] [MarshalAs(UnmanagedType.LPWStr)] out string iconPath); - - /// - /// Assigns a display icon to the current session. - /// - /// A string that specifies the fully qualified path of the file that contains the new icon. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int SetIconPath( - [In] [MarshalAs(UnmanagedType.LPWStr)] string iconPath, - [In] [MarshalAs(UnmanagedType.LPStruct)] Guid eventContext); - - /// - /// Retrieves the grouping parameter of the audio session. - /// - /// Receives the grouping parameter ID. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetGroupingParam( - [Out] out Guid groupingId); - - /// - /// Assigns a session to a grouping of sessions. - /// - /// The new grouping parameter ID. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int SetGroupingParam( - [In] [MarshalAs(UnmanagedType.LPStruct)] Guid groupingId, - [In] [MarshalAs(UnmanagedType.LPStruct)] Guid eventContext); - - /// - /// Registers the client to receive notifications of session events, including changes in the session state. - /// - /// A client-implemented interface. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int RegisterAudioSessionNotification( - [In] IAudioSessionEvents client); - - /// - /// Deletes a previous registration by the client to receive notifications. - /// - /// A client-implemented interface. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int UnregisterAudioSessionNotification( - [In] IAudioSessionEvents client); - } - - - /// - /// Windows CoreAudio IAudioSessionControl interface - /// Defined in AudioPolicy.h - /// - [Guid("bfb7ff88-7239-4fc9-8fa2-07c950be9c6d"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IAudioSessionControl2 : IAudioSessionControl - { - /// - /// Retrieves the current state of the audio session. - /// - /// Receives the current session state. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int GetState( - [Out] out AudioSessionState state); - - /// - /// Retrieves the display name for the audio session. - /// - /// Receives a string that contains the display name. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int GetDisplayName( - [Out] [MarshalAs(UnmanagedType.LPWStr)] out string displayName); - - /// - /// Assigns a display name to the current audio session. - /// - /// A string that contains the new display name for the session. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int SetDisplayName( - [In] [MarshalAs(UnmanagedType.LPWStr)] string displayName, - [In] [MarshalAs(UnmanagedType.LPStruct)] Guid eventContext); - - /// - /// Retrieves the path for the display icon for the audio session. - /// - /// Receives a string that specifies the fully qualified path of the file that contains the icon. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int GetIconPath( - [Out] [MarshalAs(UnmanagedType.LPWStr)] out string iconPath); - - /// - /// Assigns a display icon to the current session. - /// - /// A string that specifies the fully qualified path of the file that contains the new icon. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int SetIconPath( - [In] [MarshalAs(UnmanagedType.LPWStr)] string iconPath, - [In] [MarshalAs(UnmanagedType.LPStruct)] Guid eventContext); - - /// - /// Retrieves the grouping parameter of the audio session. - /// - /// Receives the grouping parameter ID. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int GetGroupingParam( - [Out] out Guid groupingId); - - /// - /// Assigns a session to a grouping of sessions. - /// - /// The new grouping parameter ID. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int SetGroupingParam( - [In] [MarshalAs(UnmanagedType.LPStruct)] Guid groupingId, - [In] [MarshalAs(UnmanagedType.LPStruct)] Guid eventContext); - - /// - /// Registers the client to receive notifications of session events, including changes in the session state. - /// - /// A client-implemented interface. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int RegisterAudioSessionNotification( - [In] IAudioSessionEvents client); - - /// - /// Deletes a previous registration by the client to receive notifications. - /// - /// A client-implemented interface. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int UnregisterAudioSessionNotification( - [In] IAudioSessionEvents client); - /// - /// Retrieves the identifier for the audio session. - /// - /// Receives the session identifier. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetSessionIdentifier( - [Out] [MarshalAs(UnmanagedType.LPWStr)] out string retVal); - - /// - /// Retrieves the identifier of the audio session instance. - /// - /// Receives the identifier of a particular instance. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetSessionInstanceIdentifier( - [Out] [MarshalAs(UnmanagedType.LPWStr)] out string retVal); - - /// - /// Retrieves the process identifier of the audio session. - /// - /// Receives the process identifier of the audio session. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetProcessId( - [Out] out UInt32 retVal); - - /// - /// Indicates whether the session is a system sounds session. - /// - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int IsSystemSoundsSession(); - - /// - /// Enables or disables the default stream attenuation experience (auto-ducking) provided by the system. - /// - /// A variable that enables or disables system auto-ducking. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int SetDuckingPreference(bool optOut); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionControl.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionControl.cs.meta deleted file mode 100644 index 2e000e2..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionControl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 10d7bb651d86c2e42bad2af0ac0e06ef -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEnumerator.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEnumerator.cs deleted file mode 100644 index b1214ef..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEnumerator.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.CoreAudioApi.Interfaces -{ - [Guid("E2F5BB11-0570-40CA-ACDD-3AA01277DEE8"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IAudioSessionEnumerator - { - int GetCount(out int sessionCount); - - int GetSession(int sessionCount, out IAudioSessionControl session); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEnumerator.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEnumerator.cs.meta deleted file mode 100644 index 026ea46..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEnumerator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f5f5ea1b27e646845934380be75b7f29 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEvents.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEvents.cs deleted file mode 100644 index 265b69e..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEvents.cs +++ /dev/null @@ -1,177 +0,0 @@ -// ----------------------------------------- -// SoundScribe (TM) and related software. -// -// Copyright (C) 2007-2011 Vannatech -// http://www.vannatech.com -// All rights reserved. -// -// This source code is subject to the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// ----------------------------------------- -// milligan22963 - ported to nAudio -// ----------------------------------------- - - using System; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// Defines constants that indicate the current state of an audio session. - /// - /// - /// MSDN Reference: http://msdn.microsoft.com/en-us/library/dd370792.aspx - /// - public enum AudioSessionState - { - /// - /// The audio session is inactive. - /// - AudioSessionStateInactive = 0, - - /// - /// The audio session is active. - /// - AudioSessionStateActive = 1, - - /// - /// The audio session has expired. - /// - AudioSessionStateExpired = 2 - } - - /// - /// Defines constants that indicate a reason for an audio session being disconnected. - /// - /// - /// MSDN Reference: Unknown - /// - public enum AudioSessionDisconnectReason - { - /// - /// The user removed the audio endpoint device. - /// - DisconnectReasonDeviceRemoval = 0, - - /// - /// The Windows audio service has stopped. - /// - DisconnectReasonServerShutdown = 1, - - /// - /// The stream format changed for the device that the audio session is connected to. - /// - DisconnectReasonFormatChanged = 2, - - /// - /// The user logged off the WTS session that the audio session was running in. - /// - DisconnectReasonSessionLogoff = 3, - - /// - /// The WTS session that the audio session was running in was disconnected. - /// - DisconnectReasonSessionDisconnected = 4, - - /// - /// The (shared-mode) audio session was disconnected to make the audio endpoint device available for an exclusive-mode connection. - /// - DisconnectReasonExclusiveModeOverride = 5 - } - - /// - /// Windows CoreAudio IAudioSessionControl interface - /// Defined in AudioPolicy.h - /// - [Guid("24918ACC-64B3-37C1-8CA9-74A66E9957A8"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IAudioSessionEvents - { - /// - /// Notifies the client that the display name for the session has changed. - /// - /// The new display name for the session. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int OnDisplayNameChanged( - [In] [MarshalAs(UnmanagedType.LPWStr)] string displayName, - [In] ref Guid eventContext); - - /// - /// Notifies the client that the display icon for the session has changed. - /// - /// The path for the new display icon for the session. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int OnIconPathChanged( - [In] [MarshalAs(UnmanagedType.LPWStr)] string iconPath, - [In] ref Guid eventContext); - - /// - /// Notifies the client that the volume level or muting state of the session has changed. - /// - /// The new volume level for the audio session. - /// The new muting state. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int OnSimpleVolumeChanged( - [In] [MarshalAs(UnmanagedType.R4)] float volume, - [In] [MarshalAs(UnmanagedType.Bool)] bool isMuted, - [In] ref Guid eventContext); - - /// - /// Notifies the client that the volume level of an audio channel in the session submix has changed. - /// - /// The channel count. - /// An array of volumnes cooresponding with each channel index. - /// The number of the channel whose volume level changed. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int OnChannelVolumeChanged( - [In] [MarshalAs(UnmanagedType.U4)] UInt32 channelCount, - [In] [MarshalAs(UnmanagedType.SysInt)] IntPtr newVolumes, // Pointer to float array - [In] [MarshalAs(UnmanagedType.U4)] UInt32 channelIndex, - [In] ref Guid eventContext); - - /// - /// Notifies the client that the grouping parameter for the session has changed. - /// - /// The new grouping parameter for the session. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int OnGroupingParamChanged( - [In] ref Guid groupingId, - [In] ref Guid eventContext); - - /// - /// Notifies the client that the stream-activity state of the session has changed. - /// - /// The new session state. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int OnStateChanged( - [In] AudioSessionState state); - - /// - /// Notifies the client that the session has been disconnected. - /// - /// The reason that the audio session was disconnected. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int OnSessionDisconnected( - [In] AudioSessionDisconnectReason disconnectReason); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEvents.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEvents.cs.meta deleted file mode 100644 index 938c6e2..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEvents.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 756a19b9791567d4d9a6843625e88f8a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEventsHandler.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEventsHandler.cs deleted file mode 100644 index bded890..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEventsHandler.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// interface to receive session related events - /// - public interface IAudioSessionEventsHandler - { - /// - /// notification of volume changes including muting of audio session - /// - /// the current volume - /// the current mute state, true muted, false otherwise - void OnVolumeChanged(float volume, bool isMuted); - - /// - /// notification of display name changed - /// - /// the current display name - void OnDisplayNameChanged(string displayName); - - /// - /// notification of icon path changed - /// - /// the current icon path - void OnIconPathChanged(string iconPath); - - /// - /// notification of the client that the volume level of an audio channel in the session submix has changed - /// - /// The channel count. - /// An array of volumnes cooresponding with each channel index. - /// The number of the channel whose volume level changed. - void OnChannelVolumeChanged(UInt32 channelCount, IntPtr newVolumes, UInt32 channelIndex); - - /// - /// notification of the client that the grouping parameter for the session has changed - /// - /// >The new grouping parameter for the session. - void OnGroupingParamChanged(ref Guid groupingId); - - /// - /// notification of the client that the stream-activity state of the session has changed - /// - /// The new session state. - void OnStateChanged(AudioSessionState state); - - /// - /// notification of the client that the session has been disconnected - /// - /// The reason that the audio session was disconnected. - void OnSessionDisconnected(AudioSessionDisconnectReason disconnectReason); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEventsHandler.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEventsHandler.cs.meta deleted file mode 100644 index 383e5a1..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEventsHandler.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: febc1575cb886674ba79033d68a10dfa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionManager.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionManager.cs deleted file mode 100644 index 7088778..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionManager.cs +++ /dev/null @@ -1,108 +0,0 @@ -// ----------------------------------------- -// SoundScribe (TM) and related software. -// -// Copyright (C) 2007-2011 Vannatech -// http://www.vannatech.com -// All rights reserved. -// -// This source code is subject to the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// ----------------------------------------- -// milligan22963 - ported to nAudio -// ----------------------------------------- - -using System; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// Windows CoreAudio IAudioSessionManager interface - /// Defined in AudioPolicy.h - /// - [Guid("BFA971F1-4D5E-40BB-935E-967039BFBEE4"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IAudioSessionManager - { - /// - /// Retrieves an audio session control. - /// - /// A new or existing session ID. - /// Audio session flags. - /// Receives an interface for the audio session. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetAudioSessionControl( - [In, Optional] [MarshalAs(UnmanagedType.LPStruct)] Guid sessionId, - [In] [MarshalAs(UnmanagedType.U4)] UInt32 streamFlags, - [Out] [MarshalAs(UnmanagedType.Interface)] out IAudioSessionControl sessionControl); - - /// - /// Retrieves a simple audio volume control. - /// - /// A new or existing session ID. - /// Audio session flags. - /// Receives an interface for the audio session. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetSimpleAudioVolume( - [In, Optional] [MarshalAs(UnmanagedType.LPStruct)] Guid sessionId, - [In] [MarshalAs(UnmanagedType.U4)] UInt32 streamFlags, - [Out] [MarshalAs(UnmanagedType.Interface)] out ISimpleAudioVolume audioVolume); - } - - - [Guid("77AA99A0-1BD6-484F-8BC7-2C654C9A9B6F"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IAudioSessionManager2 : IAudioSessionManager - { - /// - /// Retrieves an audio session control. - /// - /// A new or existing session ID. - /// Audio session flags. - /// Receives an interface for the audio session. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int GetAudioSessionControl( - [In, Optional] [MarshalAs(UnmanagedType.LPStruct)] Guid sessionId, - [In] [MarshalAs(UnmanagedType.U4)] UInt32 streamFlags, - [Out] [MarshalAs(UnmanagedType.Interface)] out IAudioSessionControl sessionControl); - - /// - /// Retrieves a simple audio volume control. - /// - /// A new or existing session ID. - /// Audio session flags. - /// Receives an interface for the audio session. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - new int GetSimpleAudioVolume( - [In, Optional] [MarshalAs(UnmanagedType.LPStruct)] Guid sessionId, - [In] [MarshalAs(UnmanagedType.U4)] UInt32 streamFlags, - [Out] [MarshalAs(UnmanagedType.Interface)] out ISimpleAudioVolume audioVolume); - - [PreserveSig] - int GetSessionEnumerator(out IAudioSessionEnumerator sessionEnum); - - [PreserveSig] - int RegisterSessionNotification(IAudioSessionNotification sessionNotification); - - [PreserveSig] - int UnregisterSessionNotification(IAudioSessionNotification sessionNotification); - - [PreserveSig] - int RegisterDuckNotification(string sessionID, IAudioSessionNotification audioVolumeDuckNotification); - - [PreserveSig] - int UnregisterDuckNotification(IntPtr audioVolumeDuckNotification); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionManager.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionManager.cs.meta deleted file mode 100644 index 3e2fdc5..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 348d124c9b377bf408292ba372c04593 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionNotification.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionNotification.cs deleted file mode 100644 index 44ec228..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionNotification.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// Windows CoreAudio IAudioSessionNotification interface - /// Defined in AudioPolicy.h - /// - [Guid("641DD20B-4D41-49CC-ABA3-174B9477BB08"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IAudioSessionNotification - { - - /// - /// - /// - /// session being added - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int OnSessionCreated(Interfaces.IAudioSessionControl newSession); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionNotification.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionNotification.cs.meta deleted file mode 100644 index 09015ad..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioSessionNotification.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cfc20ab6c5bc393459eda33207b3861b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioStreamVolume.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioStreamVolume.cs deleted file mode 100644 index 57b63af..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioStreamVolume.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.CoreAudioApi.Interfaces -{ - [Guid("93014887-242D-4068-8A15-CF5E93B90FE3"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IAudioStreamVolume - { - [PreserveSig] - int GetChannelCount( - [Out] out uint dwCount); - - [PreserveSig] - int SetChannelVolume( - [In] uint dwIndex, - [In] float fLevel); - - [PreserveSig] - int GetChannelVolume( - [In] uint dwIndex, - [Out] out float fLevel); - - [PreserveSig] - int SetAllVoumes( - [In] uint dwCount, - [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R4, SizeParamIndex=0)] float[] fVolumes); - - [PreserveSig] - int GetAllVolumes( - [In] uint dwCount, - [MarshalAs(UnmanagedType.LPArray)] float []pfVolumes); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioStreamVolume.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioStreamVolume.cs.meta deleted file mode 100644 index d05bac0..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IAudioStreamVolume.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 058a3f49ead001e438f1b7d3d825b44b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDevice.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDevice.cs deleted file mode 100644 index 274a099..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDevice.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - [Guid("D666063F-1587-4E43-81F1-B948E807363F"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IMMDevice - { - // activationParams is a propvariant - int Activate(ref Guid id, ClsCtx clsCtx, IntPtr activationParams, - [MarshalAs(UnmanagedType.IUnknown)] out object interfacePointer); - - int OpenPropertyStore(StorageAccessMode stgmAccess, out IPropertyStore properties); - - int GetId([MarshalAs(UnmanagedType.LPWStr)] out string id); - - int GetState(out DeviceState state); - } - -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDevice.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDevice.cs.meta deleted file mode 100644 index 47ca2bc..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDevice.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 569a918319126604eac209ad4717e2b6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceCollection.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceCollection.cs deleted file mode 100644 index 46f7da2..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceCollection.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - [Guid("0BD7A1BE-7A1A-44DB-8397-CC5392387B5E"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IMMDeviceCollection - { - int GetCount(out int numDevices); - int Item(int deviceNumber, out IMMDevice device); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceCollection.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceCollection.cs.meta deleted file mode 100644 index 6276baa..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceCollection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e4129df0355cf8c45858b9a6ef986947 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceEnumerator.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceEnumerator.cs deleted file mode 100644 index 49212d8..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceEnumerator.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - [Guid("A95664D2-9614-4F35-A746-DE8DB63617E6"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IMMDeviceEnumerator - { - int EnumAudioEndpoints(DataFlow dataFlow, DeviceState stateMask, - out IMMDeviceCollection devices); - - [PreserveSig] - int GetDefaultAudioEndpoint(DataFlow dataFlow, Role role, out IMMDevice endpoint); - - int GetDevice(string id, out IMMDevice deviceName); - - int RegisterEndpointNotificationCallback(IMMNotificationClient client); - - int UnregisterEndpointNotificationCallback(IMMNotificationClient client); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceEnumerator.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceEnumerator.cs.meta deleted file mode 100644 index 75ef005..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMDeviceEnumerator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5008e6326c00be84d82dd61c8259cce4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMEndpoint.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMEndpoint.cs deleted file mode 100644 index c2e710b..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMEndpoint.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// defined in MMDeviceAPI.h - /// - [Guid("1BE09788-6894-4089-8586-9A2A6C265AC5"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IMMEndpoint - { - int GetDataFlow(out DataFlow dataFlow); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMEndpoint.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMEndpoint.cs.meta deleted file mode 100644 index cf685ca..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMEndpoint.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 56c31026fd70ea145a9c8cbd714c7c45 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMNotificationClient.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMNotificationClient.cs deleted file mode 100644 index 23adc95..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMNotificationClient.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// IMMNotificationClient - /// - [Guid("7991EEC9-7E89-4D85-8390-6C703CEC60C0"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IMMNotificationClient - { - /// - /// Device State Changed - /// - void OnDeviceStateChanged([MarshalAs(UnmanagedType.LPWStr)] string deviceId, [MarshalAs(UnmanagedType.I4)] DeviceState newState); - - /// - /// Device Added - /// - void OnDeviceAdded([MarshalAs(UnmanagedType.LPWStr)] string pwstrDeviceId); - - /// - /// Device Removed - /// - void OnDeviceRemoved([MarshalAs(UnmanagedType.LPWStr)] string deviceId); - - /// - /// Default Device Changed - /// - void OnDefaultDeviceChanged(DataFlow flow, Role role, [MarshalAs(UnmanagedType.LPWStr)] string defaultDeviceId); - - /// - /// Property Value Changed - /// - /// - /// - void OnPropertyValueChanged([MarshalAs(UnmanagedType.LPWStr)] string pwstrDeviceId, PropertyKey key); - } - -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMNotificationClient.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMNotificationClient.cs.meta deleted file mode 100644 index 088e498..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IMMNotificationClient.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2c08f742057da714c848e3f42e565118 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IPropertyStore.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IPropertyStore.cs deleted file mode 100644 index 8ab141f..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IPropertyStore.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// is defined in propsys.h - /// - [Guid("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IPropertyStore - { - int GetCount(out int propCount); - int GetAt(int property, out PropertyKey key); - int GetValue(ref PropertyKey key, out PropVariant value); - int SetValue(ref PropertyKey key, ref PropVariant value); - int Commit(); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IPropertyStore.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IPropertyStore.cs.meta deleted file mode 100644 index d4607e8..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/IPropertyStore.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 67de0ea47879f1f40b2a67d035035c38 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ISimpleAudioVolume.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ISimpleAudioVolume.cs deleted file mode 100644 index 06c54b8..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ISimpleAudioVolume.cs +++ /dev/null @@ -1,75 +0,0 @@ -// ----------------------------------------- -// SoundScribe (TM) and related software. -// -// Copyright (C) 2007-2011 Vannatech -// http://www.vannatech.com -// All rights reserved. -// -// This source code is subject to the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// ----------------------------------------- -// milligan22963 - ported to nAudio -// ----------------------------------------- - -using System; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// Windows CoreAudio ISimpleAudioVolume interface - /// Defined in AudioClient.h - /// - [Guid("87CE5498-68D6-44E5-9215-6DA47EF883D8"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface ISimpleAudioVolume - { - /// - /// Sets the master volume level for the audio session. - /// - /// The new volume level expressed as a normalized value between 0.0 and 1.0. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int SetMasterVolume( - [In] [MarshalAs(UnmanagedType.R4)] float levelNorm, - [In] [MarshalAs(UnmanagedType.LPStruct)] Guid eventContext); - - /// - /// Retrieves the client volume level for the audio session. - /// - /// Receives the volume level expressed as a normalized value between 0.0 and 1.0. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetMasterVolume( - [Out] [MarshalAs(UnmanagedType.R4)] out float levelNorm); - - /// - /// Sets the muting state for the audio session. - /// - /// The new muting state. - /// A user context value that is passed to the notification callback. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int SetMute( - [In] [MarshalAs(UnmanagedType.Bool)] bool isMuted, - [In] [MarshalAs(UnmanagedType.LPStruct)] Guid eventContext); - - /// - /// Retrieves the current muting state for the audio session. - /// - /// Receives the muting state. - /// An HRESULT code indicating whether the operation succeeded of failed. - [PreserveSig] - int GetMute( - [Out] [MarshalAs(UnmanagedType.Bool)] out bool isMuted); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ISimpleAudioVolume.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ISimpleAudioVolume.cs.meta deleted file mode 100644 index 35f877f..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/ISimpleAudioVolume.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aa2d7af49adccb4438e608bae80848ce -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/MMDeviceEnumeratorComObject.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/MMDeviceEnumeratorComObject.cs deleted file mode 100644 index d940eb7..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/MMDeviceEnumeratorComObject.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// implements IMMDeviceEnumerator - /// - [ComImport, Guid("BCDE0395-E52F-467C-8E3D-C4579291692E")] - class MMDeviceEnumeratorComObject - { - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/MMDeviceEnumeratorComObject.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/MMDeviceEnumeratorComObject.cs.meta deleted file mode 100644 index 40836e4..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/MMDeviceEnumeratorComObject.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 60b8f7ee48744fa448125f454e1659b2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/StorageAccessMode.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/StorageAccessMode.cs deleted file mode 100644 index ae111f5..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/StorageAccessMode.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// MMDevice STGM enumeration - /// - public enum StorageAccessMode - { - /// - /// Read-only access mode. - /// - Read, - /// - /// Write-only access mode. - /// - Write, - /// - /// Read-write access mode. - /// - ReadWrite - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/StorageAccessMode.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/StorageAccessMode.cs.meta deleted file mode 100644 index 2e114e3..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Interfaces/StorageAccessMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 489391db92480f04582dcdbdfa3494e7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDevice.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDevice.cs deleted file mode 100644 index de5e41e..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDevice.cs +++ /dev/null @@ -1,301 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -// modified for NAudio -// milligan22963 - updated to include audio session manager - -using System; -using NAudio.CoreAudioApi.Interfaces; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// MM Device - /// - public class MMDevice : IDisposable - { - #region Variables - private readonly IMMDevice deviceInterface; - private PropertyStore propertyStore; - private AudioMeterInformation audioMeterInformation; - private AudioEndpointVolume audioEndpointVolume; - private AudioSessionManager audioSessionManager; - #endregion - - #region Guids - private static Guid IID_IAudioMeterInformation = new Guid("C02216F6-8C67-4B5B-9D00-D008E73E0064"); - private static Guid IID_IAudioEndpointVolume = new Guid("5CDF2C82-841E-4546-9722-0CF74078229A"); - private static Guid IID_IAudioClient = new Guid("1CB9AD4C-DBFA-4c32-B178-C2F568A703B2"); - private static Guid IDD_IAudioSessionManager = new Guid("BFA971F1-4D5E-40BB-935E-967039BFBEE4"); - #endregion - - #region Init - /// - /// Initializes the device's property store. - /// - /// The storage-access mode to open store for. - /// Administrative client is required for Write and ReadWrite modes. - public void GetPropertyInformation(StorageAccessMode stgmAccess = StorageAccessMode.Read) - { - IPropertyStore propstore; - Marshal.ThrowExceptionForHR(deviceInterface.OpenPropertyStore(stgmAccess, out propstore)); - propertyStore = new PropertyStore(propstore); - } - - private AudioClient GetAudioClient() - { - object result; - Marshal.ThrowExceptionForHR(deviceInterface.Activate(ref IID_IAudioClient, ClsCtx.ALL, IntPtr.Zero, out result)); - return new AudioClient(result as IAudioClient); - } - - private void GetAudioMeterInformation() - { - object result; - Marshal.ThrowExceptionForHR(deviceInterface.Activate(ref IID_IAudioMeterInformation, ClsCtx.ALL, IntPtr.Zero, out result)); - audioMeterInformation = new AudioMeterInformation(result as IAudioMeterInformation); - } - - private void GetAudioEndpointVolume() - { - object result; - Marshal.ThrowExceptionForHR(deviceInterface.Activate(ref IID_IAudioEndpointVolume, ClsCtx.ALL, IntPtr.Zero, out result)); - audioEndpointVolume = new AudioEndpointVolume(result as IAudioEndpointVolume); - } - - private void GetAudioSessionManager() - { - object result; - Marshal.ThrowExceptionForHR(deviceInterface.Activate(ref IDD_IAudioSessionManager, ClsCtx.ALL, IntPtr.Zero, out result)); - audioSessionManager = new AudioSessionManager(result as IAudioSessionManager); - } - #endregion - - #region Properties - - /// - /// Audio Client - /// - public AudioClient AudioClient - { - get - { - // now makes a new one each call to allow caller to manage when to dispose - // n.b. should probably not be a property anymore - return GetAudioClient(); - } - } - - /// - /// Audio Meter Information - /// - public AudioMeterInformation AudioMeterInformation - { - get - { - if (audioMeterInformation == null) - GetAudioMeterInformation(); - - return audioMeterInformation; - } - } - - /// - /// Audio Endpoint Volume - /// - public AudioEndpointVolume AudioEndpointVolume - { - get - { - if (audioEndpointVolume == null) - GetAudioEndpointVolume(); - - return audioEndpointVolume; - } - } - - /// - /// AudioSessionManager instance - /// - public AudioSessionManager AudioSessionManager - { - get - { - if (audioSessionManager == null) - { - GetAudioSessionManager(); - } - return audioSessionManager; - } - } - - /// - /// Properties - /// - public PropertyStore Properties - { - get - { - if (propertyStore == null) - GetPropertyInformation(); - return propertyStore; - } - } - - /// - /// Friendly name for the endpoint - /// - public string FriendlyName - { - get - { - if (propertyStore == null) - { - GetPropertyInformation(); - } - if (propertyStore.Contains(PropertyKeys.PKEY_Device_FriendlyName)) - { - return (string)propertyStore[PropertyKeys.PKEY_Device_FriendlyName].Value; - } - else - return "Unknown"; - } - } - - /// - /// Friendly name of device - /// - public string DeviceFriendlyName - { - get - { - if (propertyStore == null) - { - GetPropertyInformation(); - } - if (propertyStore.Contains(PropertyKeys.PKEY_DeviceInterface_FriendlyName)) - { - return (string)propertyStore[PropertyKeys.PKEY_DeviceInterface_FriendlyName].Value; - } - else - { - return "Unknown"; - } - } - } - - /// - /// Icon path of device - /// - public string IconPath - { - get - { - if (propertyStore == null) - { - GetPropertyInformation(); - } - if (propertyStore.Contains(PropertyKeys.PKEY_Device_IconPath)) - { - return (string)propertyStore[PropertyKeys.PKEY_Device_IconPath].Value; - } - else - return "Unknown"; - } - } - - /// - /// Device ID - /// - public string ID - { - get - { - string result; - Marshal.ThrowExceptionForHR(deviceInterface.GetId(out result)); - return result; - } - } - - /// - /// Data Flow - /// - public DataFlow DataFlow - { - get - { - DataFlow result; - var ep = deviceInterface as IMMEndpoint; - ep.GetDataFlow(out result); - return result; - } - } - - /// - /// Device State - /// - public DeviceState State - { - get - { - DeviceState result; - Marshal.ThrowExceptionForHR(deviceInterface.GetState(out result)); - return result; - } - } - - #endregion - - #region Constructor - internal MMDevice(IMMDevice realDevice) - { - deviceInterface = realDevice; - } - #endregion - - /// - /// To string - /// - public override string ToString() - { - return FriendlyName; - } - - /// - /// Dispose - /// - public void Dispose() - { - this.audioEndpointVolume?.Dispose(); - this.audioSessionManager?.Dispose(); - GC.SuppressFinalize(this); - } - - /// - /// Finalizer - /// - ~MMDevice() - { - Dispose(); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDevice.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDevice.cs.meta deleted file mode 100644 index 72934be..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDevice.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1a1c4eaba2ff347448f8d0047ffa2121 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceCollection.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceCollection.cs deleted file mode 100644 index 7a02317..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceCollection.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -// updated for NAudio -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.CoreAudioApi -{ - /// - /// Multimedia Device Collection - /// - public class MMDeviceCollection : IEnumerable - { - private IMMDeviceCollection _MMDeviceCollection; - - /// - /// Device count - /// - public int Count - { - get - { - int result; - Marshal.ThrowExceptionForHR(_MMDeviceCollection.GetCount(out result)); - return result; - } - } - - /// - /// Get device by index - /// - /// Device index - /// Device at the specified index - public MMDevice this[int index] - { - get - { - IMMDevice result; - _MMDeviceCollection.Item(index, out result); - return new MMDevice(result); - } - } - - internal MMDeviceCollection(IMMDeviceCollection parent) - { - _MMDeviceCollection = parent; - } - - #region IEnumerable Members - - /// - /// Get Enumerator - /// - /// Device enumerator - public IEnumerator GetEnumerator() - { - for (int index = 0; index < Count; index++) - { - yield return this[index]; - } - } - - #endregion - - #region IEnumerable Members - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceCollection.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceCollection.cs.meta deleted file mode 100644 index 747d82b..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceCollection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e246e9d02f9bf8e49a97bb6cb9b78d18 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceEnumerator.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceEnumerator.cs deleted file mode 100644 index aa77111..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceEnumerator.cs +++ /dev/null @@ -1,157 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -// updated for use in NAudio -using System; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.CoreAudioApi -{ - - /// - /// MM Device Enumerator - /// - public class MMDeviceEnumerator : IDisposable - { - private IMMDeviceEnumerator realEnumerator; - - /// - /// Creates a new MM Device Enumerator - /// - public MMDeviceEnumerator() - { -#if !NETFX_CORE - if (System.Environment.OSVersion.Version.Major < 6) - { - throw new NotSupportedException("This functionality is only supported on Windows Vista or newer."); - } -#endif - realEnumerator = new MMDeviceEnumeratorComObject() as IMMDeviceEnumerator; - } - - /// - /// Enumerate Audio Endpoints - /// - /// Desired DataFlow - /// State Mask - /// Device Collection - public MMDeviceCollection EnumerateAudioEndPoints(DataFlow dataFlow, DeviceState dwStateMask) - { - IMMDeviceCollection result; - Marshal.ThrowExceptionForHR(realEnumerator.EnumAudioEndpoints(dataFlow, dwStateMask, out result)); - return new MMDeviceCollection(result); - } - - /// - /// Get Default Endpoint - /// - /// Data Flow - /// Role - /// Device - public MMDevice GetDefaultAudioEndpoint(DataFlow dataFlow, Role role) - { - IMMDevice device = null; - Marshal.ThrowExceptionForHR(((IMMDeviceEnumerator)realEnumerator).GetDefaultAudioEndpoint(dataFlow, role, out device)); - return new MMDevice(device); - } - - /// - /// Check to see if a default audio end point exists without needing an exception. - /// - /// Data Flow - /// Role - /// True if one exists, and false if one does not exist. - public bool HasDefaultAudioEndpoint(DataFlow dataFlow, Role role) - { - const int E_NOTFOUND = unchecked((int)0x80070490); - IMMDevice device = null; - int hresult = ((IMMDeviceEnumerator)realEnumerator).GetDefaultAudioEndpoint(dataFlow, role, out device); - if (hresult == 0x0) - { - Marshal.ReleaseComObject(device); - return true; - } - if (hresult == E_NOTFOUND) - { - return false; - } - Marshal.ThrowExceptionForHR(hresult); - return false; - } - - /// - /// Get device by ID - /// - /// Device ID - /// Device - public MMDevice GetDevice(string id) - { - IMMDevice device = null; - Marshal.ThrowExceptionForHR(((IMMDeviceEnumerator)realEnumerator).GetDevice(id, out device)); - return new MMDevice(device); - } - - /// - /// Registers a call back for Device Events - /// - /// Object implementing IMMNotificationClient type casted as IMMNotificationClient interface - /// - public int RegisterEndpointNotificationCallback([In] [MarshalAs(UnmanagedType.Interface)] IMMNotificationClient client) - { - return realEnumerator.RegisterEndpointNotificationCallback(client); - } - - /// - /// Unregisters a call back for Device Events - /// - /// Object implementing IMMNotificationClient type casted as IMMNotificationClient interface - /// - public int UnregisterEndpointNotificationCallback([In] [MarshalAs(UnmanagedType.Interface)] IMMNotificationClient client) - { - return realEnumerator.UnregisterEndpointNotificationCallback(client); - } - - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Called to dispose/finalize contained objects. - /// - /// True if disposing, false if called from a finalizer. - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - if (realEnumerator != null) - { - // although GC would do this for us, we want it done now - Marshal.ReleaseComObject(realEnumerator); - realEnumerator = null; - } - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceEnumerator.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceEnumerator.cs.meta deleted file mode 100644 index 256b9ea..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/MMDeviceEnumerator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ceee8643fd32aae4ebf04138719cc920 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariant.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariant.cs deleted file mode 100644 index 4618c36..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariant.cs +++ /dev/null @@ -1,291 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -// adapted for use in NAudio -using System; -using System.IO; -using System.Runtime.InteropServices; -using NAudio.Utils; - -namespace NAudio.CoreAudioApi.Interfaces -{ - /// - /// from Propidl.h. - /// http://msdn.microsoft.com/en-us/library/aa380072(VS.85).aspx - /// contains a union so we have to do an explicit layout - /// - [StructLayout(LayoutKind.Explicit)] - public struct PropVariant - { - /// - /// Value type tag. - /// - [FieldOffset(0)] public short vt; - /// - /// Reserved1. - /// - [FieldOffset(2)] public short wReserved1; - /// - /// Reserved2. - /// - [FieldOffset(4)] public short wReserved2; - /// - /// Reserved3. - /// - [FieldOffset(6)] public short wReserved3; - /// - /// cVal. - /// - [FieldOffset(8)] public sbyte cVal; - /// - /// bVal. - /// - [FieldOffset(8)] public byte bVal; - /// - /// iVal. - /// - [FieldOffset(8)] public short iVal; - /// - /// uiVal. - /// - [FieldOffset(8)] public ushort uiVal; - /// - /// lVal. - /// - [FieldOffset(8)] public int lVal; - /// - /// ulVal. - /// - [FieldOffset(8)] public uint ulVal; - /// - /// intVal. - /// - [FieldOffset(8)] public int intVal; - /// - /// uintVal. - /// - [FieldOffset(8)] public uint uintVal; - /// - /// hVal. - /// - [FieldOffset(8)] public long hVal; - /// - /// uhVal. - /// - [FieldOffset(8)] public long uhVal; - /// - /// fltVal. - /// - [FieldOffset(8)] public float fltVal; - /// - /// dblVal. - /// - [FieldOffset(8)] public double dblVal; - //VARIANT_BOOL boolVal; - /// - /// boolVal. - /// - [FieldOffset(8)] public short boolVal; - /// - /// scode. - /// - [FieldOffset(8)] public int scode; - //CY cyVal; - //[FieldOffset(8)] private DateTime date; - can cause issues with invalid value - /// - /// Date time. - /// - [FieldOffset(8)] public System.Runtime.InteropServices.ComTypes.FILETIME filetime; - //CLSID* puuid; - //CLIPDATA* pclipdata; - //BSTR bstrVal; - //BSTRBLOB bstrblobVal; - /// - /// Binary large object. - /// - [FieldOffset(8)] public Blob blobVal; - //LPSTR pszVal; - /// - /// Pointer value. - /// - [FieldOffset(8)] public IntPtr pointerValue; //LPWSTR - //IUnknown* punkVal; - /*IDispatch* pdispVal; - IStream* pStream; - IStorage* pStorage; - LPVERSIONEDSTREAM pVersionedStream; - LPSAFEARRAY parray; - CAC cac; - CAUB caub; - CAI cai; - CAUI caui; - CAL cal; - CAUL caul; - CAH cah; - CAUH cauh; - CAFLT caflt; - CADBL cadbl; - CABOOL cabool; - CASCODE cascode; - CACY cacy; - CADATE cadate; - CAFILETIME cafiletime; - CACLSID cauuid; - CACLIPDATA caclipdata; - CABSTR cabstr; - CABSTRBLOB cabstrblob; - CALPSTR calpstr; - CALPWSTR calpwstr; - CAPROPVARIANT capropvar; - CHAR* pcVal; - UCHAR* pbVal; - SHORT* piVal; - USHORT* puiVal; - LONG* plVal; - ULONG* pulVal; - INT* pintVal; - UINT* puintVal; - FLOAT* pfltVal; - DOUBLE* pdblVal; - VARIANT_BOOL* pboolVal; - DECIMAL* pdecVal; - SCODE* pscode; - CY* pcyVal; - DATE* pdate; - BSTR* pbstrVal; - IUnknown** ppunkVal; - IDispatch** ppdispVal; - LPSAFEARRAY* pparray; - PROPVARIANT* pvarVal; - */ - - /// - /// Creates a new PropVariant containing a long value - /// - public static PropVariant FromLong(long value) - { - return new PropVariant() {vt = (short) VarEnum.VT_I8, hVal = value}; - } - - /// - /// Helper method to gets blob data - /// - private byte[] GetBlob() - { - var blob = new byte[blobVal.Length]; - Marshal.Copy(blobVal.Data, blob, 0, blob.Length); - return blob; - } - - /// - /// Interprets a blob as an array of structs - /// - public T[] GetBlobAsArrayOf() - { - var blobByteLength = blobVal.Length; - var singleInstance = (T) Activator.CreateInstance(typeof (T)); - var structSize = Marshal.SizeOf(singleInstance); - if (blobByteLength%structSize != 0) - { - throw new InvalidDataException(String.Format("Blob size {0} not a multiple of struct size {1}", blobByteLength, structSize)); - } - var items = blobByteLength/structSize; - var array = new T[items]; - for (int n = 0; n < items; n++) - { - array[n] = (T) Activator.CreateInstance(typeof (T)); - Marshal.PtrToStructure(new IntPtr((long) blobVal.Data + n*structSize), array[n]); - } - return array; - } - - /// - /// Gets the type of data in this PropVariant - /// - public VarEnum DataType - { - get { return (VarEnum) vt; } - } - - /// - /// Property value - /// - public object Value - { - get - { - VarEnum ve = DataType; - switch (ve) - { - case VarEnum.VT_I1: - return bVal; - case VarEnum.VT_I2: - return iVal; - case VarEnum.VT_I4: - return lVal; - case VarEnum.VT_I8: - return hVal; - case VarEnum.VT_INT: - return iVal; - case VarEnum.VT_UI4: - return ulVal; - case VarEnum.VT_UI8: - return uhVal; - case VarEnum.VT_LPWSTR: - return Marshal.PtrToStringUni(pointerValue); - case VarEnum.VT_BLOB: - case VarEnum.VT_VECTOR | VarEnum.VT_UI1: - return GetBlob(); - case VarEnum.VT_CLSID: - return MarshalHelpers.PtrToStructure(pointerValue); - case VarEnum.VT_BOOL: - switch (boolVal) - { - case -1: - return true; - case 0: - return false; - default: - throw new NotSupportedException("PropVariant VT_BOOL must be either -1 or 0"); - } - } - throw new NotImplementedException("PropVariant " + ve); - } - } - - /// - /// allows freeing up memory, might turn this into a Dispose method? - /// - [Obsolete("Call with pointer instead")] - public void Clear() - { - PropVariantNative.PropVariantClear(ref this); - } - - /// - /// Clears with a known pointer - /// - public static void Clear(IntPtr ptr) - { - PropVariantNative.PropVariantClear(ptr); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariant.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariant.cs.meta deleted file mode 100644 index 9dd5fb6..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariant.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dd322cae3c1481c4eb6b8b8de09dcc1a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariantNative.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariantNative.cs deleted file mode 100644 index 6e6b810..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariantNative.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi.Interfaces -{ - class PropVariantNative - { - [DllImport("ole32.dll")] - internal static extern int PropVariantClear(ref PropVariant pvar); - - [DllImport("ole32.dll")] - internal static extern int PropVariantClear(IntPtr pvar); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariantNative.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariantNative.cs.meta deleted file mode 100644 index 01b6c78..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropVariantNative.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5cb81d393c9856e41b95343f90b2abaa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKey.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKey.cs deleted file mode 100644 index 2440b9b..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKey.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// PROPERTYKEY is defined in wtypes.h - /// - public struct PropertyKey - { - /// - /// Format ID - /// - public Guid formatId; - /// - /// Property ID - /// - public int propertyId; - /// - /// - /// - /// - public PropertyKey(Guid formatId, int propertyId) - { - this.formatId = formatId; - this.propertyId = propertyId; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKey.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKey.cs.meta deleted file mode 100644 index 1add69f..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKey.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8d536b40c8aa9e2418c0e0deabd73cb7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKeys.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKeys.cs deleted file mode 100644 index f8a57a0..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKeys.cs +++ /dev/null @@ -1,100 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// Property Keys - /// - public static class PropertyKeys - { - /// - /// PKEY_DeviceInterface_FriendlyName - /// - public static readonly PropertyKey PKEY_DeviceInterface_FriendlyName = new PropertyKey(new Guid(0x026e516e, unchecked((short)0xb814), 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22), 2); - /// - /// PKEY_AudioEndpoint_FormFactor - /// - public static readonly PropertyKey PKEY_AudioEndpoint_FormFactor = new PropertyKey(new Guid(0x1da5d803, unchecked((short)0xd492), 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e), 0); - /// - /// PKEY_AudioEndpoint_ControlPanelPageProvider - /// - public static readonly PropertyKey PKEY_AudioEndpoint_ControlPanelPageProvider = new PropertyKey(new Guid(0x1da5d803, unchecked((short)0xd492), 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e), 1); - /// - /// PKEY_AudioEndpoint_Association - /// - public static readonly PropertyKey PKEY_AudioEndpoint_Association = new PropertyKey(new Guid(0x1da5d803, unchecked((short)0xd492), 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e), 2); - /// - /// PKEY_AudioEndpoint_PhysicalSpeakers - /// - public static readonly PropertyKey PKEY_AudioEndpoint_PhysicalSpeakers = new PropertyKey(new Guid(0x1da5d803, unchecked((short)0xd492), 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e), 3); - /// - /// PKEY_AudioEndpoint_GUID - /// - public static readonly PropertyKey PKEY_AudioEndpoint_GUID = new PropertyKey(new Guid(0x1da5d803, unchecked((short)0xd492), 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e), 4); - /// - /// PKEY_AudioEndpoint_Disable_SysFx - /// - public static readonly PropertyKey PKEY_AudioEndpoint_Disable_SysFx = new PropertyKey(new Guid(0x1da5d803, unchecked((short)0xd492), 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e), 5); - /// - /// PKEY_AudioEndpoint_FullRangeSpeakers - /// - public static readonly PropertyKey PKEY_AudioEndpoint_FullRangeSpeakers = new PropertyKey(new Guid(0x1da5d803, unchecked((short)0xd492), 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e), 6); - /// - /// PKEY_AudioEndpoint_Supports_EventDriven_Mode - /// - public static readonly PropertyKey PKEY_AudioEndpoint_Supports_EventDriven_Mode = new PropertyKey(new Guid(0x1da5d803, unchecked((short)0xd492), 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e), 7); - /// - /// PKEY_AudioEndpoint_JackSubType - /// - public static readonly PropertyKey PKEY_AudioEndpoint_JackSubType = new PropertyKey(new Guid(0x1da5d803, unchecked((short)0xd492), 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e), 8); - /// - /// PKEY_AudioEngine_DeviceFormat - /// - public static readonly PropertyKey PKEY_AudioEngine_DeviceFormat = new PropertyKey(new Guid(unchecked((int)0xf19f064d), 0x82c, 0x4e27, 0xbc, 0x73, 0x68, 0x82, 0xa1, 0xbb, 0x8e, 0x4c), 0); - /// - /// PKEY_AudioEngine_OEMFormat - /// - public static readonly PropertyKey PKEY_AudioEngine_OEMFormat = new PropertyKey(new Guid(unchecked((int)0xe4870e26), 0x3cc5, 0x4cd2, 0xba, 0x46, 0xca, 0xa, 0x9a, 0x70, 0xed, 0x4), 3); - /// - /// PKEY _Devie_FriendlyName - /// - public static readonly PropertyKey PKEY_Device_FriendlyName = new PropertyKey(new Guid(unchecked((int)0xa45c254e), unchecked((short)0xdf1c), 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0), 14); - /// - /// PKEY _Device_IconPath - /// - public static readonly PropertyKey PKEY_Device_IconPath = new PropertyKey(new Guid(unchecked((int)0x259abffc), unchecked((short)0x50a7), 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66), 12); - /// - /// Device description property. - /// - public static readonly PropertyKey PKEY_Device_DeviceDesc = new PropertyKey(new Guid(unchecked((int)0xa45c254e), unchecked((short)0xdf1c), 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0), 2); - /// - /// Id of controller device for endpoint device property. - /// - public static readonly PropertyKey PKEY_Device_ControllerDeviceId = new PropertyKey(new Guid(unchecked((int)0xb3f8fa53), unchecked((short)0x0004), 0x438e, 0x90, 0x03, 0x51, 0xa4, 0x6e, 0x13, 0x9b, 0xfc), 2); - /// - /// Device interface key property. - /// - public static readonly PropertyKey PKEY_Device_InterfaceKey = new PropertyKey(new Guid(unchecked((int)0x233164c8), unchecked((short)0x1b2c), 0x4c7d, 0xbc, 0x68, 0xb6, 0x71, 0x68, 0x7a, 0x25, 0x67), 1); - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKeys.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKeys.cs.meta deleted file mode 100644 index 08772ed..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyKeys.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 01ff2848e210abe4a90e0f254083e6aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStore.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStore.cs deleted file mode 100644 index 12e19a7..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStore.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -// this version modified for NAudio from Ray Molenkamp's original -using System; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.CoreAudioApi -{ - /// - /// Property Store class, only supports reading properties at the moment. - /// - public class PropertyStore - { - private readonly IPropertyStore storeInterface; - - /// - /// Property Count - /// - public int Count - { - get - { - int result; - Marshal.ThrowExceptionForHR(storeInterface.GetCount(out result)); - return result; - } - } - - /// - /// Gets property by index - /// - /// Property index - /// The property - public PropertyStoreProperty this[int index] - { - get - { - PropVariant result; - PropertyKey key = Get(index); - Marshal.ThrowExceptionForHR(storeInterface.GetValue(ref key, out result)); - return new PropertyStoreProperty(key, result); - } - } - - /// - /// Contains property guid - /// - /// Looks for a specific key - /// True if found - public bool Contains(PropertyKey key) - { - for (int i = 0; i < Count; i++) - { - PropertyKey ikey = Get(i); - if ((ikey.formatId == key.formatId) && (ikey.propertyId == key.propertyId)) - { - return true; - } - } - return false; - } - - /// - /// Indexer by guid - /// - /// Property Key - /// Property or null if not found - public PropertyStoreProperty this[PropertyKey key] - { - get - { - PropVariant result; - for (int i = 0; i < Count; i++) - { - PropertyKey ikey = Get(i); - if ((ikey.formatId == key.formatId) && (ikey.propertyId == key.propertyId)) - { - Marshal.ThrowExceptionForHR(storeInterface.GetValue(ref ikey, out result)); - return new PropertyStoreProperty(ikey, result); - } - } - return null; - } - } - - /// - /// Gets property key at sepecified index - /// - /// Index - /// Property key - public PropertyKey Get(int index) - { - PropertyKey key; - Marshal.ThrowExceptionForHR(storeInterface.GetAt(index, out key)); - return key; - } - - /// - /// Gets property value at specified index - /// - /// Index - /// Property value - public PropVariant GetValue(int index) - { - PropVariant result; - PropertyKey key = Get(index); - Marshal.ThrowExceptionForHR(storeInterface.GetValue(ref key, out result)); - return result; - } - - /// - /// Sets property value at specified key. - /// - /// Key of property to set. - /// Value to write. - public void SetValue(PropertyKey key, PropVariant value) - { - Marshal.ThrowExceptionForHR(storeInterface.SetValue(ref key, ref value)); - } - - /// - /// Saves a property change. - /// - public void Commit() - { - Marshal.ThrowExceptionForHR(storeInterface.Commit()); - } - - /// - /// Creates a new property store - /// - /// IPropertyStore COM interface - internal PropertyStore(IPropertyStore store) - { - this.storeInterface = store; - } - } -} - diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStore.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStore.cs.meta deleted file mode 100644 index 87ff328..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStore.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a335dfb3a9620c74692fd2b8b119dbab -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStoreProperty.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStoreProperty.cs deleted file mode 100644 index e6c7608..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStoreProperty.cs +++ /dev/null @@ -1,61 +0,0 @@ -/* - LICENSE - ------- - Copyright (C) 2007 Ray Molenkamp - - This source code is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this source code or the software it produces. - - Permission is granted to anyone to use this source code for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - 3. This notice may not be removed or altered from any source distribution. -*/ -// modified from Ray Molenkamp's original - - -using System; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.CoreAudioApi -{ - /// - /// Property Store Property - /// - public class PropertyStoreProperty - { - private readonly PropertyKey propertyKey; - private PropVariant propertyValue; - - internal PropertyStoreProperty(PropertyKey key, PropVariant value) - { - propertyKey = key; - propertyValue = value; - } - - /// - /// Property Key - /// - public PropertyKey Key - { - get { return propertyKey; } - } - - /// - /// Property Value - /// - public object Value - { - get { return propertyValue.Value; } - } - } -} - diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStoreProperty.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStoreProperty.cs.meta deleted file mode 100644 index 5855090..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/PropertyStoreProperty.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 293ef2c200b7f5f48bcaf4b2d371dee7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Role.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Role.cs deleted file mode 100644 index b0df7a4..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Role.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; - -namespace NAudio.CoreAudioApi -{ - /// - /// The ERole enumeration defines constants that indicate the role - /// that the system has assigned to an audio endpoint device - /// - public enum Role - { - /// - /// Games, system notification sounds, and voice commands. - /// - Console, - - /// - /// Music, movies, narration, and live music recording - /// - Multimedia, - - /// - /// Voice communications (talking to another person). - /// - Communications, - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Role.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/Role.cs.meta deleted file mode 100644 index d280609..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/Role.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d80ea710685b3a04aba5f56fa4912422 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/SessionCollection.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/SessionCollection.cs deleted file mode 100644 index 6a485ab..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/SessionCollection.cs +++ /dev/null @@ -1,48 +0,0 @@ -using NAudio.CoreAudioApi.Interfaces; -using System; -using System.Linq; -using System.Runtime.InteropServices; - -namespace NAudio.CoreAudioApi -{ - /// - /// Collection of sessions. - /// - public class SessionCollection - { - readonly IAudioSessionEnumerator audioSessionEnumerator; - - internal SessionCollection(IAudioSessionEnumerator realEnumerator) - { - audioSessionEnumerator = realEnumerator; - } - - /// - /// Returns session at index. - /// - /// - /// - public AudioSessionControl this[int index] - { - get - { - IAudioSessionControl result; - Marshal.ThrowExceptionForHR(audioSessionEnumerator.GetSession(index, out result)); - return new AudioSessionControl(result); - } - } - - /// - /// Number of current sessions. - /// - public int Count - { - get - { - int result; - Marshal.ThrowExceptionForHR(audioSessionEnumerator.GetCount(out result)); - return result; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/SessionCollection.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/SessionCollection.cs.meta deleted file mode 100644 index bf2e543..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/SessionCollection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 07d8adc71ed682641b091cf718ce75a2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/SimpleAudioVolume.cs b/Assets/Scripts/Audio/NAudio/CoreAudioApi/SimpleAudioVolume.cs deleted file mode 100644 index 8867b37..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/SimpleAudioVolume.cs +++ /dev/null @@ -1,89 +0,0 @@ -// ----------------------------------------- -// milligan22963 - implemented to work with nAudio -// 12/2014 -// ----------------------------------------- - -using System; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.CoreAudioApi -{ - /// - /// Windows CoreAudio SimpleAudioVolume - /// - public class SimpleAudioVolume : IDisposable - { - private readonly ISimpleAudioVolume simpleAudioVolume; - - /// - /// Creates a new Audio endpoint volume - /// - /// ISimpleAudioVolume COM interface - internal SimpleAudioVolume(ISimpleAudioVolume realSimpleVolume) - { - simpleAudioVolume = realSimpleVolume; - } - - #region IDisposable Members - - /// - /// Dispose - /// - public void Dispose() - { - GC.SuppressFinalize(this); - } - - /// - /// Finalizer - /// - ~SimpleAudioVolume() - { - Dispose(); - } - - #endregion - - /// - /// Allows the user to adjust the volume from - /// 0.0 to 1.0 - /// - public float Volume - { - get - { - float result; - Marshal.ThrowExceptionForHR(simpleAudioVolume.GetMasterVolume(out result)); - return result; - } - set - { - if ((value >= 0.0) && (value <= 1.0)) - { - Marshal.ThrowExceptionForHR(simpleAudioVolume.SetMasterVolume(value, Guid.Empty)); - } - // should throw something if out of range - } - } - - /// - /// Mute - /// - public bool Mute - { - get - { - bool result; - - Marshal.ThrowExceptionForHR(simpleAudioVolume.GetMute(out result)); - - return result; - } - set - { - Marshal.ThrowExceptionForHR(simpleAudioVolume.SetMute(value, Guid.Empty)); - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/CoreAudioApi/SimpleAudioVolume.cs.meta b/Assets/Scripts/Audio/NAudio/CoreAudioApi/SimpleAudioVolume.cs.meta deleted file mode 100644 index 2b0e87f..0000000 --- a/Assets/Scripts/Audio/NAudio/CoreAudioApi/SimpleAudioVolume.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8afe47fcbd5eaf44b9998147b3429740 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo.meta b/Assets/Scripts/Audio/NAudio/Dmo.meta deleted file mode 100644 index 44a7d35..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c700faefe1bf4e44a988a7c4c04ffe89 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/AudioMediaSubtypes.cs b/Assets/Scripts/Audio/NAudio/Dmo/AudioMediaSubtypes.cs deleted file mode 100644 index 2b7aef6..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/AudioMediaSubtypes.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - class AudioMediaSubtypes - { - public static readonly Guid MEDIASUBTYPE_PCM = new Guid("00000001-0000-0010-8000-00AA00389B71"); // PCM audio. - public static readonly Guid MEDIASUBTYPE_PCMAudioObsolete = new Guid("e436eb8a-524f-11ce-9f53-0020af0ba770"); // Obsolete. Do not use. - public static readonly Guid MEDIASUBTYPE_MPEG1Packet = new Guid("e436eb80-524f-11ce-9f53-0020af0ba770"); // MPEG1 Audio packet. - public static readonly Guid MEDIASUBTYPE_MPEG1Payload = new Guid("e436eb81-524f-11ce-9f53-0020af0ba770"); // MPEG1 Audio Payload. - public static readonly Guid MEDIASUBTYPE_MPEG2_AUDIO = new Guid("e06d802b-db46-11cf-b4d1-00805f6cbbea"); // MPEG-2 audio data - public static readonly Guid MEDIASUBTYPE_DVD_LPCM_AUDIO = new Guid("e06d8032-db46-11cf-b4d1-00805f6cbbea"); // DVD audio data - public static readonly Guid MEDIASUBTYPE_DRM_Audio = new Guid("00000009-0000-0010-8000-00aa00389b71"); // Corresponds to WAVE_FORMAT_DRM. - public static readonly Guid MEDIASUBTYPE_IEEE_FLOAT = new Guid("00000003-0000-0010-8000-00aa00389b71"); // Corresponds to WAVE_FORMAT_IEEE_FLOAT - public static readonly Guid MEDIASUBTYPE_DOLBY_AC3 = new Guid("e06d802c-db46-11cf-b4d1-00805f6cbbea"); // Dolby data - public static readonly Guid MEDIASUBTYPE_DOLBY_AC3_SPDIF = new Guid("00000092-0000-0010-8000-00aa00389b71"); // Dolby AC3 over SPDIF. - public static readonly Guid MEDIASUBTYPE_RAW_SPORT = new Guid("00000240-0000-0010-8000-00aa00389b71"); // Equivalent to MEDIASUBTYPE_DOLBY_AC3_SPDIF. - public static readonly Guid MEDIASUBTYPE_SPDIF_TAG_241h = new Guid("00000241-0000-0010-8000-00aa00389b71"); // Equivalent to MEDIASUBTYPE_DOLBY_AC3_SPDIF. - //http://msdn.microsoft.com/en-us/library/dd757532%28VS.85%29.aspx - public static readonly Guid WMMEDIASUBTYPE_MP3 = new Guid("00000055-0000-0010-8000-00AA00389B71"); - // others? - public static readonly Guid MEDIASUBTYPE_WAVE = new Guid("e436eb8b-524f-11ce-9f53-0020af0ba770"); - public static readonly Guid MEDIASUBTYPE_AU = new Guid("e436eb8c-524f-11ce-9f53-0020af0ba770"); - public static readonly Guid MEDIASUBTYPE_AIFF = new Guid("e436eb8d-524f-11ce-9f53-0020af0ba770"); - - public static readonly Guid[] AudioSubTypes = new Guid[] - { - MEDIASUBTYPE_PCM, - MEDIASUBTYPE_PCMAudioObsolete, - MEDIASUBTYPE_MPEG1Packet, - MEDIASUBTYPE_MPEG1Payload, - MEDIASUBTYPE_MPEG2_AUDIO, - MEDIASUBTYPE_DVD_LPCM_AUDIO, - MEDIASUBTYPE_DRM_Audio, - MEDIASUBTYPE_IEEE_FLOAT, - MEDIASUBTYPE_DOLBY_AC3, - MEDIASUBTYPE_DOLBY_AC3_SPDIF, - MEDIASUBTYPE_RAW_SPORT, - MEDIASUBTYPE_SPDIF_TAG_241h, - WMMEDIASUBTYPE_MP3, - }; - - public static readonly string[] AudioSubTypeNames = new string[] - { - "PCM", - "PCM Obsolete", - "MPEG1Packet", - "MPEG1Payload", - "MPEG2_AUDIO", - "DVD_LPCM_AUDIO", - "DRM_Audio", - "IEEE_FLOAT", - "DOLBY_AC3", - "DOLBY_AC3_SPDIF", - "RAW_SPORT", - "SPDIF_TAG_241h", - "MP3" - }; - public static string GetAudioSubtypeName(Guid subType) - { - for (int index = 0; index < AudioSubTypes.Length; index++) - { - if (subType == AudioSubTypes[index]) - { - return AudioSubTypeNames[index]; - } - } - return subType.ToString(); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/AudioMediaSubtypes.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/AudioMediaSubtypes.cs.meta deleted file mode 100644 index e264e2d..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/AudioMediaSubtypes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1ec5dac277768d441adcda5f0de63730 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoDescriptor.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoDescriptor.cs deleted file mode 100644 index 8a88ca9..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoDescriptor.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - /// - /// Contains the name and CLSID of a DirectX Media Object - /// - public class DmoDescriptor - { - /// - /// Name - /// - public string Name { get; private set; } - - /// - /// CLSID - /// - public Guid Clsid { get; private set; } - - /// - /// Initializes a new instance of DmoDescriptor - /// - public DmoDescriptor(string name, Guid clsid) - { - Name = name; - Clsid = clsid; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoDescriptor.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoDescriptor.cs.meta deleted file mode 100644 index 3ab7628..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoDescriptor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cec1613eecf499047881ea5db2875c7d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumFlags.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumFlags.cs deleted file mode 100644 index 8e2b056..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumFlags.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - [Flags] - enum DmoEnumFlags - { - None, - DMO_ENUMF_INCLUDE_KEYED = 0x00000001 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumFlags.cs.meta deleted file mode 100644 index 2a8672c..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 71a4556e9e867e14e81cd937efe994c7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumerator.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumerator.cs deleted file mode 100644 index 74e20b2..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumerator.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -namespace NAudio.Dmo -{ - /// - /// DirectX Media Object Enumerator - /// - public class DmoEnumerator - { - /// - /// Get audio effect names - /// - /// Audio effect names - public static IEnumerable GetAudioEffectNames() - { - return GetDmos(DmoGuids.DMOCATEGORY_AUDIO_EFFECT); - } - - /// - /// Get audio encoder names - /// - /// Audio encoder names - public static IEnumerable GetAudioEncoderNames() - { - return GetDmos(DmoGuids.DMOCATEGORY_AUDIO_ENCODER); - } - - /// - /// Get audio decoder names - /// - /// Audio decoder names - public static IEnumerable GetAudioDecoderNames() - { - return GetDmos(DmoGuids.DMOCATEGORY_AUDIO_DECODER); - } - - private static IEnumerable GetDmos(Guid category) - { - IEnumDmo enumDmo; - var hresult = DmoInterop.DMOEnum(ref category, DmoEnumFlags.None, 0, null, 0, null, out enumDmo); - Marshal.ThrowExceptionForHR(hresult); - int itemsFetched; - do - { - Guid guid; - IntPtr namePointer; - enumDmo.Next(1, out guid, out namePointer, out itemsFetched); - - if (itemsFetched == 1) - { - string name = Marshal.PtrToStringUni(namePointer); - Marshal.FreeCoTaskMem(namePointer); - yield return new DmoDescriptor(name, guid); - } - } while (itemsFetched > 0); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumerator.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumerator.cs.meta deleted file mode 100644 index 8249d63..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoEnumerator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 541a7f463dbd5ac449e3544533f7999e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoGuids.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoGuids.cs deleted file mode 100644 index 7390455..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoGuids.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - /// - /// DMO Guids for use with DMOEnum - /// dmoreg.h - /// - static class DmoGuids - { - public static readonly Guid DMOCATEGORY_AUDIO_DECODER = new Guid("57f2db8b-e6bb-4513-9d43-dcd2a6593125"); - public static readonly Guid DMOCATEGORY_AUDIO_ENCODER = new Guid("33D9A761-90C8-11d0-BD43-00A0C911CE86"); - public static readonly Guid DMOCATEGORY_VIDEO_DECODER = new Guid("4a69b442-28be-4991-969c-b500adf5d8a8"); - public static readonly Guid DMOCATEGORY_VIDEO_ENCODER = new Guid("33D9A760-90C8-11d0-BD43-00A0C911CE86"); - public static readonly Guid DMOCATEGORY_AUDIO_EFFECT = new Guid("f3602b3f-0592-48df-a4cd-674721e7ebeb"); - public static readonly Guid DMOCATEGORY_VIDEO_EFFECT = new Guid("d990ee14-776c-4723-be46-3da2f56f10b9"); - public static readonly Guid DMOCATEGORY_AUDIO_CAPTURE_EFFECT = new Guid("f665aaba-3e09-4920-aa5f-219811148f09"); - } - - static class DmoMediaTypeGuids - { - public static readonly Guid FORMAT_None = new Guid("0F6417D6-C318-11D0-A43F-00A0C9223196"); - public static readonly Guid FORMAT_VideoInfo = new Guid("05589f80-c356-11ce-bf01-00aa0055595a"); - public static readonly Guid FORMAT_VideoInfo2 = new Guid("F72A76A0-EB0A-11d0-ACE4-0000C0CC16BA"); - public static readonly Guid FORMAT_WaveFormatEx = new Guid("05589f81-c356-11ce-bf01-00aa0055595a"); - public static readonly Guid FORMAT_MPEGVideo = new Guid("05589f82-c356-11ce-bf01-00aa0055595a"); - public static readonly Guid FORMAT_MPEGStreams = new Guid("05589f83-c356-11ce-bf01-00aa0055595a"); - public static readonly Guid FORMAT_DvInfo = new Guid("05589f84-c356-11ce-bf01-00aa0055595a"); - public static readonly Guid FORMAT_525WSS = new Guid("C7ECF04D-4582-4869-9ABB-BFB523B62EDF"); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoGuids.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoGuids.cs.meta deleted file mode 100644 index 58631c4..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoGuids.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 50ad82e8afe991c479e3a82992f83682 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoHResults.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoHResults.cs deleted file mode 100644 index c4a7c92..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoHResults.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - /// - /// MediaErr.h - /// - enum DmoHResults - { - DMO_E_INVALIDSTREAMINDEX = unchecked((int)0x80040201), - DMO_E_INVALIDTYPE = unchecked((int)0x80040202), - DMO_E_TYPE_NOT_SET = unchecked((int)0x80040203), - DMO_E_NOTACCEPTING = unchecked((int)0x80040204), - DMO_E_TYPE_NOT_ACCEPTED = unchecked((int)0x80040205), - DMO_E_NO_MORE_ITEMS = unchecked((int)0x80040206), - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoHResults.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoHResults.cs.meta deleted file mode 100644 index 945129a..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoHResults.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9ab512711c4c9ea469797d2b5a8ec17d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoInputDataBufferFlags.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoInputDataBufferFlags.cs deleted file mode 100644 index a6bdd26..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoInputDataBufferFlags.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - /// - /// DMO Input Data Buffer Flags - /// - [Flags] - public enum DmoInputDataBufferFlags - { - /// - /// None - /// - None, - /// - /// DMO_INPUT_DATA_BUFFERF_SYNCPOINT - /// - SyncPoint = 0x00000001, - /// - /// DMO_INPUT_DATA_BUFFERF_TIME - /// - Time = 0x00000002, - /// - /// DMO_INPUT_DATA_BUFFERF_TIMELENGTH - /// - TimeLength = 0x00000004 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoInputDataBufferFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoInputDataBufferFlags.cs.meta deleted file mode 100644 index 40b5baa..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoInputDataBufferFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c73bf1a07a8099b46b07699b4e5881bd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoInputStatusFlags.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoInputStatusFlags.cs deleted file mode 100644 index de5fc15..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoInputStatusFlags.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - [Flags] - enum DmoInputStatusFlags - { - None, - DMO_INPUT_STATUSF_ACCEPT_DATA = 0x1 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoInputStatusFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoInputStatusFlags.cs.meta deleted file mode 100644 index 58962b2..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoInputStatusFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ad32b635a1add2d4ea14c8720c0660d0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoInterop.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoInterop.cs deleted file mode 100644 index 0c43880..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoInterop.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.Dmo -{ - static class DmoInterop - { - [DllImport("msdmo.dll")] - public static extern int DMOEnum( - [In] ref Guid guidCategory, - DmoEnumFlags flags, - int inTypes, - [In] DmoPartialMediaType[] inTypesArray, - int outTypes, - [In] DmoPartialMediaType[] outTypesArray, - out IEnumDmo enumDmo); - - [DllImport("msdmo.dll")] - public static extern int MoFreeMediaType( - [In] ref DmoMediaType mediaType); - - [DllImport("msdmo.dll")] - public static extern int MoInitMediaType( - [In,Out] ref DmoMediaType mediaType, int formatBlockBytes); - - [DllImport("msdmo.dll")] - public static extern int DMOGetName([In] ref Guid clsidDMO, - // preallocate 80 characters - [Out] StringBuilder name); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoInterop.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoInterop.cs.meta deleted file mode 100644 index de2f8e2..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoInterop.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2b606a65716438642a6e9d853d1bbda6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoMediaType.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoMediaType.cs deleted file mode 100644 index 281ce58..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoMediaType.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using NAudio.Wave; -using System.Runtime.InteropServices; - -namespace NAudio.Dmo -{ - /// - /// http://msdn.microsoft.com/en-us/library/aa929922.aspx - /// DMO_MEDIA_TYPE - /// - public struct DmoMediaType - { - Guid majortype; - Guid subtype; - bool bFixedSizeSamples; - bool bTemporalCompression; - int lSampleSize; - Guid formattype; - IntPtr pUnk; // not used - int cbFormat; - IntPtr pbFormat; - - /// - /// Major type - /// - public Guid MajorType => majortype; - - /// - /// Major type name - /// - public string MajorTypeName => MediaTypes.GetMediaTypeName(majortype); - - /// - /// Subtype - /// - public Guid SubType => subtype; - - /// - /// Subtype name - /// - public string SubTypeName - { - get - { - if (majortype == MediaTypes.MEDIATYPE_Audio) - { - return AudioMediaSubtypes.GetAudioSubtypeName(subtype); - } - return subtype.ToString(); - } - } - - /// - /// Fixed size samples - /// - public bool FixedSizeSamples => bFixedSizeSamples; - - /// - /// Sample size - /// - public int SampleSize => lSampleSize; - - /// - /// Format type - /// - public Guid FormatType => formattype; - - /// - /// Format type name - /// - public string FormatTypeName - { - get - { - if(formattype == DmoMediaTypeGuids.FORMAT_None) - { - return "None"; - } - if (formattype == Guid.Empty) - { - return "Null"; - } - if(formattype == DmoMediaTypeGuids.FORMAT_WaveFormatEx) - { - return "WaveFormatEx"; - } - return FormatType.ToString(); - } - } - - /// - /// Gets the structure as a Wave format (if it is one) - /// - public WaveFormat GetWaveFormat() - { - if (formattype == DmoMediaTypeGuids.FORMAT_WaveFormatEx) - { - return WaveFormat.MarshalFromPtr(pbFormat); - } - throw new InvalidOperationException("Not a WaveFormat type"); - } - - /// - /// Sets this object up to point to a wave format - /// - /// Wave format structure - public void SetWaveFormat(WaveFormat waveFormat) - { - majortype = MediaTypes.MEDIATYPE_Audio; - - var wfe = waveFormat as WaveFormatExtensible; - if (wfe != null) - { - subtype = wfe.SubFormat; - } - else - { - switch (waveFormat.Encoding) - { - case WaveFormatEncoding.Pcm: - subtype = AudioMediaSubtypes.MEDIASUBTYPE_PCM; - break; - case WaveFormatEncoding.IeeeFloat: - subtype = AudioMediaSubtypes.MEDIASUBTYPE_IEEE_FLOAT; - break; - case WaveFormatEncoding.MpegLayer3: - subtype = AudioMediaSubtypes.WMMEDIASUBTYPE_MP3; - break; - default: - throw new ArgumentException($"Not a supported encoding {waveFormat.Encoding}"); - } - } - bFixedSizeSamples = SubType == AudioMediaSubtypes.MEDIASUBTYPE_PCM || SubType == AudioMediaSubtypes.MEDIASUBTYPE_IEEE_FLOAT; - formattype = DmoMediaTypeGuids.FORMAT_WaveFormatEx; - if (cbFormat < Marshal.SizeOf(waveFormat)) - throw new InvalidOperationException("Not enough memory assigned for a WaveFormat structure"); - //Debug.Assert(cbFormat >= ,"Not enough space"); - Marshal.StructureToPtr(waveFormat, pbFormat, false); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoMediaType.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoMediaType.cs.meta deleted file mode 100644 index 7995938..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoMediaType.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 34ccf88495014104cad4dbf41844b4c2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBuffer.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBuffer.cs deleted file mode 100644 index 15e2e79..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBuffer.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Dmo -{ - /// - /// DMO Output Data Buffer - /// - [StructLayout(LayoutKind.Sequential, Pack=8)] - public struct DmoOutputDataBuffer : IDisposable - { - [MarshalAs(UnmanagedType.Interface)] - IMediaBuffer pBuffer; - DmoOutputDataBufferFlags dwStatus; - long rtTimestamp; - long referenceTimeDuration; - - /// - /// Creates a new DMO Output Data Buffer structure - /// - /// Maximum buffer size - public DmoOutputDataBuffer(int maxBufferSize) - { - pBuffer = new MediaBuffer(maxBufferSize); - dwStatus = DmoOutputDataBufferFlags.None; - rtTimestamp = 0; - referenceTimeDuration = 0; - } - - /// - /// Dispose - /// - public void Dispose() - { - if (pBuffer != null) - { - ((MediaBuffer)pBuffer).Dispose(); - pBuffer = null; - GC.SuppressFinalize(this); - } - } - - /// - /// Media Buffer - /// - public IMediaBuffer MediaBuffer - { - get { return pBuffer; } - internal set { pBuffer = value; } - } - - /// - /// Length of data in buffer - /// - public int Length - { - get { return ((MediaBuffer)pBuffer).Length; } - } - - /// - /// Status Flags - /// - public DmoOutputDataBufferFlags StatusFlags - { - get { return dwStatus; } - internal set { dwStatus = value; } - } - - /// - /// Timestamp - /// - public long Timestamp - { - get { return rtTimestamp; } - internal set { rtTimestamp = value; } - } - - /// - /// Duration - /// - public long Duration - { - get { return referenceTimeDuration; } - internal set { referenceTimeDuration = value; } - } - - /// - /// Retrives the data in this buffer - /// - /// Buffer to receive data - /// Offset into buffer - public void RetrieveData(byte[] data, int offset) - { - ((MediaBuffer)pBuffer).RetrieveData(data, offset); - } - - /// - /// Is more data available - /// If true, ProcessOuput should be called again - /// - public bool MoreDataAvailable - { - get - { - return (StatusFlags & DmoOutputDataBufferFlags.Incomplete) == DmoOutputDataBufferFlags.Incomplete; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBuffer.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBuffer.cs.meta deleted file mode 100644 index ca6549c..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBuffer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0cecf3a4851acbc4daee3e668c8319d2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBufferFlags.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBufferFlags.cs deleted file mode 100644 index 3f8d99d..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBufferFlags.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - /// - /// DMO Output Data Buffer Flags - /// - [Flags] - public enum DmoOutputDataBufferFlags - { - /// - /// None - /// - None, - /// - /// DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT - /// - SyncPoint = 0x00000001, - /// - /// DMO_OUTPUT_DATA_BUFFERF_TIME - /// - Time = 0x00000002, - /// - /// DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH - /// - TimeLength = 0x00000004, - /// - /// DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE - /// - Incomplete = 0x01000000 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBufferFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBufferFlags.cs.meta deleted file mode 100644 index c50add4..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoOutputDataBufferFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f53fc309929510b43a26aa25e7ce60ae -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoPartialMediaType.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoPartialMediaType.cs deleted file mode 100644 index 1320ed1..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoPartialMediaType.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - /// - /// DMO_PARTIAL_MEDIATYPE - /// - struct DmoPartialMediaType - { - Guid type; - Guid subtype; - - public Guid Type - { - get { return type; } - internal set { type = value; } - } - - public Guid Subtype - { - get { return subtype; } - internal set { subtype = value; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoPartialMediaType.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoPartialMediaType.cs.meta deleted file mode 100644 index c3812cc..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoPartialMediaType.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bd39de56e3a2b234e9748b572676e610 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoProcessOutputFlags.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoProcessOutputFlags.cs deleted file mode 100644 index 4886def..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoProcessOutputFlags.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - /// - /// DMO Process Output Flags - /// - [Flags] - public enum DmoProcessOutputFlags - { - /// - /// None - /// - None, - /// - /// DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER - /// - DiscardWhenNoBuffer = 0x00000001 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoProcessOutputFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoProcessOutputFlags.cs.meta deleted file mode 100644 index 215950f..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoProcessOutputFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: afad86dd2611a254db4ed1ef3d6f6ea6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoSetTypeFlags.cs b/Assets/Scripts/Audio/NAudio/Dmo/DmoSetTypeFlags.cs deleted file mode 100644 index 3e09ada..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoSetTypeFlags.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - [Flags] - enum DmoSetTypeFlags - { - None, - DMO_SET_TYPEF_TEST_ONLY = 0x00000001, - DMO_SET_TYPEF_CLEAR = 0x00000002 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/DmoSetTypeFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/DmoSetTypeFlags.cs.meta deleted file mode 100644 index 9afaa25..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/DmoSetTypeFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bd840062543b21540bdcbaebb8d77d80 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/IEnumDmo.cs b/Assets/Scripts/Audio/NAudio/Dmo/IEnumDmo.cs deleted file mode 100644 index d91a18d..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/IEnumDmo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Dmo -{ - [Guid("2c3cd98a-2bfa-4a53-9c27-5249ba64ba0f"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IEnumDmo - { - // int Next(int itemsToFetch, CLSID[] clsids, string[] names, out int itemsFetched); - // lets do one at a time to keep it simple - don't call with itemsToFetch > 1 - int Next(int itemsToFetch, out Guid clsid, out IntPtr name, out int itemsFetched); - - int Skip(int itemsToSkip); - - int Reset(); - - int Clone(out IEnumDmo enumPointer); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/IEnumDmo.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/IEnumDmo.cs.meta deleted file mode 100644 index 66af8c9..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/IEnumDmo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9e02720050ca8c242ae24512d8f2287a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/IMediaBuffer.cs b/Assets/Scripts/Audio/NAudio/Dmo/IMediaBuffer.cs deleted file mode 100644 index 7528acb..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/IMediaBuffer.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Dmo -{ - /// - /// IMediaBuffer Interface - /// - [ComImport, -#if !NETFX_CORE - System.Security.SuppressUnmanagedCodeSecurity, -#endif - Guid("59eff8b9-938c-4a26-82f2-95cb84cdc837"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IMediaBuffer - { - /// - /// Set Length - /// - /// Length - /// HRESULT - [PreserveSig] - int SetLength(int length); - - /// - /// Get Max Length - /// - /// Max Length - /// HRESULT - [PreserveSig] - int GetMaxLength(out int maxLength); - - /// - /// Get Buffer and Length - /// - /// Pointer to variable into which to write the Buffer Pointer - /// Pointer to variable into which to write the Valid Data Length - /// HRESULT - [PreserveSig] - int GetBufferAndLength(IntPtr bufferPointerPointer, IntPtr validDataLengthPointer); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/IMediaBuffer.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/IMediaBuffer.cs.meta deleted file mode 100644 index 866bf01..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/IMediaBuffer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dd1725bc1e3654e468e4b9208a8dac83 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/IMediaObject.cs b/Assets/Scripts/Audio/NAudio/Dmo/IMediaObject.cs deleted file mode 100644 index bbeaa9a..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/IMediaObject.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Dmo -{ - /// - /// defined in mediaobj.h - /// - [ComImport, -#if !NETFX_CORE - System.Security.SuppressUnmanagedCodeSecurity, -#endif - Guid("d8ad0f58-5494-4102-97c5-ec798e59bcf4"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IMediaObject - { - [PreserveSig] - int GetStreamCount(out int inputStreams, out int outputStreams); - - [PreserveSig] - int GetInputStreamInfo(int inputStreamIndex, out InputStreamInfoFlags flags); - - [PreserveSig] - int GetOutputStreamInfo(int outputStreamIndex, out OutputStreamInfoFlags flags); - - [PreserveSig] - int GetInputType(int inputStreamIndex, int typeIndex, out DmoMediaType mediaType); - - [PreserveSig] - int GetOutputType(int outputStreamIndex, int typeIndex, out DmoMediaType mediaType); - - [PreserveSig] - int SetInputType(int inputStreamIndex, [In] ref DmoMediaType mediaType, DmoSetTypeFlags flags); - - [PreserveSig] - int SetOutputType(int outputStreamIndex, [In] ref DmoMediaType mediaType, DmoSetTypeFlags flags); - - [PreserveSig] - int GetInputCurrentType(int inputStreamIndex, out DmoMediaType mediaType); - - [PreserveSig] - int GetOutputCurrentType(int outputStreamIndex, out DmoMediaType mediaType); - - [PreserveSig] - int GetInputSizeInfo(int inputStreamIndex, out int size, out int maxLookahead, out int alignment); - - [PreserveSig] - int GetOutputSizeInfo(int outputStreamIndex, out int size, out int alignment); - - [PreserveSig] - int GetInputMaxLatency(int inputStreamIndex, out long referenceTimeMaxLatency); - - [PreserveSig] - int SetInputMaxLatency(int inputStreamIndex, long referenceTimeMaxLatency); - - [PreserveSig] - int Flush(); - - [PreserveSig] - int Discontinuity(int inputStreamIndex); - - [PreserveSig] - int AllocateStreamingResources(); - - [PreserveSig] - int FreeStreamingResources(); - - [PreserveSig] - int GetInputStatus(int inputStreamIndex, out DmoInputStatusFlags flags); - - [PreserveSig] - int ProcessInput(int inputStreamIndex, [In] IMediaBuffer mediaBuffer, DmoInputDataBufferFlags flags, - long referenceTimeTimestamp, long referenceTimeDuration); - - [PreserveSig] - int ProcessOutput(DmoProcessOutputFlags flags, - int outputBufferCount, - [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] DmoOutputDataBuffer[] outputBuffers, - out int statusReserved); - - [PreserveSig] - int Lock(bool acquireLock); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/IMediaObject.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/IMediaObject.cs.meta deleted file mode 100644 index befeaa3..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/IMediaObject.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 92c1e118c1b92e04b9564c9c3645a2d9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/IMediaParamInfo.cs b/Assets/Scripts/Audio/NAudio/Dmo/IMediaParamInfo.cs deleted file mode 100644 index 3ac4052..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/IMediaParamInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Dmo -{ - /// - /// defined in Medparam.h - /// - [ComImport, -#if !NETFX_CORE - System.Security.SuppressUnmanagedCodeSecurity, -#endif - Guid("6d6cbb60-a223-44aa-842f-a2f06750be6d"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IMediaParamInfo - { - [PreserveSig] - int GetParamCount(out int paramCount); - - [PreserveSig] // MP_PARAMINFO - int GetParamInfo(int paramIndex, ref MediaParamInfo paramInfo); - - [PreserveSig] - int GetParamText(int paramIndex, out IntPtr paramText); - - [PreserveSig] - int GetNumTimeFormats(out int numTimeFormats); - - [PreserveSig] - int GetSupportedTimeFormat(int formatIndex, out Guid guidTimeFormat); - - [PreserveSig] // MP_TIMEDATA is a DWORD - int GetCurrentTimeFormat(out Guid guidTimeFormat, out int mediaTimeData); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/IMediaParamInfo.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/IMediaParamInfo.cs.meta deleted file mode 100644 index f323a73..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/IMediaParamInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a49560f1fde62a345bcfed5076e89a28 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/IWMResamplerProps.cs b/Assets/Scripts/Audio/NAudio/Dmo/IWMResamplerProps.cs deleted file mode 100644 index f99b5f4..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/IWMResamplerProps.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Dmo -{ - /// - /// Windows Media Resampler Props - /// wmcodecdsp.h - /// - [Guid("E7E9984F-F09F-4da4-903F-6E2E0EFE56B5"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IWMResamplerProps - { - /// - /// Range is 1 to 60 - /// - int SetHalfFilterLength(int outputQuality); - - /// - /// Specifies the channel matrix. - /// - int SetUserChannelMtx([In] float[] channelConversionMatrix); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/IWMResamplerProps.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/IWMResamplerProps.cs.meta deleted file mode 100644 index e64a559..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/IWMResamplerProps.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b1161c562646c10429ae60ba99c84cf5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/InputStreamInfoFlags.cs b/Assets/Scripts/Audio/NAudio/Dmo/InputStreamInfoFlags.cs deleted file mode 100644 index eeaaf2c..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/InputStreamInfoFlags.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - [Flags] - enum InputStreamInfoFlags - { - None, - DMO_INPUT_STREAMF_WHOLE_SAMPLES = 0x00000001, - DMO_INPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x00000002, - DMO_INPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x00000004, - DMO_INPUT_STREAMF_HOLDS_BUFFERS = 0x00000008 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/InputStreamInfoFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/InputStreamInfoFlags.cs.meta deleted file mode 100644 index b726dbe..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/InputStreamInfoFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4a63f2e6adf29a545b73b558be9be9ae -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/MediaBuffer.cs b/Assets/Scripts/Audio/NAudio/Dmo/MediaBuffer.cs deleted file mode 100644 index 3bfc452..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/MediaBuffer.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.Utils; - -namespace NAudio.Dmo -{ - /// - /// Attempting to implement the COM IMediaBuffer interface as a .NET object - /// Not sure what will happen when I pass this to an unmanaged object - /// - public class MediaBuffer : IMediaBuffer, IDisposable - { - private IntPtr buffer; - private int length; - private readonly int maxLength; - - /// - /// Creates a new Media Buffer - /// - /// Maximum length in bytes - public MediaBuffer(int maxLength) - { - buffer = Marshal.AllocCoTaskMem(maxLength); - this.maxLength = maxLength; - } - - /// - /// Dispose and free memory for buffer - /// - public void Dispose() - { - if (buffer != IntPtr.Zero) - { - Marshal.FreeCoTaskMem(buffer); - buffer = IntPtr.Zero; - GC.SuppressFinalize(this); - } - } - - /// - /// Finalizer - /// - ~MediaBuffer() - { - Dispose(); - } - - #region IMediaBuffer Members - - /// - /// Set length of valid data in the buffer - /// - /// length - /// HRESULT - int IMediaBuffer.SetLength(int length) - { - //System.Diagnostics.Debug.WriteLine(String.Format("Set Length {0}", length)); - if (length > maxLength) - { - return HResult.E_INVALIDARG; - } - this.length = length; - return HResult.S_OK; - } - - /// - /// Gets the maximum length of the buffer - /// - /// Max length (output parameter) - /// HRESULT - int IMediaBuffer.GetMaxLength(out int maxLength) - { - //System.Diagnostics.Debug.WriteLine("Get Max Length"); - maxLength = this.maxLength; - return HResult.S_OK; - } - - /// - /// Gets buffer and / or length - /// - /// Pointer to variable into which buffer pointer should be written - /// Pointer to variable into which valid data length should be written - /// HRESULT - int IMediaBuffer.GetBufferAndLength(IntPtr bufferPointerPointer, IntPtr validDataLengthPointer) - { - - //System.Diagnostics.Debug.WriteLine(String.Format("Get Buffer and Length {0},{1}", - // bufferPointerPointer,validDataLengthPointer)); - if (bufferPointerPointer != IntPtr.Zero) - { - Marshal.WriteIntPtr(bufferPointerPointer, this.buffer); - } - if (validDataLengthPointer != IntPtr.Zero) - { - Marshal.WriteInt32(validDataLengthPointer, this.length); - - } - //System.Diagnostics.Debug.WriteLine("Finished Getting Buffer and Length"); - return HResult.S_OK; - - } - - #endregion - - /// - /// Length of data in the media buffer - /// - public int Length - { - get { return length; } - set - { - if (length > maxLength) - { - throw new ArgumentException("Cannot be greater than maximum buffer size"); - } - length = value; - } - } - - /// - /// Loads data into this buffer - /// - /// Data to load - /// Number of bytes to load - public void LoadData(byte[] data, int bytes) - { - this.Length = bytes; - Marshal.Copy(data, 0, buffer, bytes); - } - - /// - /// Retrieves the data in the output buffer - /// - /// buffer to retrieve into - /// offset within that buffer - public void RetrieveData(byte[] data, int offset) - { - Marshal.Copy(buffer, data, offset, Length); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/MediaBuffer.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/MediaBuffer.cs.meta deleted file mode 100644 index dee2ed6..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/MediaBuffer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 27b8525add8a4184a900b2093175607f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/MediaObject.cs b/Assets/Scripts/Audio/NAudio/Dmo/MediaObject.cs deleted file mode 100644 index b17ede7..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/MediaObject.cs +++ /dev/null @@ -1,491 +0,0 @@ -using System; -using System.Collections.Generic; -using NAudio.Utils; -using System.Runtime.InteropServices; -using NAudio.Wave; -using System.Diagnostics; - -namespace NAudio.Dmo -{ - /// - /// Media Object - /// - public class MediaObject : IDisposable - { - private IMediaObject mediaObject; - private readonly int inputStreams; - private readonly int outputStreams; - - #region Construction - - /// - /// Creates a new Media Object - /// - /// Media Object COM interface - internal MediaObject(IMediaObject mediaObject) - { - this.mediaObject = mediaObject; - mediaObject.GetStreamCount(out inputStreams, out outputStreams); - } - - #endregion - - #region Public Properties - /// - /// Number of input streams - /// - public int InputStreamCount - { - get { return inputStreams; } - } - - /// - /// Number of output streams - /// - public int OutputStreamCount - { - get { return outputStreams; } - } - #endregion - - #region Get Input and Output Types - - /// - /// Gets the input media type for the specified input stream - /// - /// Input stream index - /// Input type index - /// DMO Media Type or null if there are no more input types - public DmoMediaType? GetInputType(int inputStream, int inputTypeIndex) - { - try - { - DmoMediaType mediaType; - int hresult = mediaObject.GetInputType(inputStream, inputTypeIndex, out mediaType); - if (hresult == HResult.S_OK) - { - // this frees the format (if present) - // we should therefore come up with a way of marshaling the format - // into a completely managed structure - DmoInterop.MoFreeMediaType(ref mediaType); - return mediaType; - } - } - catch (COMException e) - { - if (e.GetHResult() != (int)DmoHResults.DMO_E_NO_MORE_ITEMS) - { - throw; - } - } - return null; - } - - /// - /// Gets the DMO Media Output type - /// - /// The output stream - /// Output type index - /// DMO Media Type or null if no more available - public DmoMediaType? GetOutputType(int outputStream, int outputTypeIndex) - { - try - { - DmoMediaType mediaType; - int hresult = mediaObject.GetOutputType(outputStream, outputTypeIndex, out mediaType); - if (hresult == HResult.S_OK) - { - // this frees the format (if present) - // we should therefore come up with a way of marshaling the format - // into a completely managed structure - DmoInterop.MoFreeMediaType(ref mediaType); - return mediaType; - } - } - catch (COMException e) - { - if (e.GetHResult() != (int)DmoHResults.DMO_E_NO_MORE_ITEMS) - { - throw; - } - } - return null; - } - - /// - /// retrieves the media type that was set for an output stream, if any - /// - /// Output stream index - /// DMO Media Type or null if no more available - public DmoMediaType GetOutputCurrentType(int outputStreamIndex) - { - DmoMediaType mediaType; - int hresult = mediaObject.GetOutputCurrentType(outputStreamIndex, out mediaType); - if (hresult == HResult.S_OK) - { - // this frees the format (if present) - // we should therefore come up with a way of marshaling the format - // into a completely managed structure - DmoInterop.MoFreeMediaType(ref mediaType); - return mediaType; - } - else - { - if (hresult == (int)DmoHResults.DMO_E_TYPE_NOT_SET) - { - throw new InvalidOperationException("Media type was not set."); - } - else - { - throw Marshal.GetExceptionForHR(hresult); - } - } - } - - /// - /// Enumerates the supported input types - /// - /// Input stream index - /// Enumeration of input types - public IEnumerable GetInputTypes(int inputStreamIndex) - { - int typeIndex = 0; - DmoMediaType? mediaType; - while ((mediaType = GetInputType(inputStreamIndex,typeIndex)) != null) - { - yield return mediaType.Value; - typeIndex++; - } - } - - /// - /// Enumerates the output types - /// - /// Output stream index - /// Enumeration of supported output types - public IEnumerable GetOutputTypes(int outputStreamIndex) - { - int typeIndex = 0; - DmoMediaType? mediaType; - while ((mediaType = GetOutputType(outputStreamIndex, typeIndex)) != null) - { - yield return mediaType.Value; - typeIndex++; - } - } - - #endregion - - #region Set Input Type - - /// - /// Querys whether a specified input type is supported - /// - /// Input stream index - /// Media type to check - /// true if supports - public bool SupportsInputType(int inputStreamIndex, DmoMediaType mediaType) - { - return SetInputType(inputStreamIndex, mediaType, DmoSetTypeFlags.DMO_SET_TYPEF_TEST_ONLY); - } - - /// - /// Sets the input type helper method - /// - /// Input stream index - /// Media type - /// Flags (can be used to test rather than set) - private bool SetInputType(int inputStreamIndex, DmoMediaType mediaType, DmoSetTypeFlags flags) - { - int hResult = mediaObject.SetInputType(inputStreamIndex, ref mediaType, flags); - if (hResult != HResult.S_OK) - { - if (hResult == (int)DmoHResults.DMO_E_INVALIDSTREAMINDEX) - { - throw new ArgumentException("Invalid stream index"); - } - if (hResult == (int)DmoHResults.DMO_E_TYPE_NOT_ACCEPTED) - { - Debug.WriteLine("Media type was not accepted"); - } - - return false; - } - return true; - } - - /// - /// Sets the input type - /// - /// Input stream index - /// Media Type - public void SetInputType(int inputStreamIndex, DmoMediaType mediaType) - { - if(!SetInputType(inputStreamIndex,mediaType,DmoSetTypeFlags.None)) - { - throw new ArgumentException("Media Type not supported"); - } - } - - /// - /// Sets the input type to the specified Wave format - /// - /// Input stream index - /// Wave format - public void SetInputWaveFormat(int inputStreamIndex, WaveFormat waveFormat) - { - DmoMediaType mediaType = CreateDmoMediaTypeForWaveFormat(waveFormat); - bool set = SetInputType(inputStreamIndex, mediaType, DmoSetTypeFlags.None); - DmoInterop.MoFreeMediaType(ref mediaType); - if (!set) - { - throw new ArgumentException("Media Type not supported"); - } - } - - /// - /// Requests whether the specified Wave format is supported as an input - /// - /// Input stream index - /// Wave format - /// true if supported - public bool SupportsInputWaveFormat(int inputStreamIndex, WaveFormat waveFormat) - { - DmoMediaType mediaType = CreateDmoMediaTypeForWaveFormat(waveFormat); - bool supported = SetInputType(inputStreamIndex, mediaType, DmoSetTypeFlags.DMO_SET_TYPEF_TEST_ONLY); - DmoInterop.MoFreeMediaType(ref mediaType); - return supported; - } - - /// - /// Helper function to make a DMO Media Type to represent a particular WaveFormat - /// - private DmoMediaType CreateDmoMediaTypeForWaveFormat(WaveFormat waveFormat) - { - DmoMediaType mediaType = new DmoMediaType(); - int waveFormatExSize = Marshal.SizeOf(waveFormat); // 18 + waveFormat.ExtraSize; - DmoInterop.MoInitMediaType(ref mediaType, waveFormatExSize); - mediaType.SetWaveFormat(waveFormat); - return mediaType; - } - - #endregion - - #region Set Output Type - - /// - /// Checks if a specified output type is supported - /// n.b. you may need to set the input type first - /// - /// Output stream index - /// Media type - /// True if supported - public bool SupportsOutputType(int outputStreamIndex, DmoMediaType mediaType) - { - return SetOutputType(outputStreamIndex, mediaType, DmoSetTypeFlags.DMO_SET_TYPEF_TEST_ONLY); - } - - /// - /// Tests if the specified Wave Format is supported for output - /// n.b. may need to set the input type first - /// - /// Output stream index - /// Wave format - /// True if supported - public bool SupportsOutputWaveFormat(int outputStreamIndex, WaveFormat waveFormat) - { - DmoMediaType mediaType = CreateDmoMediaTypeForWaveFormat(waveFormat); - bool supported = SetOutputType(outputStreamIndex, mediaType, DmoSetTypeFlags.DMO_SET_TYPEF_TEST_ONLY); - DmoInterop.MoFreeMediaType(ref mediaType); - return supported; - } - - /// - /// Helper method to call SetOutputType - /// - private bool SetOutputType(int outputStreamIndex, DmoMediaType mediaType, DmoSetTypeFlags flags) - { - int hresult = mediaObject.SetOutputType(outputStreamIndex, ref mediaType, flags); - if (hresult == (int)DmoHResults.DMO_E_TYPE_NOT_ACCEPTED) - { - return false; - } - else if (hresult == HResult.S_OK) - { - return true; - } - else - { - throw Marshal.GetExceptionForHR(hresult); - } - } - - /// - /// Sets the output type - /// n.b. may need to set the input type first - /// - /// Output stream index - /// Media type to set - public void SetOutputType(int outputStreamIndex, DmoMediaType mediaType) - { - if (!SetOutputType(outputStreamIndex, mediaType, DmoSetTypeFlags.None)) - { - throw new ArgumentException("Media Type not supported"); - } - } - - /// - /// Set output type to the specified wave format - /// n.b. may need to set input type first - /// - /// Output stream index - /// Wave format - public void SetOutputWaveFormat(int outputStreamIndex, WaveFormat waveFormat) - { - DmoMediaType mediaType = CreateDmoMediaTypeForWaveFormat(waveFormat); - bool succeeded = SetOutputType(outputStreamIndex, mediaType, DmoSetTypeFlags.None); - DmoInterop.MoFreeMediaType(ref mediaType); - if (!succeeded) - { - throw new ArgumentException("Media Type not supported"); - } - } - - #endregion - - #region Get Input and Output Size Info - /// - /// Get Input Size Info - /// - /// Input Stream Index - /// Input Size Info - public MediaObjectSizeInfo GetInputSizeInfo(int inputStreamIndex) - { - int size; - int maxLookahead; - int alignment; - Marshal.ThrowExceptionForHR(mediaObject.GetInputSizeInfo(inputStreamIndex, out size, out maxLookahead, out alignment)); - return new MediaObjectSizeInfo(size, maxLookahead, alignment); - } - - /// - /// Get Output Size Info - /// - /// Output Stream Index - /// Output Size Info - public MediaObjectSizeInfo GetOutputSizeInfo(int outputStreamIndex) - { - int size; - int alignment; - Marshal.ThrowExceptionForHR(mediaObject.GetOutputSizeInfo(outputStreamIndex, out size, out alignment)); - return new MediaObjectSizeInfo(size, 0, alignment); - } - - #endregion - - #region Buffer Processing - /// - /// Process Input - /// - /// Input Stream index - /// Media Buffer - /// Flags - /// Timestamp - /// Duration - public void ProcessInput(int inputStreamIndex, IMediaBuffer mediaBuffer, DmoInputDataBufferFlags flags, - long timestamp, long duration) - { - Marshal.ThrowExceptionForHR(mediaObject.ProcessInput(inputStreamIndex, mediaBuffer, flags, timestamp, duration)); - } - - /// - /// Process Output - /// - /// Flags - /// Output buffer count - /// Output buffers - public void ProcessOutput(DmoProcessOutputFlags flags, int outputBufferCount, DmoOutputDataBuffer[] outputBuffers) - { - int reserved; - Marshal.ThrowExceptionForHR(mediaObject.ProcessOutput(flags, outputBufferCount, outputBuffers, out reserved)); - } - #endregion - - /// - /// Gives the DMO a chance to allocate any resources needed for streaming - /// - public void AllocateStreamingResources() - { - Marshal.ThrowExceptionForHR(mediaObject.AllocateStreamingResources()); - } - - /// - /// Tells the DMO to free any resources needed for streaming - /// - public void FreeStreamingResources() - { - Marshal.ThrowExceptionForHR(mediaObject.FreeStreamingResources()); - } - - /// - /// Gets maximum input latency - /// - /// input stream index - /// Maximum input latency as a ref-time - public long GetInputMaxLatency(int inputStreamIndex) - { - long maxLatency; - Marshal.ThrowExceptionForHR(mediaObject.GetInputMaxLatency(inputStreamIndex, out maxLatency)); - return maxLatency; - } - - /// - /// Flushes all buffered data - /// - public void Flush() - { - Marshal.ThrowExceptionForHR(mediaObject.Flush()); - } - - /// - /// Report a discontinuity on the specified input stream - /// - /// Input Stream index - public void Discontinuity(int inputStreamIndex) - { - Marshal.ThrowExceptionForHR(mediaObject.Discontinuity(inputStreamIndex)); - } - - /// - /// Is this input stream accepting data? - /// - /// Input Stream index - /// true if accepting data - public bool IsAcceptingData(int inputStreamIndex) - { - DmoInputStatusFlags flags; - int hresult = mediaObject.GetInputStatus(inputStreamIndex, out flags); - Marshal.ThrowExceptionForHR(hresult); - return (flags & DmoInputStatusFlags.DMO_INPUT_STATUSF_ACCEPT_DATA) == DmoInputStatusFlags.DMO_INPUT_STATUSF_ACCEPT_DATA; - } - - // TODO: there are still several IMediaObject functions to be wrapped - - #region IDisposable Members - - /// - /// Experimental code, not currently being called - /// Not sure if it is necessary anyway - /// - public void Dispose() - { - if (mediaObject != null) - { - Marshal.ReleaseComObject(mediaObject); - mediaObject = null; - } - } - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/MediaObject.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/MediaObject.cs.meta deleted file mode 100644 index 0e3fd57..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/MediaObject.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 218294cb45906e9419f65338dbf7461e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/MediaObjectSizeInfo.cs b/Assets/Scripts/Audio/NAudio/Dmo/MediaObjectSizeInfo.cs deleted file mode 100644 index 30aae6b..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/MediaObjectSizeInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - /// - /// Media Object Size Info - /// - public class MediaObjectSizeInfo - { - /// - /// Minimum Buffer Size, in bytes - /// - public int Size { get; private set; } - - /// - /// Max Lookahead - /// - public int MaxLookahead { get; } - - /// - /// Alignment - /// - public int Alignment { get; } - - /// - /// Media Object Size Info - /// - public MediaObjectSizeInfo(int size, int maxLookahead, int alignment) - { - Size = size; - MaxLookahead = maxLookahead; - Alignment = alignment; - } - - /// - /// ToString - /// - public override string ToString() - { - return $"Size: {Size}, Alignment {Alignment}, MaxLookahead {MaxLookahead}"; - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/MediaObjectSizeInfo.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/MediaObjectSizeInfo.cs.meta deleted file mode 100644 index b9490e1..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/MediaObjectSizeInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1b137b40345ec3e47961d37bae3eec80 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/MediaParamInfo.cs b/Assets/Scripts/Audio/NAudio/Dmo/MediaParamInfo.cs deleted file mode 100644 index 5365048..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/MediaParamInfo.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Dmo -{ - /// - /// MP_PARAMINFO - /// - struct MediaParamInfo - { -#pragma warning disable 0649 - public MediaParamType mpType; - public MediaParamCurveType mopCaps; - public float mpdMinValue; // MP_DATA is a float - public float mpdMaxValue; - public float mpdNeutralValue; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] - public string szUnitText; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] - public string szLabel; -#pragma warning restore 0649 - } - - /// - /// MP_TYPE - /// - enum MediaParamType - { - /// - /// MPT_INT - /// - Int, - /// - /// MPT_FLOAT - /// - Float, - /// - /// MPT_BOOL - /// - Bool, - /// - /// MPT_ENUM - /// - Enum, - /// - /// MPT_MAX - /// - Max, - } - - /// - /// MP_CURVE_TYPE - /// - [Flags] - internal enum MediaParamCurveType - { - MP_CURVE_JUMP = 0x1, - MP_CURVE_LINEAR = 0x2, - MP_CURVE_SQUARE = 0x4, - MP_CURVE_INVSQUARE = 0x8, - MP_CURVE_SINE = 0x10 - } - -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/MediaParamInfo.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/MediaParamInfo.cs.meta deleted file mode 100644 index bf8108e..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/MediaParamInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5705c19871c64df459409b6417a85566 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/MediaTypes.cs b/Assets/Scripts/Audio/NAudio/Dmo/MediaTypes.cs deleted file mode 100644 index a0342b8..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/MediaTypes.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - /// - /// uuids.h, ksuuids.h - /// - static class MediaTypes - { - public static readonly Guid MEDIATYPE_AnalogAudio = new Guid("0482DEE1-7817-11cf-8a03-00aa006ecb65"); // Analog audio. - public static readonly Guid MEDIATYPE_AnalogVideo = new Guid("0482DDE1-7817-11cf-8A03-00AA006ECB65"); // Analog video. - public static readonly Guid MEDIATYPE_Audio = new Guid("73647561-0000-0010-8000-00AA00389B71"); // Audio. - public static readonly Guid MEDIATYPE_AUXLine21Data = new Guid("670AEA80-3A82-11d0-B79B-00AA003767A7"); // Line 21 data. Used by closed captions. - public static readonly Guid MEDIATYPE_File = new Guid("656c6966-0000-0010-8000-00AA00389B71"); // File. (Obsolete) - public static readonly Guid MEDIATYPE_Interleaved = new Guid("73766169-0000-0010-8000-00AA00389B71"); // Interleaved audio and video. Used for Digital Video (DV). - public static readonly Guid MEDIATYPE_Midi = new Guid("7364696D-0000-0010-8000-00AA00389B71"); // MIDI format. - // public static readonly Guid MEDIATYPE_MPEG2_PES MPEG-2 PES packets. - // public static readonly Guid MEDIATYPE_MPEG2_SECTIONS MPEG-2 section data - public static readonly Guid MEDIATYPE_ScriptCommand = new Guid("73636d64-0000-0010-8000-00AA00389B71"); // Data is a script command, used by closed captions. - public static readonly Guid MEDIATYPE_Stream = new Guid("e436eb83-524f-11ce-9f53-0020af0ba770"); // Byte stream with no time stamps. - public static readonly Guid MEDIATYPE_Text = new Guid("73747874-0000-0010-8000-00AA00389B71"); // Text. - public static readonly Guid MEDIATYPE_Timecode = new Guid("0482DEE3-7817-11cf-8a03-00aa006ecb65"); // Timecode data. Note: DirectShow does not provide any filters that support this media type. - public static readonly Guid MEDIATYPE_Video = new Guid("73646976-0000-0010-8000-00AA00389B71"); // Video. - - public static readonly Guid[] MajorTypes = new Guid[] - { - MEDIATYPE_AnalogAudio, - MEDIATYPE_AnalogVideo, - MEDIATYPE_Audio, - MEDIATYPE_AUXLine21Data, - MEDIATYPE_File, - MEDIATYPE_Interleaved, - MEDIATYPE_Midi, - MEDIATYPE_ScriptCommand, - MEDIATYPE_Stream, - MEDIATYPE_Text, - MEDIATYPE_Timecode, - MEDIATYPE_Video, - }; - - public static readonly string[] MajorTypeNames = new string[] - { - "Analog Audio", - "Analog Video", - "Audio", - "AUXLine21Data", - "File", - "Interleaved", - "Midi", - "ScriptCommand", - "Stream", - "Text", - "Timecode", - "Video", - }; - - - public static string GetMediaTypeName(Guid majorType) - { - for (int index = 0; index < MajorTypes.Length; index++) - { - if (majorType == MajorTypes[index]) - { - return MajorTypeNames[index]; - } - } - throw new ArgumentException("Major Type not found"); - } - } - - -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/MediaTypes.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/MediaTypes.cs.meta deleted file mode 100644 index ee8efd2..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/MediaTypes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5823b756522a5d5468023c92c67eb820 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/OutputStreamInfoFlags.cs b/Assets/Scripts/Audio/NAudio/Dmo/OutputStreamInfoFlags.cs deleted file mode 100644 index 4a33ab3..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/OutputStreamInfoFlags.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace NAudio.Dmo -{ - [Flags] - enum OutputStreamInfoFlags - { - DMO_OUTPUT_STREAMF_WHOLE_SAMPLES = 0x00000001, - DMO_OUTPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x00000002, - DMO_OUTPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x00000004, - DMO_OUTPUT_STREAMF_DISCARDABLE = 0x00000008, - DMO_OUTPUT_STREAMF_OPTIONAL = 0x00000010 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/OutputStreamInfoFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/OutputStreamInfoFlags.cs.meta deleted file mode 100644 index e1ab7cf..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/OutputStreamInfoFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 89685c2e8c3b6204cbc53b80b529d35e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/ResamplerMediaObject.cs b/Assets/Scripts/Audio/NAudio/Dmo/ResamplerMediaObject.cs deleted file mode 100644 index 24cd6b6..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/ResamplerMediaObject.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.Dmo -{ - /// - /// From wmcodecsdp.h - /// Implements: - /// - IMediaObject - /// - IMFTransform (Media foundation - we will leave this for now as there is loads of MF stuff) - /// - IPropertyStore - /// - IWMResamplerProps - /// Can resample PCM or IEEE - /// - [ComImport, Guid("f447b69e-1884-4a7e-8055-346f74d6edb3")] - class ResamplerMediaComObject - { - } - - /// - /// DMO Resampler - /// - public class DmoResampler : IDisposable - { - MediaObject mediaObject; - IPropertyStore propertyStoreInterface; - IWMResamplerProps resamplerPropsInterface; - ResamplerMediaComObject mediaComObject; - - /// - /// Creates a new Resampler based on the DMO Resampler - /// - public DmoResampler() - { - mediaComObject = new ResamplerMediaComObject(); - mediaObject = new MediaObject((IMediaObject)mediaComObject); - propertyStoreInterface = (IPropertyStore)mediaComObject; - resamplerPropsInterface = (IWMResamplerProps)mediaComObject; - } - - /// - /// Media Object - /// - public MediaObject MediaObject => mediaObject; - - #region IDisposable Members - - /// - /// Dispose code - experimental at the moment - /// Was added trying to track down why Resampler crashes NUnit - /// This code not currently being called by ResamplerDmoStream - /// - public void Dispose() - { - if(propertyStoreInterface != null) - { - Marshal.ReleaseComObject(propertyStoreInterface); - propertyStoreInterface = null; - } - if(resamplerPropsInterface != null) - { - Marshal.ReleaseComObject(resamplerPropsInterface); - resamplerPropsInterface = null; - } - if (mediaObject != null) - { - mediaObject.Dispose(); - mediaObject = null; - } - if (mediaComObject != null) - { - Marshal.ReleaseComObject(mediaComObject); - mediaComObject = null; - } - } - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/ResamplerMediaObject.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/ResamplerMediaObject.cs.meta deleted file mode 100644 index e561945..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/ResamplerMediaObject.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 01f196bf467b7da42b688cccfd28da85 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dmo/WindowsMediaMp3Decoder.cs b/Assets/Scripts/Audio/NAudio/Dmo/WindowsMediaMp3Decoder.cs deleted file mode 100644 index 59db68a..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/WindowsMediaMp3Decoder.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.Dmo -{ - // http://msdn.microsoft.com/en-us/library/ff819509%28VS.85%29.aspx - // CLSID_CMP3DecMediaObject - - /// - /// implements IMediaObject (DirectX Media Object) - /// implements IMFTransform (Media Foundation Transform) - /// On Windows XP, it is always an MM (if present at all) - /// - [ComImport, Guid("bbeea841-0a63-4f52-a7ab-a9b3a84ed38a")] - class WindowsMediaMp3DecoderComObject - { - } - - /// - /// Windows Media MP3 Decoder (as a DMO) - /// WORK IN PROGRESS - DO NOT USE! - /// - public class WindowsMediaMp3Decoder : IDisposable - { - MediaObject mediaObject; - IPropertyStore propertyStoreInterface; - //IWMResamplerProps resamplerPropsInterface; - WindowsMediaMp3DecoderComObject mediaComObject; - - /// - /// Creates a new Resampler based on the DMO Resampler - /// - public WindowsMediaMp3Decoder() - { - mediaComObject = new WindowsMediaMp3DecoderComObject(); - mediaObject = new MediaObject((IMediaObject)mediaComObject); - propertyStoreInterface = (IPropertyStore)mediaComObject; - //resamplerPropsInterface = (IWMResamplerProps)mediaComObject; - } - - /// - /// Media Object - /// - public MediaObject MediaObject - { - get - { - return mediaObject; - } - } - - - #region IDisposable Members - - /// - /// Dispose code - experimental at the moment - /// Was added trying to track down why Resampler crashes NUnit - /// This code not currently being called by ResamplerDmoStream - /// - public void Dispose() - { - if(propertyStoreInterface != null) - { - Marshal.ReleaseComObject(propertyStoreInterface); - propertyStoreInterface = null; - } - /*if(resamplerPropsInterface != null) - { - Marshal.ReleaseComObject(resamplerPropsInterface); - resamplerPropsInterface = null; - }*/ - if (mediaObject != null) - { - mediaObject.Dispose(); - mediaObject = null; - } - if (mediaComObject != null) - { - Marshal.ReleaseComObject(mediaComObject); - mediaComObject = null; - } - } - - #endregion - } - -} diff --git a/Assets/Scripts/Audio/NAudio/Dmo/WindowsMediaMp3Decoder.cs.meta b/Assets/Scripts/Audio/NAudio/Dmo/WindowsMediaMp3Decoder.cs.meta deleted file mode 100644 index 3cc3ca8..0000000 --- a/Assets/Scripts/Audio/NAudio/Dmo/WindowsMediaMp3Decoder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: de62b67fbfccfb44f99d0d543734ac65 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp.meta b/Assets/Scripts/Audio/NAudio/Dsp.meta deleted file mode 100644 index 1788883..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 505ec8f4ac4546d409c43f72c226d7da -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp/BiQuadFilter.cs b/Assets/Scripts/Audio/NAudio/Dsp/BiQuadFilter.cs deleted file mode 100644 index 3336675..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/BiQuadFilter.cs +++ /dev/null @@ -1,322 +0,0 @@ -// based on Cookbook formulae for audio EQ biquad filter coefficients -// http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt -// by Robert Bristow-Johnson - -// alpha = sin(w0)/(2*Q) (case: Q) -// = sin(w0)*sinh( ln(2)/2 * BW * w0/sin(w0) ) (case: BW) -// = sin(w0)/2 * sqrt( (A + 1/A)*(1/S - 1) + 2 ) (case: S) -// Q: (the EE kind of definition, except for peakingEQ in which A*Q is -// the classic EE Q. That adjustment in definition was made so that -// a boost of N dB followed by a cut of N dB for identical Q and -// f0/Fs results in a precisely flat unity gain filter or "wire".) -// -// BW: the bandwidth in octaves (between -3 dB frequencies for BPF -// and notch or between midpoint (dBgain/2) gain frequencies for -// peaking EQ) -// -// S: a "shelf slope" parameter (for shelving EQ only). When S = 1, -// the shelf slope is as steep as it can be and remain monotonically -// increasing or decreasing gain with frequency. The shelf slope, in -// dB/octave, remains proportional to S for all other values for a -// fixed f0/Fs and dBgain. - -using System; - -namespace NAudio.Dsp -{ - /// - /// BiQuad filter - /// - public class BiQuadFilter - { - // coefficients - private double a0; - private double a1; - private double a2; - private double a3; - private double a4; - - // state - private float x1; - private float x2; - private float y1; - private float y2; - - /// - /// Passes a single sample through the filter - /// - /// Input sample - /// Output sample - public float Transform(float inSample) - { - // compute result - var result = a0 * inSample + a1 * x1 + a2 * x2 - a3 * y1 - a4 * y2; - - // shift x1 to x2, sample to x1 - x2 = x1; - x1 = inSample; - - // shift y1 to y2, result to y1 - y2 = y1; - y1 = (float)result; - - return y1; - } - - private void SetCoefficients(double aa0, double aa1, double aa2, double b0, double b1, double b2) - { - // precompute the coefficients - a0 = b0/aa0; - a1 = b1/aa0; - a2 = b2/aa0; - a3 = aa1/aa0; - a4 = aa2/aa0; - } - - /// - /// Set this up as a low pass filter - /// - /// Sample Rate - /// Cut-off Frequency - /// Bandwidth - public void SetLowPassFilter(float sampleRate, float cutoffFrequency, float q) - { - // H(s) = 1 / (s^2 + s/Q + 1) - var w0 = 2 * Math.PI * cutoffFrequency / sampleRate; - var cosw0 = Math.Cos(w0); - var alpha = Math.Sin(w0) / (2 * q); - - var b0 = (1 - cosw0) / 2; - var b1 = 1 - cosw0; - var b2 = (1 - cosw0) / 2; - var aa0 = 1 + alpha; - var aa1 = -2 * cosw0; - var aa2 = 1 - alpha; - SetCoefficients(aa0,aa1,aa2,b0,b1,b2); - } - - /// - /// Set this up as a peaking EQ - /// - /// Sample Rate - /// Centre Frequency - /// Bandwidth (Q) - /// Gain in decibels - public void SetPeakingEq(float sampleRate, float centreFrequency, float q, float dbGain) - { - // H(s) = (s^2 + s*(A/Q) + 1) / (s^2 + s/(A*Q) + 1) - var w0 = 2 * Math.PI * centreFrequency / sampleRate; - var cosw0 = Math.Cos(w0); - var sinw0 = Math.Sin(w0); - var alpha = sinw0 / (2 * q); - var a = Math.Pow(10, dbGain / 40); // TODO: should we square root this value? - - var b0 = 1 + alpha * a; - var b1 = -2 * cosw0; - var b2 = 1 - alpha * a; - var aa0 = 1 + alpha / a; - var aa1 = -2 * cosw0; - var aa2 = 1 - alpha / a; - SetCoefficients(aa0, aa1, aa2, b0, b1, b2); - } - - /// - /// Set this as a high pass filter - /// - public void SetHighPassFilter(float sampleRate, float cutoffFrequency, float q) - { - // H(s) = s^2 / (s^2 + s/Q + 1) - var w0 = 2 * Math.PI * cutoffFrequency / sampleRate; - var cosw0 = Math.Cos(w0); - var alpha = Math.Sin(w0) / (2 * q); - - var b0 = (1 + cosw0) / 2; - var b1 = -(1 + cosw0); - var b2 = (1 + cosw0) / 2; - var aa0 = 1 + alpha; - var aa1 = -2 * cosw0; - var aa2 = 1 - alpha; - SetCoefficients(aa0, aa1, aa2, b0, b1, b2); - } - - /// - /// Create a low pass filter - /// - public static BiQuadFilter LowPassFilter(float sampleRate, float cutoffFrequency, float q) - { - var filter = new BiQuadFilter(); - filter.SetLowPassFilter(sampleRate,cutoffFrequency,q); - return filter; - } - - /// - /// Create a High pass filter - /// - public static BiQuadFilter HighPassFilter(float sampleRate, float cutoffFrequency, float q) - { - var filter = new BiQuadFilter(); - filter.SetHighPassFilter(sampleRate, cutoffFrequency, q); - return filter; - } - - /// - /// Create a bandpass filter with constant skirt gain - /// - public static BiQuadFilter BandPassFilterConstantSkirtGain(float sampleRate, float centreFrequency, float q) - { - // H(s) = s / (s^2 + s/Q + 1) (constant skirt gain, peak gain = Q) - var w0 = 2 * Math.PI * centreFrequency / sampleRate; - var cosw0 = Math.Cos(w0); - var sinw0 = Math.Sin(w0); - var alpha = sinw0 / (2 * q); - - var b0 = sinw0 / 2; // = Q*alpha - var b1 = 0; - var b2 = -sinw0 / 2; // = -Q*alpha - var a0 = 1 + alpha; - var a1 = -2 * cosw0; - var a2 = 1 - alpha; - return new BiQuadFilter(a0, a1, a2, b0, b1, b2); - } - - /// - /// Create a bandpass filter with constant peak gain - /// - public static BiQuadFilter BandPassFilterConstantPeakGain(float sampleRate, float centreFrequency, float q) - { - // H(s) = (s/Q) / (s^2 + s/Q + 1) (constant 0 dB peak gain) - var w0 = 2 * Math.PI * centreFrequency / sampleRate; - var cosw0 = Math.Cos(w0); - var sinw0 = Math.Sin(w0); - var alpha = sinw0 / (2 * q); - - var b0 = alpha; - var b1 = 0; - var b2 = -alpha; - var a0 = 1 + alpha; - var a1 = -2 * cosw0; - var a2 = 1 - alpha; - return new BiQuadFilter(a0, a1, a2, b0, b1, b2); - } - - /// - /// Creates a notch filter - /// - public static BiQuadFilter NotchFilter(float sampleRate, float centreFrequency, float q) - { - // H(s) = (s^2 + 1) / (s^2 + s/Q + 1) - var w0 = 2 * Math.PI * centreFrequency / sampleRate; - var cosw0 = Math.Cos(w0); - var sinw0 = Math.Sin(w0); - var alpha = sinw0 / (2 * q); - - var b0 = 1; - var b1 = -2 * cosw0; - var b2 = 1; - var a0 = 1 + alpha; - var a1 = -2 * cosw0; - var a2 = 1 - alpha; - return new BiQuadFilter(a0, a1, a2, b0, b1, b2); - } - - /// - /// Creaes an all pass filter - /// - public static BiQuadFilter AllPassFilter(float sampleRate, float centreFrequency, float q) - { - //H(s) = (s^2 - s/Q + 1) / (s^2 + s/Q + 1) - var w0 = 2 * Math.PI * centreFrequency / sampleRate; - var cosw0 = Math.Cos(w0); - var sinw0 = Math.Sin(w0); - var alpha = sinw0 / (2 * q); - - var b0 = 1 - alpha; - var b1 = -2 * cosw0; - var b2 = 1 + alpha; - var a0 = 1 + alpha; - var a1 = -2 * cosw0; - var a2 = 1 - alpha; - return new BiQuadFilter(a0, a1, a2, b0, b1, b2); - } - - /// - /// Create a Peaking EQ - /// - public static BiQuadFilter PeakingEQ(float sampleRate, float centreFrequency, float q, float dbGain) - { - var filter = new BiQuadFilter(); - filter.SetPeakingEq(sampleRate, centreFrequency, q, dbGain); - return filter; - } - - /// - /// H(s) = A * (s^2 + (sqrt(A)/Q)*s + A)/(A*s^2 + (sqrt(A)/Q)*s + 1) - /// - /// - /// - /// a "shelf slope" parameter (for shelving EQ only). - /// When S = 1, the shelf slope is as steep as it can be and remain monotonically - /// increasing or decreasing gain with frequency. The shelf slope, in dB/octave, - /// remains proportional to S for all other values for a fixed f0/Fs and dBgain. - /// Gain in decibels - public static BiQuadFilter LowShelf(float sampleRate, float cutoffFrequency, float shelfSlope, float dbGain) - { - var w0 = 2 * Math.PI * cutoffFrequency / sampleRate; - var cosw0 = Math.Cos(w0); - var sinw0 = Math.Sin(w0); - var a = Math.Pow(10, dbGain / 40); // TODO: should we square root this value? - var alpha = sinw0 / 2 * Math.Sqrt((a + 1 / a) * (1 / shelfSlope - 1) + 2); - var temp = 2 * Math.Sqrt(a) * alpha; - - var b0 = a * ((a + 1) - (a - 1) * cosw0 + temp); - var b1 = 2 * a * ((a - 1) - (a + 1) * cosw0); - var b2 = a * ((a + 1) - (a - 1) * cosw0 - temp); - var a0 = (a + 1) + (a - 1) * cosw0 + temp; - var a1 = -2 * ((a - 1) + (a + 1) * cosw0); - var a2 = (a + 1) + (a - 1) * cosw0 - temp; - return new BiQuadFilter(a0, a1, a2, b0, b1, b2); - } - - /// - /// H(s) = A * (A*s^2 + (sqrt(A)/Q)*s + 1)/(s^2 + (sqrt(A)/Q)*s + A) - /// - /// - /// - /// - /// - /// - public static BiQuadFilter HighShelf(float sampleRate, float cutoffFrequency, float shelfSlope, float dbGain) - { - var w0 = 2 * Math.PI * cutoffFrequency / sampleRate; - var cosw0 = Math.Cos(w0); - var sinw0 = Math.Sin(w0); - var a = Math.Pow(10, dbGain / 40); // TODO: should we square root this value? - var alpha = sinw0 / 2 * Math.Sqrt((a + 1 / a) * (1 / shelfSlope - 1) + 2); - var temp = 2 * Math.Sqrt(a) * alpha; - - var b0 = a * ((a + 1) + (a - 1) * cosw0 + temp); - var b1 = -2 * a * ((a - 1) + (a + 1) * cosw0); - var b2 = a * ((a + 1) + (a - 1) * cosw0 - temp); - var a0 = (a + 1) - (a - 1) * cosw0 + temp; - var a1 = 2 * ((a - 1) - (a + 1) * cosw0); - var a2 = (a + 1) - (a - 1) * cosw0 - temp; - return new BiQuadFilter(a0, a1, a2, b0, b1, b2); - } - - private BiQuadFilter() - { - // zero initial samples - x1 = x2 = 0; - y1 = y2 = 0; - } - - private BiQuadFilter(double a0, double a1, double a2, double b0, double b1, double b2) - { - SetCoefficients(a0,a1,a2,b0,b1,b2); - - // zero initial samples - x1 = x2 = 0; - y1 = y2 = 0; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dsp/BiQuadFilter.cs.meta b/Assets/Scripts/Audio/NAudio/Dsp/BiQuadFilter.cs.meta deleted file mode 100644 index 73500f6..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/BiQuadFilter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cc9ad60fb6e6ac6468c4249383427df3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp/Complex.cs b/Assets/Scripts/Audio/NAudio/Dsp/Complex.cs deleted file mode 100644 index 7f00360..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/Complex.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Dsp -{ - /// - /// Type to represent complex number - /// - public struct Complex - { - /// - /// Real Part - /// - public float X; - /// - /// Imaginary Part - /// - public float Y; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dsp/Complex.cs.meta b/Assets/Scripts/Audio/NAudio/Dsp/Complex.cs.meta deleted file mode 100644 index 587bcef..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/Complex.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9774c0835b01b50469f65b873bd3319f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeDetector.cs b/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeDetector.cs deleted file mode 100644 index 5dbaec1..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeDetector.cs +++ /dev/null @@ -1,108 +0,0 @@ -// based on EnvelopeDetector.cpp v1.10 © 2006, ChunkWare Music Software, OPEN-SOURCE -using System; - -namespace NAudio.Dsp -{ - class EnvelopeDetector - { - private double sampleRate; - private double ms; - private double coeff; - - public EnvelopeDetector() : this(1.0, 44100.0) - { - } - - public EnvelopeDetector( double ms, double sampleRate ) - { - System.Diagnostics.Debug.Assert( sampleRate > 0.0 ); - System.Diagnostics.Debug.Assert( ms > 0.0 ); - this.sampleRate = sampleRate; - this.ms = ms; - SetCoef(); - } - - public double TimeConstant - { - get - { - return ms; - } - set - { - System.Diagnostics.Debug.Assert( value > 0.0 ); - this.ms = value; - SetCoef(); - } - } - - public double SampleRate - { - get - { - return sampleRate; - } - set - { - System.Diagnostics.Debug.Assert( value > 0.0 ); - this.sampleRate = value; - SetCoef(); - } - } - - public void Run( double inValue, ref double state ) - { - state = inValue + coeff * (state - inValue); - } - - private void SetCoef() - { - coeff = Math.Exp(-1.0 / (0.001 * ms * sampleRate)); - } - } - - class AttRelEnvelope - { - // DC offset to prevent denormal - protected const double DC_OFFSET = 1.0E-25; - - private readonly EnvelopeDetector attack; - private readonly EnvelopeDetector release; - - public AttRelEnvelope( double attackMilliseconds, double releaseMilliseconds, double sampleRate ) - { - attack = new EnvelopeDetector(attackMilliseconds,sampleRate); - release = new EnvelopeDetector(releaseMilliseconds,sampleRate); - } - - public double Attack - { - get { return attack.TimeConstant; } - set { attack.TimeConstant = value; } - } - - public double Release - { - get { return release.TimeConstant; } - set { release.TimeConstant = value; } - } - - public double SampleRate - { - get { return attack.SampleRate; } - set { attack.SampleRate = release.SampleRate = value; } - } - - public void Run(double inValue, ref double state) - { - // assumes that: - // positive delta = attack - // negative delta = release - // good for linear & log values - if ( inValue > state ) - attack.Run( inValue, ref state ); // attack - else - release.Run( inValue, ref state ); // release - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeDetector.cs.meta b/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeDetector.cs.meta deleted file mode 100644 index 339d4d1..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeDetector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9098bf5a948dfd0468bccc420c1f8db3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeGenerator.cs b/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeGenerator.cs deleted file mode 100644 index e903e75..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeGenerator.cs +++ /dev/null @@ -1,244 +0,0 @@ -using System; -using System.Linq; - -namespace NAudio.Dsp -{ - // C# ADSR based on work by Nigel Redmon, EarLevel Engineering: earlevel.com - // http://www.earlevel.com/main/2013/06/03/envelope-generators-adsr-code/ - /// - /// Envelope generator (ADSR) - /// - public class EnvelopeGenerator - { - private EnvelopeState state; - private float output; - private float attackRate; - private float decayRate; - private float releaseRate; - private float attackCoef; - private float decayCoef; - private float releaseCoef; - private float sustainLevel; - private float targetRatioAttack; - private float targetRatioDecayRelease; - private float attackBase; - private float decayBase; - private float releaseBase; - - /// - /// Envelope State - /// - public enum EnvelopeState - { - /// - /// Idle - /// - Idle = 0, - /// - /// Attack - /// - Attack, - /// - /// Decay - /// - Decay, - /// - /// Sustain - /// - Sustain, - /// - /// Release - /// - Release - }; - - /// - /// Creates and Initializes an Envelope Generator - /// - public EnvelopeGenerator() - { - Reset(); - AttackRate = 0; - DecayRate = 0; - ReleaseRate = 0; - SustainLevel = 1.0f; - SetTargetRatioAttack(0.3f); - SetTargetRatioDecayRelease(0.0001f); - } - - /// - /// Attack Rate (seconds * SamplesPerSecond) - /// - public float AttackRate - { - get - { - return attackRate; - } - set - { - attackRate = value; - attackCoef = CalcCoef(value, targetRatioAttack); - attackBase = (1.0f + targetRatioAttack) * (1.0f - attackCoef); - } - } - - /// - /// Decay Rate (seconds * SamplesPerSecond) - /// - public float DecayRate - { - get - { - return decayRate; - } - set - { - decayRate = value; - decayCoef = CalcCoef(value, targetRatioDecayRelease); - decayBase = (sustainLevel - targetRatioDecayRelease) * (1.0f - decayCoef); - } - } - - /// - /// Release Rate (seconds * SamplesPerSecond) - /// - public float ReleaseRate - { - get - { - return releaseRate; - } - set - { - releaseRate = value; - releaseCoef = CalcCoef(value, targetRatioDecayRelease); - releaseBase = -targetRatioDecayRelease * (1.0f - releaseCoef); - } - } - - private static float CalcCoef(float rate, float targetRatio) - { - return (float)Math.Exp(-Math.Log((1.0f + targetRatio) / targetRatio) / rate); - } - - /// - /// Sustain Level (1 = 100%) - /// - public float SustainLevel - { - get - { - return sustainLevel; - } - set - { - sustainLevel = value; - decayBase = (sustainLevel - targetRatioDecayRelease) * (1.0f - decayCoef); - } - } - - /// - /// Sets the attack curve - /// - void SetTargetRatioAttack(float targetRatio) - { - if (targetRatio < 0.000000001f) - targetRatio = 0.000000001f; // -180 dB - targetRatioAttack = targetRatio; - attackBase = (1.0f + targetRatioAttack) * (1.0f - attackCoef); - } - - /// - /// Sets the decay release curve - /// - void SetTargetRatioDecayRelease(float targetRatio) - { - if (targetRatio < 0.000000001f) - targetRatio = 0.000000001f; // -180 dB - targetRatioDecayRelease = targetRatio; - decayBase = (sustainLevel - targetRatioDecayRelease) * (1.0f - decayCoef); - releaseBase = -targetRatioDecayRelease * (1.0f - releaseCoef); - } - - /// - /// Read the next volume multiplier from the envelope generator - /// - /// A volume multiplier - public float Process() - { - switch (state) - { - case EnvelopeState.Idle: - break; - case EnvelopeState.Attack: - output = attackBase + output * attackCoef; - if (output >= 1.0f) - { - output = 1.0f; - state = EnvelopeState.Decay; - } - break; - case EnvelopeState.Decay: - output = decayBase + output * decayCoef; - if (output <= sustainLevel) - { - output = sustainLevel; - state = EnvelopeState.Sustain; - } - break; - case EnvelopeState.Sustain: - break; - case EnvelopeState.Release: - output = releaseBase + output * releaseCoef; - if (output <= 0.0) - { - output = 0.0f; - state = EnvelopeState.Idle; - } - break; - } - return output; - } - - /// - /// Trigger the gate - /// - /// If true, enter attack phase, if false enter release phase (unless already idle) - public void Gate(bool gate) - { - if (gate) - state = EnvelopeState.Attack; - else if (state != EnvelopeState.Idle) - state = EnvelopeState.Release; - } - - /// - /// Current envelope state - /// - public EnvelopeState State - { - get - { - return state; - } - } - - /// - /// Reset to idle state - /// - public void Reset() - { - state = EnvelopeState.Idle; - output = 0.0f; - } - - /// - /// Get the current output level - /// - public float GetOutput() - { - return output; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeGenerator.cs.meta b/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeGenerator.cs.meta deleted file mode 100644 index 93191ef..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/EnvelopeGenerator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 46b33b14d50def742a1ce830f3f4c223 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp/FastFourierTransform.cs b/Assets/Scripts/Audio/NAudio/Dsp/FastFourierTransform.cs deleted file mode 100644 index 50204a4..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/FastFourierTransform.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; - -namespace NAudio.Dsp -{ - /// - /// Summary description for FastFourierTransform. - /// - public static class FastFourierTransform - { - /// - /// This computes an in-place complex-to-complex FFT - /// x and y are the real and imaginary arrays of 2^m points. - /// - public static void FFT(bool forward, int m, Complex[] data) - { - int n, i, i1, j, k, i2, l, l1, l2; - float c1, c2, tx, ty, t1, t2, u1, u2, z; - - // Calculate the number of points - n = 1; - for (i = 0; i < m; i++) - n *= 2; - - // Do the bit reversal - i2 = n >> 1; - j = 0; - for (i = 0; i < n - 1; i++) - { - if (i < j) - { - tx = data[i].X; - ty = data[i].Y; - data[i].X = data[j].X; - data[i].Y = data[j].Y; - data[j].X = tx; - data[j].Y = ty; - } - k = i2; - - while (k <= j) - { - j -= k; - k >>= 1; - } - j += k; - } - - // Compute the FFT - c1 = -1.0f; - c2 = 0.0f; - l2 = 1; - for (l = 0; l < m; l++) - { - l1 = l2; - l2 <<= 1; - u1 = 1.0f; - u2 = 0.0f; - for (j = 0; j < l1; j++) - { - for (i = j; i < n; i += l2) - { - i1 = i + l1; - t1 = u1 * data[i1].X - u2 * data[i1].Y; - t2 = u1 * data[i1].Y + u2 * data[i1].X; - data[i1].X = data[i].X - t1; - data[i1].Y = data[i].Y - t2; - data[i].X += t1; - data[i].Y += t2; - } - z = u1 * c1 - u2 * c2; - u2 = u1 * c2 + u2 * c1; - u1 = z; - } - c2 = (float)Math.Sqrt((1.0f - c1) / 2.0f); - if (forward) - c2 = -c2; - c1 = (float)Math.Sqrt((1.0f + c1) / 2.0f); - } - - // Scaling for forward transform - if (forward) - { - for (i = 0; i < n; i++) - { - data[i].X /= n; - data[i].Y /= n; - } - } - } - - /// - /// Applies a Hamming Window - /// - /// Index into frame - /// Frame size (e.g. 1024) - /// Multiplier for Hamming window - public static double HammingWindow(int n, int frameSize) - { - return 0.54 - 0.46 * Math.Cos((2 * Math.PI * n) / (frameSize - 1)); - } - - /// - /// Applies a Hann Window - /// - /// Index into frame - /// Frame size (e.g. 1024) - /// Multiplier for Hann window - public static double HannWindow(int n, int frameSize) - { - return 0.5 * (1 - Math.Cos((2 * Math.PI * n) / (frameSize - 1))); - } - - /// - /// Applies a Blackman-Harris Window - /// - /// Index into frame - /// Frame size (e.g. 1024) - /// Multiplier for Blackmann-Harris window - public static double BlackmannHarrisWindow(int n, int frameSize) - { - return 0.35875 - (0.48829 * Math.Cos((2 * Math.PI * n) / (frameSize - 1))) + (0.14128 * Math.Cos((4 * Math.PI * n) / (frameSize - 1))) - (0.01168 * Math.Cos((6 * Math.PI * n) / (frameSize - 1))); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dsp/FastFourierTransform.cs.meta b/Assets/Scripts/Audio/NAudio/Dsp/FastFourierTransform.cs.meta deleted file mode 100644 index 6761e07..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/FastFourierTransform.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 48a2af00a2510b04aa444e78f2062c53 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp/ImpulseResponseConvolution.cs b/Assets/Scripts/Audio/NAudio/Dsp/ImpulseResponseConvolution.cs deleted file mode 100644 index 11b23c9..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/ImpulseResponseConvolution.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; - -namespace NAudio.Dsp -{ - /// - /// Summary description for ImpulseResponseConvolution. - /// - public class ImpulseResponseConvolution - { - /// - /// A very simple mono convolution algorithm - /// - /// - /// This will be very slow - /// - public float[] Convolve(float[] input, float[] impulseResponse) - { - var output = new float[input.Length + impulseResponse.Length]; - for(int t = 0; t < output.Length; t++) - { - for(int n = 0; n < impulseResponse.Length; n++) - { - if((t >= n) && (t-n < input.Length)) - { - output[t] += impulseResponse[n] * input[t-n]; - } - } - } - Normalize(output); - return output; - } - - /// - /// This is actually a downwards normalize for data that will clip - /// - public void Normalize(float[] data) - { - float max = 0; - for(int n = 0; n < data.Length; n++) - max = Math.Max(max,Math.Abs(data[n])); - if(max > 1.0) - for(int n = 0; n < data.Length; n++) - data[n] /= max; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dsp/ImpulseResponseConvolution.cs.meta b/Assets/Scripts/Audio/NAudio/Dsp/ImpulseResponseConvolution.cs.meta deleted file mode 100644 index aa5744f..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/ImpulseResponseConvolution.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4ac82e7037c1a4f42b69cdd531142ded -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp/SimpleCompressor.cs b/Assets/Scripts/Audio/NAudio/Dsp/SimpleCompressor.cs deleted file mode 100644 index d4ab77b..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/SimpleCompressor.cs +++ /dev/null @@ -1,89 +0,0 @@ -// based on SimpleComp v1.10 © 2006, ChunkWare Music Software, OPEN-SOURCE -using System; -using NAudio.Utils; - -namespace NAudio.Dsp -{ - class SimpleCompressor : AttRelEnvelope - { - // transfer function - - // runtime variables - private double envdB; // over-threshold envelope (dB) - - public SimpleCompressor(double attackTime, double releaseTime, double sampleRate) - : base(attackTime, releaseTime, sampleRate) - { - this.Threshold = 0.0; - this.Ratio = 1.0; - this.MakeUpGain = 0.0; - this.envdB = DC_OFFSET; - } - - public SimpleCompressor() - : base(10.0, 10.0, 44100.0) - { - this.Threshold = 0.0; - this.Ratio = 1.0; - this.MakeUpGain = 0.0; - this.envdB = DC_OFFSET; - } - - public double MakeUpGain { get; set; } - - public double Threshold { get; set; } - - public double Ratio { get; set; } - - // call before runtime (in resume()) - public void InitRuntime() - { - this.envdB = DC_OFFSET; - } - - // // compressor runtime process - public void Process(ref double in1, ref double in2) - { - // sidechain - - // rectify input - double rect1 = Math.Abs( in1 ); // n.b. was fabs - double rect2 = Math.Abs( in2 ); // n.b. was fabs - - // if desired, one could use another EnvelopeDetector to smooth - // the rectified signal. - - double link = Math.Max( rect1, rect2 ); // link channels with greater of 2 - - link += DC_OFFSET; // add DC offset to avoid log( 0 ) - double keydB = Decibels.LinearToDecibels( link ); // convert linear -> dB - - // threshold - double overdB = keydB - Threshold; // delta over threshold - if ( overdB < 0.0 ) - overdB = 0.0; - - // attack/release - - overdB += DC_OFFSET; // add DC offset to avoid denormal - - Run( overdB, ref envdB ); // run attack/release envelope - - overdB = envdB - DC_OFFSET; // subtract DC offset - - // Regarding the DC offset: In this case, since the offset is added before - // the attack/release processes, the envelope will never fall below the offset, - // thereby avoiding denormals. However, to prevent the offset from causing - // constant gain reduction, we must subtract it from the envelope, yielding - // a minimum value of 0dB. - - // transfer function - double gr = overdB * (Ratio - 1.0); // gain reduction (dB) - gr = Decibels.DecibelsToLinear(gr) * Decibels.DecibelsToLinear(MakeUpGain); // convert dB -> linear - - // output gain - in1 *= gr; // apply gain reduction to input - in2 *= gr; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dsp/SimpleCompressor.cs.meta b/Assets/Scripts/Audio/NAudio/Dsp/SimpleCompressor.cs.meta deleted file mode 100644 index f8cbe27..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/SimpleCompressor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1301667b302ecf047bdec309c5084e6b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp/SimpleGate.cs b/Assets/Scripts/Audio/NAudio/Dsp/SimpleGate.cs deleted file mode 100644 index ba912e7..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/SimpleGate.cs +++ /dev/null @@ -1,73 +0,0 @@ -// based on SimpleGate v1.10 © 2006, ChunkWare Music Software, OPEN-SOURCE -using System; -using NAudio.Utils; - -namespace NAudio.Dsp -{ - class SimpleGate : AttRelEnvelope - { - // transfer function - private double threshdB; // threshold (dB) - private double thresh; // threshold (linear) - - // runtime variables - private double env; // over-threshold envelope (linear) - - public SimpleGate() - : base(10.0, 10.0, 44100.0) - { - threshdB = 0.0; - thresh = 1.0; - env = DC_OFFSET; - } - - public void Process( ref double in1, ref double in2 ) - { - // in/out pointers are assummed to reference stereo data - - // sidechain - - // rectify input - double rect1 = Math.Abs( in1 ); // n.b. was fabs - double rect2 = Math.Abs( in2 ); // n.b. was fabs - - // if desired, one could use another EnvelopeDetector to smooth - // the rectified signal. - - double key = Math.Max( rect1, rect2 ); // link channels with greater of 2 - - // threshold - double over = ( key > thresh ) ? 1.0 : 0.0; // key over threshold ( 0.0 or 1.0 ) - - // attack/release - over += DC_OFFSET; // add DC offset to avoid denormal - - Run( over, ref env ); // run attack/release - - over = env - DC_OFFSET; // subtract DC offset - - // Regarding the DC offset: In this case, since the offset is added before - // the attack/release processes, the envelope will never fall below the offset, - // thereby avoiding denormals. However, to prevent the offset from causing - // constant gain reduction, we must subtract it from the envelope, yielding - // a minimum value of 0dB. - - // output gain - in1 *= over; // apply gain reduction to input - in2 *= over; - } - - public double Threshold - { - get - { - return threshdB; - } - set - { - threshdB = value; - thresh = Decibels.DecibelsToLinear(value); - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dsp/SimpleGate.cs.meta b/Assets/Scripts/Audio/NAudio/Dsp/SimpleGate.cs.meta deleted file mode 100644 index 88aa618..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/SimpleGate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5e2df1c7dc52e734d85fdd4bf52da8a5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp/SmbPitchShifter.cs b/Assets/Scripts/Audio/NAudio/Dsp/SmbPitchShifter.cs deleted file mode 100644 index 3fadc33..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/SmbPitchShifter.cs +++ /dev/null @@ -1,295 +0,0 @@ -using System; - -namespace NAudio.Dsp -{ - - /**************************************************************************** - * - * NAME: PitchShift.cs - * VERSION: 1.0 - * HOME URL: http://www.dspdimension.com - * KNOWN BUGS: none - * - * SYNOPSIS: Routine for doing pitch shifting while maintaining - * duration using the Short Time Fourier Transform. - * - * DESCRIPTION: The routine takes a pitchShift factor value which is between 0.5 - * (one octave down) and 2. (one octave up). A value of exactly 1 does not change - * the pitch. numSampsToProcess tells the routine how many samples in indata[0... - * numSampsToProcess-1] should be pitch shifted and moved to outdata[0 ... - * numSampsToProcess-1]. The two buffers can be identical (ie. it can process the - * data in-place). fftFrameSize defines the FFT frame size used for the - * processing. Typical values are 1024, 2048 and 4096. It may be any value <= - * MAX_FRAME_LENGTH but it MUST be a power of 2. osamp is the STFT - * oversampling factor which also determines the overlap between adjacent STFT - * frames. It should at least be 4 for moderate scaling ratios. A value of 32 is - * recommended for best quality. sampleRate takes the sample rate for the signal - * in unit Hz, ie. 44100 for 44.1 kHz audio. The data passed to the routine in - * indata[] should be in the range [-1.0, 1.0), which is also the output range - * for the data, make sure you scale the data accordingly (for 16bit signed integers - * you would have to divide (and multiply) by 32768). - * - * COPYRIGHT 1999-2006 Stephan M. Bernsee - * - * The Wide Open License (WOL) - * - * Permission to use, copy, modify, distribute and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice and this license appear in all source copies. - * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF - * ANY KIND. See http://www.dspguru.com/wol.htm for more information. - * - *****************************************************************************/ - - /**************************************************************************** - * - * This code was converted to C# by Michael Knight - * madmik3 at gmail dot com. - * http://sites.google.com/site/mikescoderama/ - * - *****************************************************************************/ - /// - /// SMB Pitch Shifter - /// - public class SmbPitchShifter - { - - private static int MAX_FRAME_LENGTH = 16000; - private float[] gInFIFO = new float[MAX_FRAME_LENGTH]; - private float[] gOutFIFO = new float[MAX_FRAME_LENGTH]; - private float[] gFFTworksp = new float[2*MAX_FRAME_LENGTH]; - private float[] gLastPhase = new float[MAX_FRAME_LENGTH/2 + 1]; - private float[] gSumPhase = new float[MAX_FRAME_LENGTH/2 + 1]; - private float[] gOutputAccum = new float[2*MAX_FRAME_LENGTH]; - private float[] gAnaFreq = new float[MAX_FRAME_LENGTH]; - private float[] gAnaMagn = new float[MAX_FRAME_LENGTH]; - private float[] gSynFreq = new float[MAX_FRAME_LENGTH]; - private float[] gSynMagn = new float[MAX_FRAME_LENGTH]; - private long gRover; - - /// - /// Pitch Shift - /// - public void PitchShift(float pitchShift, long numSampsToProcess, - float sampleRate, float[] indata) - { - PitchShift(pitchShift, numSampsToProcess, 2048L, 10L, sampleRate, indata); - } - - /// - /// Pitch Shift - /// - public void PitchShift(float pitchShift, long numSampsToProcess, long fftFrameSize, - long osamp, float sampleRate, float[] indata) - { - double magn, phase, tmp, window, real, imag; - double freqPerBin, expct; - long i, k, qpd, index, inFifoLatency, stepSize, fftFrameSize2; - - - float[] outdata = indata; - /* set up some handy variables */ - fftFrameSize2 = fftFrameSize/2; - stepSize = fftFrameSize/osamp; - freqPerBin = sampleRate/(double) fftFrameSize; - expct = 2.0*Math.PI*(double) stepSize/(double) fftFrameSize; - inFifoLatency = fftFrameSize - stepSize; - if (gRover == 0) gRover = inFifoLatency; - - - /* main processing loop */ - for (i = 0; i < numSampsToProcess; i++) - { - - /* As long as we have not yet collected enough data just read in */ - gInFIFO[gRover] = indata[i]; - outdata[i] = gOutFIFO[gRover - inFifoLatency]; - gRover++; - - /* now we have enough data for processing */ - if (gRover >= fftFrameSize) - { - gRover = inFifoLatency; - - /* do windowing and re,im interleave */ - for (k = 0; k < fftFrameSize; k++) - { - window = -.5*Math.Cos(2.0*Math.PI*(double) k/(double) fftFrameSize) + .5; - gFFTworksp[2*k] = (float) (gInFIFO[k]*window); - gFFTworksp[2*k + 1] = 0.0F; - } - - - /* ***************** ANALYSIS ******************* */ - /* do transform */ - ShortTimeFourierTransform(gFFTworksp, fftFrameSize, -1); - - /* this is the analysis step */ - for (k = 0; k <= fftFrameSize2; k++) - { - - /* de-interlace FFT buffer */ - real = gFFTworksp[2*k]; - imag = gFFTworksp[2*k + 1]; - - /* compute magnitude and phase */ - magn = 2.0*Math.Sqrt(real*real + imag*imag); - phase = Math.Atan2(imag, real); - - /* compute phase difference */ - tmp = phase - gLastPhase[k]; - gLastPhase[k] = (float) phase; - - /* subtract expected phase difference */ - tmp -= (double) k*expct; - - /* map delta phase into +/- Pi interval */ - qpd = (long) (tmp/Math.PI); - if (qpd >= 0) qpd += qpd & 1; - else qpd -= qpd & 1; - tmp -= Math.PI*(double) qpd; - - /* get deviation from bin frequency from the +/- Pi interval */ - tmp = osamp*tmp/(2.0*Math.PI); - - /* compute the k-th partials' true frequency */ - tmp = (double) k*freqPerBin + tmp*freqPerBin; - - /* store magnitude and true frequency in analysis arrays */ - gAnaMagn[k] = (float) magn; - gAnaFreq[k] = (float) tmp; - - } - - /* ***************** PROCESSING ******************* */ - /* this does the actual pitch shifting */ - for (int zero = 0; zero < fftFrameSize; zero++) - { - gSynMagn[zero] = 0; - gSynFreq[zero] = 0; - } - - for (k = 0; k <= fftFrameSize2; k++) - { - index = (long) (k*pitchShift); - if (index <= fftFrameSize2) - { - gSynMagn[index] += gAnaMagn[k]; - gSynFreq[index] = gAnaFreq[k]*pitchShift; - } - } - - /* ***************** SYNTHESIS ******************* */ - /* this is the synthesis step */ - for (k = 0; k <= fftFrameSize2; k++) - { - - /* get magnitude and true frequency from synthesis arrays */ - magn = gSynMagn[k]; - tmp = gSynFreq[k]; - - /* subtract bin mid frequency */ - tmp -= (double) k*freqPerBin; - - /* get bin deviation from freq deviation */ - tmp /= freqPerBin; - - /* take osamp into account */ - tmp = 2.0*Math.PI*tmp/osamp; - - /* add the overlap phase advance back in */ - tmp += (double) k*expct; - - /* accumulate delta phase to get bin phase */ - gSumPhase[k] += (float) tmp; - phase = gSumPhase[k]; - - /* get real and imag part and re-interleave */ - gFFTworksp[2*k] = (float) (magn*Math.Cos(phase)); - gFFTworksp[2*k + 1] = (float) (magn*Math.Sin(phase)); - } - - /* zero negative frequencies */ - for (k = fftFrameSize + 2; k < 2*fftFrameSize; k++) gFFTworksp[k] = 0.0F; - - /* do inverse transform */ - ShortTimeFourierTransform(gFFTworksp, fftFrameSize, 1); - - /* do windowing and add to output accumulator */ - for (k = 0; k < fftFrameSize; k++) - { - window = -.5*Math.Cos(2.0*Math.PI*(double) k/(double) fftFrameSize) + .5; - gOutputAccum[k] += (float) (2.0*window*gFFTworksp[2*k]/(fftFrameSize2*osamp)); - } - for (k = 0; k < stepSize; k++) gOutFIFO[k] = gOutputAccum[k]; - - /* shift accumulator */ - //memmove(gOutputAccum, gOutputAccum + stepSize, fftFrameSize * sizeof(float)); - for (k = 0; k < fftFrameSize; k++) - { - gOutputAccum[k] = gOutputAccum[k + stepSize]; - } - - /* move input FIFO */ - for (k = 0; k < inFifoLatency; k++) gInFIFO[k] = gInFIFO[k + stepSize]; - } - } - } - /// - /// Short Time Fourier Transform - /// - - public void ShortTimeFourierTransform(float[] fftBuffer, long fftFrameSize, long sign) - { - float wr, wi, arg, temp; - float tr, ti, ur, ui; - long i, bitm, j, le, le2, k; - - for (i = 2; i < 2*fftFrameSize - 2; i += 2) - { - for (bitm = 2, j = 0; bitm < 2*fftFrameSize; bitm <<= 1) - { - if ((i & bitm) != 0) j++; - j <<= 1; - } - if (i < j) - { - temp = fftBuffer[i]; - fftBuffer[i] = fftBuffer[j]; - fftBuffer[j] = temp; - temp = fftBuffer[i + 1]; - fftBuffer[i + 1] = fftBuffer[j + 1]; - fftBuffer[j + 1] = temp; - } - } - long max = (long) (Math.Log(fftFrameSize)/Math.Log(2.0) + .5); - for (k = 0, le = 2; k < max; k++) - { - le <<= 1; - le2 = le >> 1; - ur = 1.0F; - ui = 0.0F; - arg = (float) Math.PI/(le2 >> 1); - wr = (float) Math.Cos(arg); - wi = (float) (sign*Math.Sin(arg)); - for (j = 0; j < le2; j += 2) - { - - for (i = j; i < 2*fftFrameSize; i += le) - { - tr = fftBuffer[i + le2]*ur - fftBuffer[i + le2 + 1]*ui; - ti = fftBuffer[i + le2]*ui + fftBuffer[i + le2 + 1]*ur; - fftBuffer[i + le2] = fftBuffer[i] - tr; - fftBuffer[i + le2 + 1] = fftBuffer[i + 1] - ti; - fftBuffer[i] += tr; - fftBuffer[i + 1] += ti; - - } - tr = ur*wr - ui*wi; - ui = ur*wi + ui*wr; - ur = tr; - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Dsp/SmbPitchShifter.cs.meta b/Assets/Scripts/Audio/NAudio/Dsp/SmbPitchShifter.cs.meta deleted file mode 100644 index e081a40..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/SmbPitchShifter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e058578dff4139f42b06e93e9c9e8a7e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Dsp/WdlResampler.cs b/Assets/Scripts/Audio/NAudio/Dsp/WdlResampler.cs deleted file mode 100644 index 306d044..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/WdlResampler.cs +++ /dev/null @@ -1,708 +0,0 @@ -// This class based on the Resampler that is part of Cockos WDL -// originally written in C++ and ported to C# for NAudio by Mark Heath -// Used in NAudio with permission from Justin Frankel -// Original WDL License: -// Copyright (C) 2005 and later Cockos Incorporated -// -// Portions copyright other contributors, see each source file for more information -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - - -using System; -using System.Diagnostics; -using System.Linq; - -// default to floats for audio samples -using WDL_ResampleSample = System.Single; // n.b. default in WDL is double - -// default to floats for sinc filter ceofficients -using WDL_SincFilterSample = System.Single; // can also be set to double - -namespace NAudio.Dsp -{ - /// - /// Fully managed resampler, based on Cockos WDL Resampler - /// - class WdlResampler - { - private const int WDL_RESAMPLE_MAX_FILTERS = 4; - private const int WDL_RESAMPLE_MAX_NCH = 64; - private const double PI = 3.1415926535897932384626433832795; - - /// - /// Creates a new Resampler - /// - public WdlResampler() - { - m_filterq = 0.707f; - m_filterpos = 0.693f; // .792 ? - - m_sincoversize = 0; - m_lp_oversize = 1; - m_sincsize = 0; - m_filtercnt = 1; - m_interp = true; - m_feedmode = false; - - m_filter_coeffs_size = 0; - m_sratein = 44100.0; - m_srateout = 44100.0; - m_ratio = 1.0; - m_filter_ratio = -1.0; - - Reset(); - } - - /// - /// sets the mode - /// if sinc set, it overrides interp or filtercnt - /// - public void SetMode(bool interp, int filtercnt, bool sinc, int sinc_size = 64, int sinc_interpsize = 32) - { - m_sincsize = sinc && sinc_size >= 4 ? sinc_size > 8192 ? 8192 : sinc_size : 0; - m_sincoversize = (m_sincsize != 0) ? (sinc_interpsize <= 1 ? 1 : sinc_interpsize >= 4096 ? 4096 : sinc_interpsize) : 1; - - m_filtercnt = (m_sincsize != 0) ? 0 : (filtercnt <= 0 ? 0 : filtercnt >= WDL_RESAMPLE_MAX_FILTERS ? WDL_RESAMPLE_MAX_FILTERS : filtercnt); - m_interp = interp && (m_sincsize == 0); - - //Debug.WriteLine(String.Format("setting interp={0}, filtercnt={1}, sinc={2},{3}\n", m_interp, m_filtercnt, m_sincsize, m_sincoversize)); - - if (m_sincsize == 0) - { - m_filter_coeffs = new WDL_SincFilterSample[0]; //.Resize(0); - m_filter_coeffs_size = 0; - } - if (m_filtercnt == 0) - { - m_iirfilter = null; - } - } - - /// - /// Sets the filter parameters - /// used for filtercnt>0 but not sinc - /// - public void SetFilterParms(float filterpos = 0.693f, float filterq = 0.707f) - { - m_filterpos = filterpos; - m_filterq = filterq; - } - - /// - /// Set feed mode - /// - /// if true, that means the first parameter to ResamplePrepare will specify however much input you have, not how much you want - public void SetFeedMode(bool wantInputDriven) - { - m_feedmode = wantInputDriven; - } - - /// - /// Reset - /// - public void Reset(double fracpos = 0.0) - { - m_last_requested = 0; - m_filtlatency = 0; - m_fracpos = fracpos; - m_samples_in_rsinbuf = 0; - if (m_iirfilter != null) m_iirfilter.Reset(); - } - - public void SetRates(double rate_in, double rate_out) - { - if (rate_in < 1.0) rate_in = 1.0; - if (rate_out < 1.0) rate_out = 1.0; - if (rate_in != m_sratein || rate_out != m_srateout) - { - m_sratein = rate_in; - m_srateout = rate_out; - m_ratio = m_sratein / m_srateout; - } - } - - // amount of input that has been received but not yet converted to output, in seconds - public double GetCurrentLatency() - { - double v = ((double)m_samples_in_rsinbuf - m_filtlatency) / m_sratein; - - if (v < 0.0) v = 0.0; - return v; - } - - /// - /// Prepare - /// note that it is safe to call ResamplePrepare without calling ResampleOut (the next call of ResamplePrepare will function as normal) - /// nb inbuffer was WDL_ResampleSample **, returning a place to put the in buffer, so we return a buffer and offset - /// - /// req_samples is output samples desired if !wantInputDriven, or if wantInputDriven is input samples that we have - /// - /// - /// - /// returns number of samples desired (put these into *inbuffer) - public int ResamplePrepare(int out_samples, int nch, out WDL_ResampleSample[] inbuffer, out int inbufferOffset) - { - if (nch > WDL_RESAMPLE_MAX_NCH || nch < 1) - { - inbuffer = null; - inbufferOffset = 0; - return 0; - } - - int fsize = 0; - if (m_sincsize > 1) - { - fsize = m_sincsize; - } - - int hfs = fsize / 2; - if (hfs > 1 && m_samples_in_rsinbuf < hfs - 1) - { - m_filtlatency += hfs - 1 - m_samples_in_rsinbuf; - - m_samples_in_rsinbuf = hfs - 1; - - if (m_samples_in_rsinbuf > 0) - { - m_rsinbuf = new WDL_SincFilterSample[m_samples_in_rsinbuf * nch]; - } - } - - int sreq = 0; - - if (!m_feedmode) sreq = (int)(m_ratio * out_samples) + 4 + fsize - m_samples_in_rsinbuf; - else sreq = out_samples; - - if (sreq < 0) sreq = 0; - - again: - Array.Resize(ref m_rsinbuf, (m_samples_in_rsinbuf + sreq) * nch); - - int sz = m_rsinbuf.Length / ((nch != 0) ? nch : 1) - m_samples_in_rsinbuf; - if (sz != sreq) - { - if (sreq > 4 && (sz == 0)) - { - sreq /= 2; - goto again; // try again with half the size - } - // todo: notify of error? - sreq = sz; - } - - inbuffer = m_rsinbuf; - inbufferOffset = m_samples_in_rsinbuf * nch; - - m_last_requested = sreq; - return sreq; - } - - // if numsamples_in < the value return by ResamplePrepare(), then it will be flushed to produce all remaining valid samples - // do NOT call with nsamples_in greater than the value returned from resamplerprpare()! the extra samples will be ignored. - // returns number of samples successfully outputted to out - public int ResampleOut(WDL_ResampleSample[] outBuffer, int outBufferIndex, int nsamples_in, int nsamples_out, int nch) - { - if (nch > WDL_RESAMPLE_MAX_NCH || nch < 1) - { - return 0; - } - - if (m_filtercnt > 0) - { - if (m_ratio > 1.0 && nsamples_in > 0) // filter input - { - if (m_iirfilter == null) m_iirfilter = new WDL_Resampler_IIRFilter(); - - int n = m_filtercnt; - m_iirfilter.setParms((1.0 / m_ratio) * m_filterpos, m_filterq); - - int bufIndex = m_samples_in_rsinbuf * nch; - int a, x; - int offs = 0; - for (x = 0; x < nch; x++) - for (a = 0; a < n; a++) - m_iirfilter.Apply(m_rsinbuf, bufIndex + x, m_rsinbuf, bufIndex + x, nsamples_in, nch, offs++); - } - } - - m_samples_in_rsinbuf += Math.Min(nsamples_in, m_last_requested); // prevent the user from corrupting the internal state - - - int rsinbuf_availtemp = m_samples_in_rsinbuf; - - if (nsamples_in < m_last_requested) // flush out to ensure we can deliver - { - int fsize = (m_last_requested - nsamples_in) * 2 + m_sincsize * 2; - - int alloc_size = (m_samples_in_rsinbuf + fsize) * nch; - Array.Resize(ref m_rsinbuf, alloc_size); - if (m_rsinbuf.Length == alloc_size) - { - Array.Clear(m_rsinbuf, m_samples_in_rsinbuf * nch, fsize * nch); - rsinbuf_availtemp = m_samples_in_rsinbuf + fsize; - } - } - - int ret = 0; - double srcpos = m_fracpos; - double drspos = m_ratio; - int localin = 0; // localin is an index into m_rsinbuf - - int outptr = outBufferIndex; // outptr is an index into outBuffer; - - int ns = nsamples_out; - - int outlatadj = 0; - - if (m_sincsize != 0) // sinc interpolating - { - if (m_ratio > 1.0) BuildLowPass(1.0 / (m_ratio * 1.03)); - else BuildLowPass(1.0); - - int filtsz = m_filter_coeffs_size; - int filtlen = rsinbuf_availtemp - filtsz; - outlatadj = filtsz / 2 - 1; - int filter = 0; // filter is an index into m_filter_coeffs m_filter_coeffs.Get(); - - if (nch == 1) - { - while (ns-- != 0) - { - int ipos = (int)srcpos; - - if (ipos >= filtlen - 1) break; // quit decoding, not enough input samples - - SincSample1(outBuffer, outptr, m_rsinbuf, localin + ipos, srcpos - ipos, m_filter_coeffs, filter, filtsz); - outptr++; - srcpos += drspos; - ret++; - } - } - else if (nch == 2) - { - while (ns-- != 0) - { - int ipos = (int)srcpos; - - if (ipos >= filtlen - 1) break; // quit decoding, not enough input samples - - SincSample2(outBuffer, outptr, m_rsinbuf, localin + ipos * 2, srcpos - ipos, m_filter_coeffs, filter, filtsz); - outptr += 2; - srcpos += drspos; - ret++; - } - } - else - { - while (ns-- != 0) - { - int ipos = (int)srcpos; - - if (ipos >= filtlen - 1) break; // quit decoding, not enough input samples - - SincSample(outBuffer, outptr, m_rsinbuf, localin + ipos * nch, srcpos - ipos, nch, m_filter_coeffs, filter, filtsz); - outptr += nch; - srcpos += drspos; - ret++; - } - } - } - else if (!m_interp) // point sampling - { - if (nch == 1) - { - while (ns-- != 0) - { - int ipos = (int)srcpos; - if (ipos >= rsinbuf_availtemp) break; // quit decoding, not enough input samples - - outBuffer[outptr++] = m_rsinbuf[localin + ipos]; - srcpos += drspos; - ret++; - } - } - else if (nch == 2) - { - while (ns-- != 0) - { - int ipos = (int)srcpos; - if (ipos >= rsinbuf_availtemp) break; // quit decoding, not enough input samples - - ipos += ipos; - - outBuffer[outptr + 0] = m_rsinbuf[localin + ipos]; - outBuffer[outptr + 1] = m_rsinbuf[localin + ipos + 1]; - outptr += 2; - srcpos += drspos; - ret++; - } - } - else - while (ns-- != 0) - { - int ipos = (int)srcpos; - if (ipos >= rsinbuf_availtemp) break; // quit decoding, not enough input samples - - Array.Copy(m_rsinbuf, localin + ipos * nch, outBuffer, outptr, nch); - outptr += nch; - srcpos += drspos; - ret++; - } - } - else // linear interpolation - { - if (nch == 1) - { - while (ns-- != 0) - { - int ipos = (int)srcpos; - double fracpos = srcpos - ipos; - - if (ipos >= rsinbuf_availtemp - 1) - { - break; // quit decoding, not enough input samples - } - - double ifracpos = 1.0 - fracpos; - int inptr = localin + ipos; - outBuffer[outptr++] = (WDL_ResampleSample)(m_rsinbuf[inptr] * (ifracpos) + m_rsinbuf[inptr + 1] * (fracpos)); - srcpos += drspos; - ret++; - } - } - else if (nch == 2) - { - while (ns-- != 0) - { - int ipos = (int)srcpos; - double fracpos = srcpos - ipos; - - if (ipos >= rsinbuf_availtemp - 1) - { - break; // quit decoding, not enough input samples - } - - double ifracpos = 1.0 - fracpos; - int inptr = localin + ipos * 2; - outBuffer[outptr + 0] = (WDL_ResampleSample)(m_rsinbuf[inptr] * (ifracpos) + m_rsinbuf[inptr + 2] * (fracpos)); - outBuffer[outptr + 1] = (WDL_ResampleSample)(m_rsinbuf[inptr + 1] * (ifracpos) + m_rsinbuf[inptr + 3] * (fracpos)); - outptr += 2; - srcpos += drspos; - ret++; - } - } - else - { - while (ns-- != 0) - { - int ipos = (int)srcpos; - double fracpos = srcpos - ipos; - - if (ipos >= rsinbuf_availtemp - 1) - { - break; // quit decoding, not enough input samples - } - - double ifracpos = 1.0 - fracpos; - int ch = nch; - int inptr = localin + ipos * nch; - while (ch-- != 0) - { - outBuffer[outptr++] = (WDL_ResampleSample)(m_rsinbuf[inptr] * (ifracpos) + m_rsinbuf[inptr + nch] * (fracpos)); - inptr++; - } - srcpos += drspos; - ret++; - } - } - } - - if (m_filtercnt > 0) - { - if (m_ratio < 1.0 && ret > 0) // filter output - { - if (m_iirfilter == null) m_iirfilter = new WDL_Resampler_IIRFilter(); - int n = m_filtercnt; - m_iirfilter.setParms(m_ratio * m_filterpos, m_filterq); - - int x, a; - int offs = 0; - for (x = 0; x < nch; x++) - for (a = 0; a < n; a++) - m_iirfilter.Apply(outBuffer, x, outBuffer, x, ret, nch, offs++); - } - } - - if (ret > 0 && rsinbuf_availtemp > m_samples_in_rsinbuf) // we had to pad!! - { - // check for the case where rsinbuf_availtemp>m_samples_in_rsinbuf, decrease ret down to actual valid samples - double adj = (srcpos - m_samples_in_rsinbuf + outlatadj) / drspos; - if (adj > 0) - { - ret -= (int)(adj + 0.5); - if (ret < 0) ret = 0; - } - } - - int isrcpos = (int)srcpos; - m_fracpos = srcpos - isrcpos; - m_samples_in_rsinbuf -= isrcpos; - if (m_samples_in_rsinbuf <= 0) - { - m_samples_in_rsinbuf = 0; - } - else - { - // TODO: bug here - Array.Copy(m_rsinbuf, localin + isrcpos * nch, m_rsinbuf, localin, m_samples_in_rsinbuf * nch); - } - - - - return ret; - } - - // only called in sinc modes - private void BuildLowPass(double filtpos) - { - int wantsize = m_sincsize; - int wantinterp = m_sincoversize; - - if (m_filter_ratio != filtpos || - m_filter_coeffs_size != wantsize || - m_lp_oversize != wantinterp) - { - m_lp_oversize = wantinterp; - m_filter_ratio = filtpos; - - // build lowpass filter - int allocsize = (wantsize + 1) * m_lp_oversize; - Array.Resize(ref m_filter_coeffs, allocsize); - //int cfout = 0; // this is an index into m_filter_coeffs - if (m_filter_coeffs.Length == allocsize) - { - m_filter_coeffs_size = wantsize; - - int sz = wantsize * m_lp_oversize; - int hsz = sz / 2; - double filtpower = 0.0; - double windowpos = 0.0; - double dwindowpos = 2.0 * PI / (double)(sz); - double dsincpos = PI / m_lp_oversize * filtpos; // filtpos is outrate/inrate, i.e. 0.5 is going to half rate - double sincpos = dsincpos * (double)(-hsz); - - int x; - for (x = -hsz; x < hsz + m_lp_oversize; x++) - { - double val = 0.35875 - 0.48829 * Math.Cos(windowpos) + 0.14128 * Math.Cos(2 * windowpos) - 0.01168 * Math.Cos(6 * windowpos); // blackman-harris - if (x != 0) val *= Math.Sin(sincpos) / sincpos; - - windowpos += dwindowpos; - sincpos += dsincpos; - - m_filter_coeffs[hsz + x] = (WDL_SincFilterSample)val; - if (x < hsz) filtpower += val; - } - filtpower = m_lp_oversize / filtpower; - for (x = 0; x < sz + m_lp_oversize; x++) - { - m_filter_coeffs[x] = (WDL_SincFilterSample)(m_filter_coeffs[x] * filtpower); - } - } - else m_filter_coeffs_size = 0; - - } - } - - // SincSample(WDL_ResampleSample *outptr, WDL_ResampleSample *inptr, double fracpos, int nch, WDL_SincFilterSample *filter, int filtsz) - private void SincSample(WDL_ResampleSample[] outBuffer, int outBufferIndex, WDL_ResampleSample[] inBuffer, int inBufferIndex, double fracpos, int nch, WDL_SincFilterSample[] filter, int filterIndex, int filtsz) - { - int oversize = m_lp_oversize; - fracpos *= oversize; - int ifpos = (int)fracpos; - filterIndex += oversize - 1 - ifpos; - fracpos -= ifpos; - - for (int x = 0; x < nch; x++) - { - double sum = 0.0, sum2 = 0.0; - int fptr = filterIndex; - int iptr = inBufferIndex + x; - int i = filtsz; - while (i-- != 0) - { - sum += filter[fptr] * inBuffer[iptr]; - sum2 += filter[fptr + 1] * inBuffer[iptr]; - iptr += nch; - fptr += oversize; - } - outBuffer[outBufferIndex + x] = (WDL_ResampleSample)(sum * fracpos + sum2 * (1.0 - fracpos)); - } - } - - // SincSample1(WDL_ResampleSample* outptr, WDL_ResampleSample* inptr, double fracpos, WDL_SincFilterSample* filter, int filtsz) - private void SincSample1(WDL_ResampleSample[] outBuffer, int outBufferIndex, WDL_ResampleSample[] inBuffer, int inBufferIndex, double fracpos, WDL_SincFilterSample[] filter, int filterIndex, int filtsz) - { - int oversize = m_lp_oversize; - fracpos *= oversize; - int ifpos = (int)fracpos; - filterIndex += oversize - 1 - ifpos; - fracpos -= ifpos; - - double sum = 0.0, sum2 = 0.0; - int fptr = filterIndex; - int iptr = inBufferIndex; - int i = filtsz; - while (i-- != 0) - { - sum += filter[fptr] * inBuffer[iptr]; - sum2 += filter[fptr + 1] * inBuffer[iptr]; - iptr++; - fptr += oversize; - } - outBuffer[outBufferIndex] = (WDL_ResampleSample)(sum * fracpos + sum2 * (1.0 - fracpos)); - } - - // SincSample2(WDL_ResampleSample* outptr, WDL_ResampleSample* inptr, double fracpos, WDL_SincFilterSample* filter, int filtsz) - private void SincSample2(WDL_ResampleSample[] outptr, int outBufferIndex, WDL_ResampleSample[] inBuffer, int inBufferIndex, double fracpos, WDL_SincFilterSample[] filter, int filterIndex, int filtsz) - { - int oversize = m_lp_oversize; - fracpos *= oversize; - int ifpos = (int)fracpos; - filterIndex += oversize - 1 - ifpos; - fracpos -= ifpos; - - double sum = 0.0; - double sum2 = 0.0; - double sumb = 0.0; - double sum2b = 0.0; - int fptr = filterIndex; - int iptr = inBufferIndex; - int i = filtsz / 2; - while (i-- != 0) - { - sum += filter[fptr] * inBuffer[iptr]; - sum2 += filter[fptr] * inBuffer[iptr + 1]; - sumb += filter[fptr + 1] * inBuffer[iptr]; - sum2b += filter[fptr + 1] * inBuffer[iptr + 1]; - sum += filter[fptr + oversize] * inBuffer[iptr + 2]; - sum2 += filter[fptr + oversize] * inBuffer[iptr + 3]; - sumb += filter[fptr + oversize + 1] * inBuffer[iptr + 2]; - sum2b += filter[fptr + oversize + 1] * inBuffer[iptr + 3]; - iptr += 4; - fptr += oversize * 2; - } - outptr[outBufferIndex + 0] = (WDL_ResampleSample)(sum * fracpos + sumb * (1.0 - fracpos)); - outptr[outBufferIndex + 1] = (WDL_ResampleSample)(sum2 * fracpos + sum2b * (1.0 - fracpos)); - } - - private double m_sratein; // WDL_FIXALIGN - private double m_srateout; - private double m_fracpos; - private double m_ratio; - private double m_filter_ratio; - private float m_filterq, m_filterpos; - private WDL_ResampleSample[] m_rsinbuf; // WDL_TypedBuf - private WDL_SincFilterSample[] m_filter_coeffs; // WDL_TypedBuf - - private WDL_Resampler_IIRFilter m_iirfilter; // WDL_Resampler_IIRFilter * - - private int m_filter_coeffs_size; - private int m_last_requested; - private int m_filtlatency; - private int m_samples_in_rsinbuf; - private int m_lp_oversize; - - private int m_sincsize; - private int m_filtercnt; - private int m_sincoversize; - private bool m_interp; - private bool m_feedmode; - - - - class WDL_Resampler_IIRFilter - { - public WDL_Resampler_IIRFilter() - { - m_fpos = -1; - Reset(); - } - - public void Reset() - { - m_hist = new double[WDL_RESAMPLE_MAX_FILTERS * WDL_RESAMPLE_MAX_NCH, 4]; - } - - public void setParms(double fpos, double Q) - { - if (Math.Abs(fpos - m_fpos) < 0.000001) return; - m_fpos = fpos; - - double pos = fpos * PI; - double cpos = Math.Cos(pos); - double spos = Math.Sin(pos); - - double alpha = spos / (2.0 * Q); - - double sc = 1.0 / (1 + alpha); - m_b1 = (1 - cpos) * sc; - m_b2 = m_b0 = m_b1 * 0.5; - m_a1 = -2 * cpos * sc; - m_a2 = (1 - alpha) * sc; - - } - - public void Apply(WDL_ResampleSample[] inBuffer, int inIndex, WDL_ResampleSample[] outBuffer, int outIndex, int ns, int span, int w) - { - double b0 = m_b0, b1 = m_b1, b2 = m_b2, a1 = m_a1, a2 = m_a2; - - while (ns-- != 0) - { - double inx = inBuffer[inIndex]; - inIndex += span; - double outx = (double)(inx * b0 + m_hist[w, 0] * b1 + m_hist[w, 1] * b2 - m_hist[w, 2] * a1 - m_hist[w, 3] * a2); - m_hist[w, 1] = m_hist[w, 0]; - m_hist[w, 0] = inx; - m_hist[w, 3] = m_hist[w, 2]; - m_hist[w, 2] = denormal_filter(outx); - outBuffer[outIndex] = (WDL_ResampleSample)m_hist[w, 2]; - - outIndex += span; - } - } - - double denormal_filter(float x) - { - // TODO: implement denormalisation - return x; - } - double denormal_filter(double x) - { - // TODO: implement denormalisation - return x; - } - - private double m_fpos; - private double m_a1, m_a2; - private double m_b0, m_b1, m_b2; - private double[,] m_hist; - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Dsp/WdlResampler.cs.meta b/Assets/Scripts/Audio/NAudio/Dsp/WdlResampler.cs.meta deleted file mode 100644 index b2f69a7..0000000 --- a/Assets/Scripts/Audio/NAudio/Dsp/WdlResampler.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bee86e5e6465e7e4ab10584357a0daf3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats.meta b/Assets/Scripts/Audio/NAudio/FileFormats.meta deleted file mode 100644 index 673679c..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2422143b74714f04dad3097d6528b523 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Map.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Map.meta deleted file mode 100644 index 0401db0..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Map.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c3fe50b1c8735b94c9a5b3a78eadb83b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkDrumMapping.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkDrumMapping.cs deleted file mode 100644 index 8f76945..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkDrumMapping.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; - -namespace NAudio.FileFormats.Map -{ - /// - /// Represents an entry in a Cakewalk drum map - /// - public class CakewalkDrumMapping - { - /// - /// User customisable note name - /// - public string NoteName { get; set; } - - /// - /// Input MIDI note number - /// - public int InNote { get; set; } - - /// - /// Output MIDI note number - /// - public int OutNote { get; set; } - - /// - /// Output port - /// - public int OutPort { get; set; } - - /// - /// Output MIDI Channel - /// - public int Channel { get; set; } - - /// - /// Velocity adjustment - /// - public int VelocityAdjust { get; set; } - - /// - /// Velocity scaling - in percent - /// - public float VelocityScale { get; set; } - - /// - /// Describes this drum map entry - /// - public override string ToString() - { - return String.Format("{0} In:{1} Out:{2} Ch:{3} Port:{4} Vel+:{5} Vel:{6}%", - NoteName, InNote, OutNote, Channel, OutPort, VelocityAdjust, VelocityScale*100); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkDrumMapping.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkDrumMapping.cs.meta deleted file mode 100644 index b610d4c..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkDrumMapping.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 55c434c136dfab543b1e2edb9e074e83 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkMapFile.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkMapFile.cs deleted file mode 100644 index d4fe64e..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkMapFile.cs +++ /dev/null @@ -1,167 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.IO; - -namespace NAudio.FileFormats.Map -{ - /// - /// Represents a Cakewalk Drum Map file (.map) - /// - public class CakewalkMapFile - { - private int mapEntryCount; - private readonly List drumMappings; - private MapBlockHeader fileHeader1; - private MapBlockHeader fileHeader2; - private MapBlockHeader mapNameHeader; - private MapBlockHeader outputs1Header; - private MapBlockHeader outputs2Header; - private MapBlockHeader outputs3Header; - int outputs1Count; - int outputs2Count; - int outputs3Count; - - private string mapName; - - /// - /// Parses a Cakewalk Drum Map file - /// - /// Path of the .map file - public CakewalkMapFile(string filename) - { - using (var reader = new BinaryReader(File.OpenRead(filename),Encoding.Unicode)) - { - drumMappings = new List(); - ReadMapHeader(reader); - for (int n = 0; n < mapEntryCount; n++) - { - drumMappings.Add(ReadMapEntry(reader)); - } - ReadMapName(reader); - ReadOutputsSection1(reader); - if (reader.BaseStream.Position == reader.BaseStream.Length) - return; - ReadOutputsSection2(reader); - if (reader.BaseStream.Position == reader.BaseStream.Length) - return; - ReadOutputsSection3(reader); - System.Diagnostics.Debug.Assert(reader.BaseStream.Position == reader.BaseStream.Length); - } - } - - /// - /// The drum mappings in this drum map - /// - public List DrumMappings - { - get { return drumMappings; } - } - - - private void ReadMapHeader(BinaryReader reader) - { - fileHeader1 = MapBlockHeader.Read(reader); - fileHeader2 = MapBlockHeader.Read(reader); - mapEntryCount = reader.ReadInt32(); - } - - private CakewalkDrumMapping ReadMapEntry(BinaryReader reader) - { - var mapping = new CakewalkDrumMapping(); - reader.ReadInt32(); // unknown - mapping.InNote = reader.ReadInt32(); - reader.ReadInt32(); // unknown - reader.ReadInt32(); // unknown - reader.ReadInt32(); // unknown - reader.ReadInt32(); // unknown - reader.ReadInt32(); // unknown - reader.ReadInt32(); // unknown - mapping.VelocityScale = reader.ReadSingle(); - mapping.Channel = reader.ReadInt32(); - mapping.OutNote = reader.ReadInt32(); - mapping.OutPort = reader.ReadInt32(); - mapping.VelocityAdjust = reader.ReadInt32(); - char[] name = reader.ReadChars(32); - int nameLength; - for (nameLength = 0; nameLength < name.Length; nameLength++) - { - if (name[nameLength] == 0) - break; - } - mapping.NoteName = new string(name, 0, nameLength); - return mapping; - } - - - private void ReadMapName(BinaryReader reader) - { - mapNameHeader = MapBlockHeader.Read(reader); - char[] name = reader.ReadChars(34); - int nameLength; - for (nameLength = 0; nameLength < name.Length; nameLength++) - { - if (name[nameLength] == 0) - break; - } - mapName = new string(name,0,nameLength); - reader.ReadBytes(98); // unknown - } - - private void ReadOutputsSection1(BinaryReader reader) - { - outputs1Header = MapBlockHeader.Read(reader); - outputs1Count = reader.ReadInt32(); - for (int n = 0; n < outputs1Count; n++) - { - reader.ReadBytes(20); // data - } - } - - private void ReadOutputsSection2(BinaryReader reader) - { - outputs2Header = MapBlockHeader.Read(reader); - outputs2Count = reader.ReadInt32(); - for (int n = 0; n < outputs2Count; n++) - { - reader.ReadBytes(24); // data - } - } - - private void ReadOutputsSection3(BinaryReader reader) - { - outputs3Header = MapBlockHeader.Read(reader); - if (outputs3Header.Length > 0) - { - outputs3Count = reader.ReadInt32(); - for (int n = 0; n < outputs3Count; n++) - { - reader.ReadBytes(36); // data - } - } - } - - /// - /// Describes this drum map - /// - public override string ToString() - { - var sb = new StringBuilder(); - sb.AppendFormat("FileHeader1: {0}\r\n", fileHeader1); - sb.AppendFormat("FileHeader2: {0}\r\n", fileHeader2); - sb.AppendFormat("MapEntryCount: {0}\r\n", mapEntryCount); - foreach (var mapping in drumMappings) - { - sb.AppendFormat(" Map: {0}\r\n", mapping); - } - sb.AppendFormat("MapNameHeader: {0}\r\n", mapNameHeader); - sb.AppendFormat("MapName: {0}\r\n", mapName); - sb.AppendFormat("Outputs1Header: {0} Count: {1}\r\n", outputs1Header, outputs1Count); - sb.AppendFormat("Outputs2Header: {0} Count: {1}\r\n", outputs2Header, outputs2Count); - sb.AppendFormat("Outputs3Header: {0} Count: {1}\r\n", outputs3Header, outputs3Count); - return sb.ToString(); - } - } - - -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkMapFile.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkMapFile.cs.meta deleted file mode 100644 index cc8d56f..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Map/CakewalkMapFile.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 45504aae605c6b74d9d4062944d03b1e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Map/MapBlockHeader.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Map/MapBlockHeader.cs deleted file mode 100644 index ea54382..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Map/MapBlockHeader.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.FileFormats.Map -{ - class MapBlockHeader - { - int length; // surely this is length - int value2; - short value3; - short value4; - - public static MapBlockHeader Read(BinaryReader reader) - { - var header = new MapBlockHeader(); - header.length = reader.ReadInt32(); // usually first 2 bytes have a value - header.value2 = reader.ReadInt32(); // usually 0 - header.value3 = reader.ReadInt16(); // 0,1,2,3 - header.value4 = reader.ReadInt16(); // 0x1017 (sometimes 0x1018 - return header; - } - - public override string ToString() - { - return String.Format("{0} {1:X8} {2:X4} {3:X4}", - length, value2, value3, value4); - } - - public int Length - { - get { return length; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Map/MapBlockHeader.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Map/MapBlockHeader.cs.meta deleted file mode 100644 index 09c9344..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Map/MapBlockHeader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ace853f3c63118940b2863bbabeee0d8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3.meta deleted file mode 100644 index d2155d3..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 06e7c154f6afd1642a6b6cb8ae76288c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/ChannelMode.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/ChannelMode.cs deleted file mode 100644 index ad0bb2f..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/ChannelMode.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Channel Mode - /// - public enum ChannelMode - { - /// - /// Stereo - /// - Stereo, - /// - /// Joint Stereo - /// - JointStereo, - /// - /// Dual Channel - /// - DualChannel, - /// - /// Mono - /// - Mono - } - -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/ChannelMode.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/ChannelMode.cs.meta deleted file mode 100644 index 6b0824c..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/ChannelMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bf7cfbbda389cc74eaac977e8e0c3992 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/DmoMp3FrameDecompressor.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/DmoMp3FrameDecompressor.cs deleted file mode 100644 index f21ba3e..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/DmoMp3FrameDecompressor.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Dmo; -using NAudio.Wave; -using System.Diagnostics; - -namespace NAudio.FileFormats.Mp3 -{ - /// - /// MP3 Frame decompressor using the Windows Media MP3 Decoder DMO object - /// - public class DmoMp3FrameDecompressor : IMp3FrameDecompressor - { - private WindowsMediaMp3Decoder mp3Decoder; - private WaveFormat pcmFormat; - private MediaBuffer inputMediaBuffer; - private DmoOutputDataBuffer outputBuffer; - private bool reposition; - - /// - /// Initializes a new instance of the DMO MP3 Frame decompressor - /// - /// - public DmoMp3FrameDecompressor(WaveFormat sourceFormat) - { - this.mp3Decoder = new WindowsMediaMp3Decoder(); - if (!mp3Decoder.MediaObject.SupportsInputWaveFormat(0, sourceFormat)) - { - throw new ArgumentException("Unsupported input format"); - } - mp3Decoder.MediaObject.SetInputWaveFormat(0, sourceFormat); - pcmFormat = new WaveFormat(sourceFormat.SampleRate, sourceFormat.Channels); // 16 bit - if (!mp3Decoder.MediaObject.SupportsOutputWaveFormat(0, pcmFormat)) - { - throw new ArgumentException(String.Format("Unsupported output format {0}", pcmFormat)); - } - mp3Decoder.MediaObject.SetOutputWaveFormat(0, pcmFormat); - - // a second is more than enough to decompress a frame at a time - inputMediaBuffer = new MediaBuffer(sourceFormat.AverageBytesPerSecond); - outputBuffer = new DmoOutputDataBuffer(pcmFormat.AverageBytesPerSecond); - } - - /// - /// Converted PCM WaveFormat - /// - public WaveFormat OutputFormat { get { return pcmFormat; } } - - /// - /// Decompress a single frame of MP3 - /// - public int DecompressFrame(Mp3Frame frame, byte[] dest, int destOffset) - { - // 1. copy into our DMO's input buffer - inputMediaBuffer.LoadData(frame.RawData, frame.FrameLength); - - if (reposition) - { - mp3Decoder.MediaObject.Flush(); - reposition = false; - } - - // 2. Give the input buffer to the DMO to process - mp3Decoder.MediaObject.ProcessInput(0, inputMediaBuffer, DmoInputDataBufferFlags.None, 0, 0); - - outputBuffer.MediaBuffer.SetLength(0); - outputBuffer.StatusFlags = DmoOutputDataBufferFlags.None; - - // 3. Now ask the DMO for some output data - mp3Decoder.MediaObject.ProcessOutput(DmoProcessOutputFlags.None, 1, new[] { outputBuffer }); - - if (outputBuffer.Length == 0) - { - Debug.WriteLine("ResamplerDmoStream.Read: No output data available"); - return 0; - } - - // 5. Now get the data out of the output buffer - outputBuffer.RetrieveData(dest, destOffset); - Debug.Assert(!outputBuffer.MoreDataAvailable, "have not implemented more data available yet"); - - return outputBuffer.Length; - } - - /// - /// Alerts us that a reposition has occured so the MP3 decoder needs to reset its state - /// - public void Reset() - { - reposition = true; - } - - /// - /// Dispose of this obejct and clean up resources - /// - public void Dispose() - { - if (inputMediaBuffer != null) - { - inputMediaBuffer.Dispose(); - inputMediaBuffer = null; - } - outputBuffer.Dispose(); - if (mp3Decoder!= null) - { - mp3Decoder.Dispose(); - mp3Decoder = null; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/DmoMp3FrameDecompressor.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/DmoMp3FrameDecompressor.cs.meta deleted file mode 100644 index 52cb7cf..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/DmoMp3FrameDecompressor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e1f6517e7631da24bab352bd19dd1db4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/IMp3FrameDecompressor.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/IMp3FrameDecompressor.cs deleted file mode 100644 index 4bb945d..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/IMp3FrameDecompressor.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Interface for MP3 frame by frame decoder - /// - public interface IMp3FrameDecompressor : IDisposable - { - /// - /// Decompress a single MP3 frame - /// - /// Frame to decompress - /// Output buffer - /// Offset within output buffer - /// Bytes written to output buffer - int DecompressFrame(Mp3Frame frame, byte[] dest, int destOffset); - - /// - /// Tell the decoder that we have repositioned - /// - void Reset(); - - /// - /// PCM format that we are converting into - /// - WaveFormat OutputFormat { get; } - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/IMp3FrameDecompressor.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/IMp3FrameDecompressor.cs.meta deleted file mode 100644 index 004a95a..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/IMp3FrameDecompressor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5587926c847aef744922aa00dcdb1bbd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Id3v2Tag.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Id3v2Tag.cs deleted file mode 100644 index 9301e12..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Id3v2Tag.cs +++ /dev/null @@ -1,238 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.IO; -using NAudio.Utils; - -namespace NAudio.Wave -{ - /// - /// An ID3v2 Tag - /// - public class Id3v2Tag - { - private long tagStartPosition; - private long tagEndPosition; - private byte[] rawData; - - /// - /// Reads an ID3v2 tag from a stream - /// - public static Id3v2Tag ReadTag(Stream input) - { - try - { - return new Id3v2Tag(input); - } - catch (FormatException) - { - return null; - } - } - - #region Id3v2 Creation from key-value pairs - - /// - /// Creates a new ID3v2 tag from a collection of key-value pairs. - /// - /// A collection of key-value pairs containing the tags to include in the ID3v2 tag. - /// A new ID3v2 tag - public static Id3v2Tag Create(IEnumerable> tags) - { - return Id3v2Tag.ReadTag(CreateId3v2TagStream(tags)); - } - - /// - /// Convert the frame size to a byte array. - /// - /// The frame body size. - /// - static byte[] FrameSizeToBytes(int n) - { - byte[] result = BitConverter.GetBytes(n); - Array.Reverse(result); - return result; - } - - /// - /// Creates an ID3v2 frame for the given key-value pair. - /// - /// - /// - /// - static byte[] CreateId3v2Frame(string key, string value) - { - if (string.IsNullOrEmpty(key)) - { - throw new ArgumentNullException("key"); - } - - if (string.IsNullOrEmpty(value)) - { - throw new ArgumentNullException("value"); - } - - if (key.Length != 4) - { - throw new ArgumentOutOfRangeException("key", "key " + key + " must be 4 characters long"); - } - - const byte UnicodeEncoding = 01; // encode text in Unicode - byte[] UnicodeOrder = new byte[] { 0xff, 0xfe }; // Unicode byte order mark - byte[] language = new byte[] { 0, 0, 0 }; // language is empty (only used in COMM -> comment) - byte[] shortDescription = new byte[] { 0, 0 }; // short description is empty (only used in COMM -> comment) - - byte[] body; - if (key == "COMM") // comment - { - body = ByteArrayExtensions.Concat( - new byte[] { UnicodeEncoding }, - language, - shortDescription, - UnicodeOrder, - Encoding.Unicode.GetBytes(value)); - } - else - { - body = ByteArrayExtensions.Concat( - new byte[] { UnicodeEncoding }, - UnicodeOrder, - Encoding.Unicode.GetBytes(value)); - } - - return ByteArrayExtensions.Concat( - // needs review - have converted to UTF8 as Win 8 has no Encoding.ASCII, - // need to check what the rules are for ID3v2 tag identifiers - Encoding.UTF8.GetBytes(key), - FrameSizeToBytes(body.Length), - new byte[] { 0, 0 }, // flags - body); - } - - /// - /// Gets the Id3v2 Header size. The size is encoded so that only 7 bits per byte are actually used. - /// - /// - /// - static byte[] GetId3TagHeaderSize(int size) - { - byte[] result = new byte[4]; - for (int idx = result.Length - 1; idx >= 0; idx--) - { - result[idx] = (byte)(size % 128); - size = size / 128; - } - - return result; - } - - /// - /// Creates the Id3v2 tag header and returns is as a byte array. - /// - /// The Id3v2 frames that will be included in the file. This is used to calculate the ID3v2 tag size. - /// - static byte[] CreateId3v2TagHeader(IEnumerable frames) - { - int size = 0; - foreach (byte[] frame in frames) - { - size += frame.Length; - } - - byte[] tagHeader = ByteArrayExtensions.Concat( - Encoding.UTF8.GetBytes("ID3"), - new byte[] { 3, 0 }, // version - new byte[] { 0 }, // flags - GetId3TagHeaderSize(size)); - return tagHeader; - } - - /// - /// Creates the Id3v2 tag for the given key-value pairs and returns it in the a stream. - /// - /// - /// - static Stream CreateId3v2TagStream(IEnumerable> tags) - { - List frames = new List(); - foreach (KeyValuePair tag in tags) - { - frames.Add(CreateId3v2Frame(tag.Key, tag.Value)); - } - - byte[] header = CreateId3v2TagHeader(frames); - - MemoryStream ms = new MemoryStream(); - ms.Write(header, 0, header.Length); - foreach (byte[] frame in frames) - { - ms.Write(frame, 0, frame.Length); - } - - ms.Position = 0; - return ms; - } - - #endregion - - private Id3v2Tag(Stream input) - { - tagStartPosition = input.Position; - var reader = new BinaryReader(input); - byte[] headerBytes = reader.ReadBytes(10); - if ((headerBytes.Length >= 3) && - (headerBytes[0] == (byte)'I') && - (headerBytes[1] == (byte)'D') && - (headerBytes[2] == '3')) - { - - // http://www.id3.org/develop.html - // OK found an ID3 tag - // bytes 3 & 4 are ID3v2 version - - if ((headerBytes[5] & 0x40) == 0x40) - { - // extended header present - byte[] extendedHeader = reader.ReadBytes(4); - int extendedHeaderLength = extendedHeader[0] * (1 << 21); - extendedHeaderLength += extendedHeader[1] * (1 << 14); - extendedHeaderLength += extendedHeader[2] * (1 << 7); - extendedHeaderLength += extendedHeader[3]; - } - - // synchsafe - int dataLength = headerBytes[6] * (1 << 21); - dataLength += headerBytes[7] * (1 << 14); - dataLength += headerBytes[8] * (1 << 7); - dataLength += headerBytes[9]; - byte[] tagData = reader.ReadBytes(dataLength); - - if ((headerBytes[5] & 0x10) == 0x10) - { - // footer present - byte[] footer = reader.ReadBytes(10); - } - } - else - { - input.Position = tagStartPosition; - throw new FormatException("Not an ID3v2 tag"); - } - tagEndPosition = input.Position; - input.Position = tagStartPosition; - rawData = reader.ReadBytes((int)(tagEndPosition - tagStartPosition)); - - } - - /// - /// Raw data from this tag - /// - public byte[] RawData - { - get - { - return rawData; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Id3v2Tag.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Id3v2Tag.cs.meta deleted file mode 100644 index 2fb7933..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Id3v2Tag.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 67981b21a009776408895cbec8794b96 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3Frame.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3Frame.cs deleted file mode 100644 index bfbfb3c..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3Frame.cs +++ /dev/null @@ -1,280 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.IO; - -namespace NAudio.Wave -{ - - /// - /// Represents an MP3 Frame - /// - public class Mp3Frame - { - private static readonly int[,,] bitRates = new int[,,] { - { - // MPEG Version 1 - { 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448 }, // Layer 1 - { 0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384 }, // Layer 2 - { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 }, // Layer 3 - }, - { - // MPEG Version 2 & 2.5 - { 0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256 }, // Layer 1 - { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160 }, // Layer 2 - { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160 }, // Layer 3 (same as layer 2) - } - }; - private static readonly int[,] samplesPerFrame = new int[,] { - { // MPEG Version 1 - 384, // Layer1 - 1152, // Layer2 - 1152 // Layer3 - }, - { // MPEG Version 2 & 2.5 - 384, // Layer1 - 1152, // Layer2 - 576 // Layer3 - } - }; - - private static readonly int[] sampleRatesVersion1 = new int[] {44100, 48000, 32000}; - private static readonly int[] sampleRatesVersion2 = new int[] {22050, 24000, 16000}; - private static readonly int[] sampleRatesVersion25 = new int[] {11025, 12000, 8000}; - - //private short crc; - private const int MaxFrameLength = 16*1024; - - /// - /// Reads an MP3 frame from a stream - /// - /// input stream - /// A valid MP3 frame, or null if none found - public static Mp3Frame LoadFromStream(Stream input) - { - return LoadFromStream(input, true); - } - - /// Reads an MP3Frame from a stream - /// http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm has some good info - /// also see http://www.codeproject.com/KB/audio-video/mpegaudioinfo.aspx - /// - /// A valid MP3 frame, or null if none found - public static Mp3Frame LoadFromStream(Stream input, bool readData) - { - var frame = new Mp3Frame(); - frame.FileOffset = input.Position; - byte[] headerBytes = new byte[4]; - int bytesRead = input.Read(headerBytes, 0, headerBytes.Length); - if (bytesRead < headerBytes.Length) - { - // reached end of stream, no more MP3 frames - return null; - } - while (!IsValidHeader(headerBytes, frame)) - { - // shift down by one and try again - headerBytes[0] = headerBytes[1]; - headerBytes[1] = headerBytes[2]; - headerBytes[2] = headerBytes[3]; - bytesRead = input.Read(headerBytes, 3, 1); - if (bytesRead < 1) - { - return null; - } - frame.FileOffset++; - } - /* no longer read the CRC since we include this in framelengthbytes - if (this.crcPresent) - this.crc = reader.ReadInt16();*/ - - int bytesRequired = frame.FrameLength - 4; - if (readData) - { - frame.RawData = new byte[frame.FrameLength]; - Array.Copy(headerBytes, frame.RawData, 4); - bytesRead = input.Read(frame.RawData, 4, bytesRequired); - if (bytesRead < bytesRequired) - { - // TODO: could have an option to suppress this, although it does indicate a corrupt file - // for now, caller should handle this exception - throw new EndOfStreamException("Unexpected end of stream before frame complete"); - } - } - else - { - // n.b. readData should not be false if input stream does not support seeking - input.Position += bytesRequired; - } - - return frame; - } - - - /// - /// Constructs an MP3 frame - /// - private Mp3Frame() - { - - } - - /// - /// checks if the four bytes represent a valid header, - /// if they are, will parse the values into Mp3Frame - /// - private static bool IsValidHeader(byte[] headerBytes, Mp3Frame frame) - { - if ((headerBytes[0] == 0xFF) && ((headerBytes[1] & 0xE0) == 0xE0)) - { - // TODO: could do with a bitstream class here - frame.MpegVersion = (MpegVersion) ((headerBytes[1] & 0x18) >> 3); - if (frame.MpegVersion == MpegVersion.Reserved) - { - //throw new FormatException("Unsupported MPEG Version"); - return false; - } - - frame.MpegLayer = (MpegLayer) ((headerBytes[1] & 0x06) >> 1); - - if (frame.MpegLayer == MpegLayer.Reserved) - { - return false; - } - int layerIndex = frame.MpegLayer == MpegLayer.Layer1 ? 0 : frame.MpegLayer == MpegLayer.Layer2 ? 1 : 2; - frame.CrcPresent = (headerBytes[1] & 0x01) == 0x00; - frame.BitRateIndex = (headerBytes[2] & 0xF0) >> 4; - if (frame.BitRateIndex == 15) - { - // invalid index - return false; - } - int versionIndex = frame.MpegVersion == Wave.MpegVersion.Version1 ? 0 : 1; - frame.BitRate = bitRates[versionIndex, layerIndex, frame.BitRateIndex]*1000; - if (frame.BitRate == 0) - { - return false; - } - int sampleFrequencyIndex = (headerBytes[2] & 0x0C) >> 2; - if (sampleFrequencyIndex == 3) - { - return false; - } - - if (frame.MpegVersion == MpegVersion.Version1) - { - frame.SampleRate = sampleRatesVersion1[sampleFrequencyIndex]; - } - else if (frame.MpegVersion == MpegVersion.Version2) - { - frame.SampleRate = sampleRatesVersion2[sampleFrequencyIndex]; - } - else - { - // mpegVersion == MpegVersion.Version25 - frame.SampleRate = sampleRatesVersion25[sampleFrequencyIndex]; - } - - bool padding = (headerBytes[2] & 0x02) == 0x02; - bool privateBit = (headerBytes[2] & 0x01) == 0x01; - frame.ChannelMode = (ChannelMode) ((headerBytes[3] & 0xC0) >> 6); - frame.ChannelExtension = (headerBytes[3] & 0x30) >> 4; - if (frame.ChannelExtension != 0 && frame.ChannelMode != ChannelMode.JointStereo) - { - return false; - } - - - frame.Copyright = (headerBytes[3] & 0x08) == 0x08; - bool original = (headerBytes[3] & 0x04) == 0x04; - int emphasis = (headerBytes[3] & 0x03); - - int nPadding = padding ? 1 : 0; - - frame.SampleCount = samplesPerFrame[versionIndex, layerIndex]; - int coefficient = frame.SampleCount/8; - if (frame.MpegLayer == MpegLayer.Layer1) - { - frame.FrameLength = (coefficient*frame.BitRate/frame.SampleRate + nPadding)*4; - } - else - { - frame.FrameLength = (coefficient*frame.BitRate)/frame.SampleRate + nPadding; - } - - if (frame.FrameLength > MaxFrameLength) - { - return false; - } - return true; - } - return false; - } - - /// - /// Sample rate of this frame - /// - public int SampleRate { get; private set; } - - /// - /// Frame length in bytes - /// - public int FrameLength { get; private set; } - - /// - /// Bit Rate - /// - public int BitRate { get; private set; } - - /// - /// Raw frame data (includes header bytes) - /// - public byte[] RawData { get; private set; } - - /// - /// MPEG Version - /// - public MpegVersion MpegVersion { get; private set; } - - /// - /// MPEG Layer - /// - public MpegLayer MpegLayer { get; private set; } - - /// - /// Channel Mode - /// - public ChannelMode ChannelMode { get; private set; } - - /// - /// The number of samples in this frame - /// - public int SampleCount { get; private set; } - - /// - /// The channel extension bits - /// - public int ChannelExtension { get; private set; } - - /// - /// The bitrate index (directly from the header) - /// - public int BitRateIndex { get; private set; } - - /// - /// Whether the Copyright bit is set - /// - public bool Copyright { get; private set; } - - /// - /// Whether a CRC is present - /// - public bool CrcPresent { get; private set; } - - - /// - /// Not part of the MP3 frame itself - indicates where in the stream we found this header - /// - public long FileOffset { get; private set; } - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3Frame.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3Frame.cs.meta deleted file mode 100644 index f75bd38..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3Frame.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8a5e20bfd59a26349acfacf939efc956 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3FrameDecompressor.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3FrameDecompressor.cs deleted file mode 100644 index e6a2870..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3FrameDecompressor.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using NAudio.Wave.Compression; - -namespace NAudio.Wave -{ - /// - /// MP3 Frame Decompressor using ACM - /// - public class AcmMp3FrameDecompressor : IMp3FrameDecompressor - { - private readonly AcmStream conversionStream; - private readonly WaveFormat pcmFormat; - private bool disposed; - - /// - /// Creates a new ACM frame decompressor - /// - /// The MP3 source format - public AcmMp3FrameDecompressor(WaveFormat sourceFormat) - { - this.pcmFormat = AcmStream.SuggestPcmFormat(sourceFormat); - try - { - conversionStream = new AcmStream(sourceFormat, pcmFormat); - } - catch (Exception) - { - disposed = true; - GC.SuppressFinalize(this); - throw; - } - } - - /// - /// Output format (PCM) - /// - public WaveFormat OutputFormat { get { return pcmFormat; } } - - /// - /// Decompresses a frame - /// - /// The MP3 frame - /// destination buffer - /// Offset within destination buffer - /// Bytes written into destination buffer - public int DecompressFrame(Mp3Frame frame, byte[] dest, int destOffset) - { - if (frame == null) - { - throw new ArgumentNullException("frame", "You must provide a non-null Mp3Frame to decompress"); - } - Array.Copy(frame.RawData, conversionStream.SourceBuffer, frame.FrameLength); - int sourceBytesConverted = 0; - int converted = conversionStream.Convert(frame.FrameLength, out sourceBytesConverted); - if (sourceBytesConverted != frame.FrameLength) - { - throw new InvalidOperationException(String.Format("Couldn't convert the whole MP3 frame (converted {0}/{1})", - sourceBytesConverted, frame.FrameLength)); - } - Array.Copy(conversionStream.DestBuffer, 0, dest, destOffset, converted); - return converted; - } - - /// - /// Resets the MP3 Frame Decompressor after a reposition operation - /// - public void Reset() - { - conversionStream.Reposition(); - } - - /// - /// Disposes of this MP3 frame decompressor - /// - public void Dispose() - { - if (!disposed) - { - disposed = true; - if(conversionStream != null) - conversionStream.Dispose(); - GC.SuppressFinalize(this); - } - } - - /// - /// Finalizer ensuring that resources get released properly - /// - ~AcmMp3FrameDecompressor() - { - System.Diagnostics.Debug.Assert(false, "AcmMp3FrameDecompressor Dispose was not called"); - Dispose(); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3FrameDecompressor.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3FrameDecompressor.cs.meta deleted file mode 100644 index 990c45b..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/Mp3FrameDecompressor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b6eeab902e791b24a9818f8e541d0a12 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegLayer.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegLayer.cs deleted file mode 100644 index a08db4d..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegLayer.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// MPEG Layer flags - /// - public enum MpegLayer - { - /// - /// Reserved - /// - Reserved, - /// - /// Layer 3 - /// - Layer3, - /// - /// Layer 2 - /// - Layer2, - /// - /// Layer 1 - /// - Layer1 - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegLayer.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegLayer.cs.meta deleted file mode 100644 index 260dc06..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegLayer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f8f6e03c9f1455548a079b6dd8a3efde -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegVersion.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegVersion.cs deleted file mode 100644 index 85a56fb..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegVersion.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// MPEG Version Flags - /// - public enum MpegVersion - { - /// - /// Version 2.5 - /// - Version25, - /// - /// Reserved - /// - Reserved, - /// - /// Version 2 - /// - Version2, - /// - /// Version 1 - /// - Version1 - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegVersion.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegVersion.cs.meta deleted file mode 100644 index 675cad4..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/MpegVersion.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 298ccce7c3cc66a41883af6d39c2a35e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/XingHeader.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/XingHeader.cs deleted file mode 100644 index 1fe9635..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/XingHeader.cs +++ /dev/null @@ -1,188 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Represents a Xing VBR header - /// - public class XingHeader - { - [Flags] - enum XingHeaderOptions - { - Frames = 1, - Bytes = 2, - Toc = 4, - VbrScale = 8 - } - - private static int[] sr_table = { 44100, 48000, 32000, 99999 }; - private int vbrScale = -1; - private int startOffset; - private int endOffset; - - private int tocOffset = -1; - private int framesOffset = -1; - private int bytesOffset = -1; - private Mp3Frame frame; - - private static int ReadBigEndian(byte[] buffer, int offset) - { - int x; - // big endian extract - x = buffer[offset+0]; - x <<= 8; - x |= buffer[offset+1]; - x <<= 8; - x |= buffer[offset+2]; - x <<= 8; - x |= buffer[offset+3]; - - return x; - } - - private void WriteBigEndian(byte[] buffer, int offset, int value) - { - byte[] littleEndian = BitConverter.GetBytes(value); - for (int n = 0; n < 4; n++) - { - buffer[offset + 3 - n] = littleEndian[n]; - } - } - - /// - /// Load Xing Header - /// - /// Frame - /// Xing Header - public static XingHeader LoadXingHeader(Mp3Frame frame) - { - XingHeader xingHeader = new XingHeader(); - xingHeader.frame = frame; - int offset = 0; - - if (frame.MpegVersion == MpegVersion.Version1) - { - if (frame.ChannelMode != ChannelMode.Mono) - offset = 32 + 4; - else - offset = 17 + 4; - } - else if (frame.MpegVersion == MpegVersion.Version2) - { - if (frame.ChannelMode != ChannelMode.Mono) - offset = 17 + 4; - else - offset = 9 + 4; - } - else - { - return null; - // throw new FormatException("Unsupported MPEG Version"); - } - - if ((frame.RawData[offset + 0] == 'X') && - (frame.RawData[offset + 1] == 'i') && - (frame.RawData[offset + 2] == 'n') && - (frame.RawData[offset + 3] == 'g')) - { - xingHeader.startOffset = offset; - offset += 4; - } - else - { - return null; - } - - XingHeaderOptions flags = (XingHeaderOptions)ReadBigEndian(frame.RawData, offset); - offset += 4; - - if ((flags & XingHeaderOptions.Frames) != 0) - { - xingHeader.framesOffset = offset; - offset += 4; - } - if ((flags & XingHeaderOptions.Bytes) != 0) - { - xingHeader.bytesOffset = offset; - offset += 4; - } - if ((flags & XingHeaderOptions.Toc) != 0) - { - xingHeader.tocOffset = offset; - offset += 100; - } - if ((flags & XingHeaderOptions.VbrScale) != 0) - { - xingHeader.vbrScale = ReadBigEndian(frame.RawData, offset); - offset += 4; - } - xingHeader.endOffset = offset; - return xingHeader; - } - - /// - /// Sees if a frame contains a Xing header - /// - private XingHeader() - { - } - - /// - /// Number of frames - /// - public int Frames - { - get - { - if(framesOffset == -1) - return -1; - return ReadBigEndian(frame.RawData, framesOffset); - } - set - { - if (framesOffset == -1) - throw new InvalidOperationException("Frames flag is not set"); - WriteBigEndian(frame.RawData, framesOffset, value); - } - } - - /// - /// Number of bytes - /// - public int Bytes - { - get - { - if(bytesOffset == -1) - return -1; - return ReadBigEndian(frame.RawData, bytesOffset); - } - set - { - if (framesOffset == -1) - throw new InvalidOperationException("Bytes flag is not set"); - WriteBigEndian(frame.RawData, bytesOffset, value); - } - } - - /// - /// VBR Scale property - /// - public int VbrScale - { - get { return vbrScale; } - } - - /// - /// The MP3 frame - /// - public Mp3Frame Mp3Frame - { - get { return frame; } - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/XingHeader.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/XingHeader.cs.meta deleted file mode 100644 index e098b03..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Mp3/XingHeader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 424e9dbc7f9079f4eac6d6c6c146f363 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont.meta deleted file mode 100644 index 2928373..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f2f3552f062812a4086183741423144e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Generator.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Generator.cs deleted file mode 100644 index d1e0a4f..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Generator.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; - -namespace NAudio.SoundFont -{ - /// - /// Soundfont generator - /// - public class Generator - { - private GeneratorEnum generatorType; - private ushort rawAmount; - private Instrument instrument; - private SampleHeader sampleHeader; - - /// - /// Gets the generator type - /// - public GeneratorEnum GeneratorType - { - get - { - return generatorType; - } - set - { - generatorType = value; - } - } - - /// - /// Generator amount as an unsigned short - /// - public ushort UInt16Amount - { - get - { - return rawAmount; - } - set - { - rawAmount = value; - } - } - - /// - /// Generator amount as a signed short - /// - public short Int16Amount - { - get - { - return (short) rawAmount; - } - set - { - rawAmount = (ushort) value; - } - } - - /// - /// Low byte amount - /// - public byte LowByteAmount - { - get - { - return (byte) (rawAmount & 0x00FF); - } - set - { - rawAmount &= 0xFF00; - rawAmount += value; - } - } - - /// - /// High byte amount - /// - public byte HighByteAmount - { - get - { - return (byte) ((rawAmount & 0xFF00) >> 8); - } - set - { - rawAmount &= 0x00FF; - rawAmount += (ushort) (value << 8); - } - } - - /// - /// Instrument - /// - public Instrument Instrument - { - get - { - return instrument; - } - set - { - instrument = value; - } - } - - /// - /// Sample Header - /// - public SampleHeader SampleHeader - { - get - { - return sampleHeader; - } - set - { - sampleHeader = value; - } - } - - /// - /// - /// - public override string ToString() - { - if(generatorType == GeneratorEnum.Instrument) - return String.Format("Generator Instrument {0}",instrument.Name); - else if(generatorType == GeneratorEnum.SampleID) - return String.Format("Generator SampleID {0}",sampleHeader); - else - return String.Format("Generator {0} {1}",generatorType,rawAmount); - } - - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Generator.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Generator.cs.meta deleted file mode 100644 index acba1b4..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Generator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d3454979a22e1a14fba25b4553f8264a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorBuilder.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorBuilder.cs deleted file mode 100644 index 55b9179..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorBuilder.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.SoundFont -{ - internal class GeneratorBuilder : StructureBuilder - { - public override Generator Read(BinaryReader br) - { - Generator g = new Generator(); - g.GeneratorType = (GeneratorEnum) br.ReadUInt16(); - g.UInt16Amount = br.ReadUInt16(); - data.Add(g); - return g; - } - - public override void Write(BinaryWriter bw, Generator o) - { - //Zone z = (Zone) o; - //bw.Write(p.---); - } - - public override int Length { - get { - return 4; - } - } - - public Generator[] Generators - { - get - { - return data.ToArray(); - } - } - - public void Load(Instrument[] instruments) - { - foreach(Generator g in Generators) - { - if(g.GeneratorType == GeneratorEnum.Instrument) - { - g.Instrument = instruments[g.UInt16Amount]; - } - } - } - - public void Load(SampleHeader[] sampleHeaders) - { - foreach(Generator g in Generators) - { - if(g.GeneratorType == GeneratorEnum.SampleID) - { - g.SampleHeader = sampleHeaders[g.UInt16Amount]; - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorBuilder.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorBuilder.cs.meta deleted file mode 100644 index 7c0e442..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fbdde6cb0154b6a4e820da85654746c5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorEnum.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorEnum.cs deleted file mode 100644 index f4e4186..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorEnum.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; - -namespace NAudio.SoundFont -{ - /// - /// Generator types - /// - public enum GeneratorEnum - { - /// Start address offset - StartAddressOffset = 0, - /// End address offset - EndAddressOffset, - /// Start loop address offset - StartLoopAddressOffset, - /// End loop address offset - EndLoopAddressOffset, - /// Start address coarse offset - StartAddressCoarseOffset, - /// Modulation LFO to pitch - ModulationLFOToPitch, - /// Vibrato LFO to pitch - VibratoLFOToPitch, - /// Modulation envelope to pitch - ModulationEnvelopeToPitch, - /// Initial filter cutoff frequency - InitialFilterCutoffFrequency, - /// Initial filter Q - InitialFilterQ, - /// Modulation LFO to filter Cutoff frequency - ModulationLFOToFilterCutoffFrequency, - /// Modulation envelope to filter cutoff frequency - ModulationEnvelopeToFilterCutoffFrequency, - /// End address coarse offset - EndAddressCoarseOffset, - /// Modulation LFO to volume - ModulationLFOToVolume, - /// Unused - Unused1, - /// Chorus effects send - ChorusEffectsSend, - /// Reverb effects send - ReverbEffectsSend, - /// Pan - Pan, - /// Unused - Unused2, - /// Unused - Unused3, - /// Unused - Unused4, - /// Delay modulation LFO - DelayModulationLFO, - /// Frequency modulation LFO - FrequencyModulationLFO, - /// Delay vibrato LFO - DelayVibratoLFO, - /// Frequency vibrato LFO - FrequencyVibratoLFO, - /// Delay modulation envelope - DelayModulationEnvelope, - /// Attack modulation envelope - AttackModulationEnvelope, - /// Hold modulation envelope - HoldModulationEnvelope, - /// Decay modulation envelope - DecayModulationEnvelope, - /// Sustain modulation envelop - SustainModulationEnvelope, - /// Release modulation envelope - ReleaseModulationEnvelope, - /// Key number to modulation envelope hold - KeyNumberToModulationEnvelopeHold, - /// Key number to modulation envelope decay - KeyNumberToModulationEnvelopeDecay, - /// Delay volume envelope - DelayVolumeEnvelope, - /// Attack volume envelope - AttackVolumeEnvelope, - /// Hold volume envelope - HoldVolumeEnvelope, - /// Decay volume envelope - DecayVolumeEnvelope, - /// Sustain volume envelope - SustainVolumeEnvelope, - /// Release volume envelope - ReleaseVolumeEnvelope, - /// Key number to volume envelope hold - KeyNumberToVolumeEnvelopeHold, - /// Key number to volume envelope decay - KeyNumberToVolumeEnvelopeDecay, - /// Instrument - Instrument, - /// Reserved - Reserved1, - /// Key range - KeyRange, - /// Velocity range - VelocityRange, - /// Start loop address coarse offset - StartLoopAddressCoarseOffset, - /// Key number - KeyNumber, - /// Velocity - Velocity, - /// Initial attenuation - InitialAttenuation, - /// Reserved - Reserved2, - /// End loop address coarse offset - EndLoopAddressCoarseOffset, - /// Coarse tune - CoarseTune, - /// Fine tune - FineTune, - /// Sample ID - SampleID, - /// Sample modes - SampleModes, - /// Reserved - Reserved3, - /// Scale tuning - ScaleTuning, - /// Exclusive class - ExclusiveClass, - /// Overriding root key - OverridingRootKey, - /// Unused - Unused5, - /// Unused - UnusedEnd - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorEnum.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorEnum.cs.meta deleted file mode 100644 index 4931b96..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/GeneratorEnum.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7af25600af0956542944d1825c4f05ad -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InfoChunk.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InfoChunk.cs deleted file mode 100644 index 0b68b7a..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InfoChunk.cs +++ /dev/null @@ -1,152 +0,0 @@ -using System; -using System.IO; - -// ReSharper disable once CheckNamespace -namespace NAudio.SoundFont -{ - /// - /// A soundfont info chunk - /// - public class InfoChunk - { - internal InfoChunk(RiffChunk chunk) - { - bool ifilPresent = false; - bool inamPresent = false; - if(chunk.ReadChunkID() != "INFO") - { - throw new InvalidDataException("Not an INFO chunk"); - } - //this.chunk = chunk; - RiffChunk c; - while((c = chunk.GetNextSubChunk()) != null) - { - switch(c.ChunkID) - { - case "ifil": - ifilPresent = true; - SoundFontVersion = c.GetDataAsStructure(new SFVersionBuilder()); - break; - case "isng": - WaveTableSoundEngine = c.GetDataAsString(); - break; - case "INAM": - inamPresent = true; - BankName = c.GetDataAsString(); - break; - case "irom": - DataROM = c.GetDataAsString(); - break; - case "iver": - ROMVersion = c.GetDataAsStructure(new SFVersionBuilder()); - break; - case "ICRD": - CreationDate = c.GetDataAsString(); - break; - case "IENG": - Author = c.GetDataAsString(); - break; - case "IPRD": - TargetProduct = c.GetDataAsString(); - break; - case "ICOP": - Copyright = c.GetDataAsString(); - break; - case "ICMT": - Comments = c.GetDataAsString(); - break; - case "ISFT": - Tools = c.GetDataAsString(); - break; - default: - throw new InvalidDataException($"Unknown chunk type {c.ChunkID}"); - } - } - if(!ifilPresent) - { - throw new InvalidDataException("Missing SoundFont version information"); - } - // n.b. issue #150 - it is valid for isng not to be present - if(!inamPresent) - { - throw new InvalidDataException("Missing SoundFont name information"); - } - } - - /// - /// SoundFont Version - /// - public SFVersion SoundFontVersion { get; } - - /// - /// WaveTable sound engine - /// - public string WaveTableSoundEngine { get; set; } - - /// - /// Bank name - /// - public string BankName { get; set; } - - /// - /// Data ROM - /// - // ReSharper disable once InconsistentNaming - public string DataROM { get; set; } - - /// - /// Creation Date - /// - public string CreationDate { get; set; } - - /// - /// Author - /// - public string Author { get; set; } - - /// - /// Target Product - /// - public string TargetProduct { get; set; } - - /// - /// Copyright - /// - public string Copyright { get; set; } - - /// - /// Comments - /// - public string Comments { get; set; } - - /// - /// Tools - /// - public string Tools { get; set; } - - /// - /// ROM Version - /// - // ReSharper disable once InconsistentNaming - public SFVersion ROMVersion { get; set; } - - /// - /// - /// - public override string ToString() - { - return string.Format("Bank Name: {0}\r\nAuthor: {1}\r\nCopyright: {2}\r\nCreation Date: {3}\r\nTools: {4}\r\nComments: {5}\r\nSound Engine: {6}\r\nSoundFont Version: {7}\r\nTarget Product: {8}\r\nData ROM: {9}\r\nROM Version: {10}", - BankName, - Author, - Copyright, - CreationDate, - Tools, - "TODO-fix comments",//Comments, - WaveTableSoundEngine, - SoundFontVersion, - TargetProduct, - DataROM, - ROMVersion); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InfoChunk.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InfoChunk.cs.meta deleted file mode 100644 index a9e3950..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InfoChunk.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6be10d254fb41c644850e2afa8d67a7c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Instrument.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Instrument.cs deleted file mode 100644 index 8e3d73c..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Instrument.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; - -namespace NAudio.SoundFont -{ - /// - /// SoundFont instrument - /// - public class Instrument - { - private string name; - internal ushort startInstrumentZoneIndex; - internal ushort endInstrumentZoneIndex; - private Zone[] zones; - - /// - /// instrument name - /// - public string Name - { - get - { - return name; - } - set - { - // TODO: validate - name = value; - } - } - - /// - /// Zones - /// - public Zone[] Zones - { - get - { - return zones; - } - set - { - zones = value; - } - } - - /// - /// - /// - public override string ToString() - { - return this.name; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Instrument.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Instrument.cs.meta deleted file mode 100644 index 9e883e7..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Instrument.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ab8e071fefecf2f4898140abc1499b39 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InstrumentBuilder.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InstrumentBuilder.cs deleted file mode 100644 index 9d5c9c8..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InstrumentBuilder.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.SoundFont -{ - /// - /// Instrument Builder - /// - internal class InstrumentBuilder : StructureBuilder - { - private Instrument lastInstrument = null; - - public override Instrument Read(BinaryReader br) - { - Instrument i = new Instrument(); - string s = Encoding.UTF8.GetString(br.ReadBytes(20), 0, 20); - if(s.IndexOf('\0') >= 0) - { - s = s.Substring(0,s.IndexOf('\0')); - } - i.Name = s; - i.startInstrumentZoneIndex = br.ReadUInt16(); - if(lastInstrument != null) - { - lastInstrument.endInstrumentZoneIndex = (ushort) (i.startInstrumentZoneIndex - 1); - } - data.Add(i); - lastInstrument = i; - return i; - } - - public override void Write(BinaryWriter bw, Instrument instrument) - { - } - - public override int Length - { - get - { - return 22; - } - } - - public void LoadZones(Zone[] zones) - { - // don't do the last preset, which is simply EOP - for(int instrument = 0; instrument < data.Count - 1; instrument++) - { - Instrument i = (Instrument) data[instrument]; - i.Zones = new Zone[i.endInstrumentZoneIndex - i.startInstrumentZoneIndex + 1]; - Array.Copy(zones,i.startInstrumentZoneIndex,i.Zones,0,i.Zones.Length); - } - // we can get rid of the EOP record now - data.RemoveAt(data.Count - 1); - } - - public Instrument[] Instruments - { - get - { - return data.ToArray(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InstrumentBuilder.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InstrumentBuilder.cs.meta deleted file mode 100644 index 5bd9133..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/InstrumentBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ae89e888763b8c846aaaab1b8d47ed96 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Modulator.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Modulator.cs deleted file mode 100644 index 5d79f66..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Modulator.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; - -namespace NAudio.SoundFont -{ - /// - /// Transform Types - /// - public enum TransformEnum - { - /// - /// Linear - /// - Linear = 0 - } - - /// - /// Modulator - /// - public class Modulator - { - private ModulatorType sourceModulationData; - private GeneratorEnum destinationGenerator; - private short amount; - private ModulatorType sourceModulationAmount; - private TransformEnum sourceTransform; - - /// - /// Source Modulation data type - /// - public ModulatorType SourceModulationData - { - get - { - return sourceModulationData; - } - set - { - sourceModulationData = value; - } - } - - /// - /// Destination generator type - /// - public GeneratorEnum DestinationGenerator - { - get - { - return destinationGenerator; - } - set - { - destinationGenerator = value; - } - } - - /// - /// Amount - /// - public short Amount - { - get - { - return amount; - } - set - { - amount = value; - } - } - - /// - /// Source Modulation Amount Type - /// - public ModulatorType SourceModulationAmount - { - get - { - return sourceModulationAmount; - } - set - { - sourceModulationAmount = value; - } - } - - /// - /// Source Transform Type - /// - public TransformEnum SourceTransform - { - get - { - return sourceTransform; - } - set - { - sourceTransform = value; - } - } - - /// - /// - /// - public override string ToString() - { - return String.Format("Modulator {0} {1} {2} {3} {4}", - sourceModulationData,destinationGenerator, - amount,sourceModulationAmount,sourceTransform); - - } - - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Modulator.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Modulator.cs.meta deleted file mode 100644 index 0409560..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Modulator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dbe7291a1aac7764680fa533f6f9fb39 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorBuilder.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorBuilder.cs deleted file mode 100644 index fb57af8..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorBuilder.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.SoundFont { - class ModulatorBuilder : StructureBuilder { - public override Modulator Read(BinaryReader br) - { - Modulator m = new Modulator(); - m.SourceModulationData = new ModulatorType(br.ReadUInt16()); - m.DestinationGenerator = (GeneratorEnum) br.ReadUInt16(); - m.Amount = br.ReadInt16(); - m.SourceModulationAmount = new ModulatorType(br.ReadUInt16()); - m.SourceTransform = (TransformEnum) br.ReadUInt16(); - data.Add(m); - return m; - } - - public override void Write(BinaryWriter bw, Modulator o) - { - //Zone z = (Zone) o; - //bw.Write(p.---); - } - - public override int Length { - get { - return 10; - } - } - - public Modulator[] Modulators - { - get - { - return data.ToArray(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorBuilder.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorBuilder.cs.meta deleted file mode 100644 index 3174794..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eabfb9e1519d9e04a804dea0c2722d88 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorType.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorType.cs deleted file mode 100644 index d5f566d..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorType.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; - -namespace NAudio.SoundFont -{ - /// - /// Controller Sources - /// - public enum ControllerSourceEnum - { - /// - /// No Controller - /// - NoController = 0, - /// - /// Note On Velocity - /// - NoteOnVelocity = 2, - /// - /// Note On Key Number - /// - NoteOnKeyNumber = 3, - /// - /// Poly Pressure - /// - PolyPressure = 10, - /// - /// Channel Pressure - /// - ChannelPressure = 13, - /// - /// Pitch Wheel - /// - PitchWheel = 14, - /// - /// Pitch Wheel Sensitivity - /// - PitchWheelSensitivity = 16 - } - - /// - /// Source Types - /// - public enum SourceTypeEnum - { - /// - /// Linear - /// - Linear, - /// - /// Concave - /// - Concave, - /// - /// Convex - /// - Convex, - /// - /// Switch - /// - Switch - } - - /// - /// Modulator Type - /// - public class ModulatorType - { - bool polarity; - bool direction; - bool midiContinuousController; - ControllerSourceEnum controllerSource; - SourceTypeEnum sourceType; - ushort midiContinuousControllerNumber; - - internal ModulatorType(ushort raw) - { - // TODO: map this to fields - polarity = ((raw & 0x0200) == 0x0200); - direction = ((raw & 0x0100) == 0x0100); - midiContinuousController = ((raw & 0x0080) == 0x0080); - sourceType = (SourceTypeEnum) ((raw & (0xFC00)) >> 10); - - controllerSource = (ControllerSourceEnum) (raw & 0x007F); - midiContinuousControllerNumber = (ushort) (raw & 0x007F); - - } - - /// - /// - /// - /// - public override string ToString() - { - if(midiContinuousController) - return String.Format("{0} CC{1}",sourceType,midiContinuousControllerNumber); - else - return String.Format("{0} {1}",sourceType,controllerSource); - } - - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorType.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorType.cs.meta deleted file mode 100644 index 483dcde..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ModulatorType.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d363eece675dd024ea591441fd7e1ec7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Preset.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Preset.cs deleted file mode 100644 index 80ab2e7..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Preset.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; - -namespace NAudio.SoundFont -{ - /// - /// A SoundFont Preset - /// - public class Preset - { - private string name; - private ushort patchNumber; - private ushort bank; - internal ushort startPresetZoneIndex; - internal ushort endPresetZoneIndex; - internal uint library; - internal uint genre; - internal uint morphology; - private Zone[] zones; - - /// - /// Preset name - /// - public string Name - { - get - { - return name; - } - set - { - // TODO: validate - name = value; - } - } - - /// - /// Patch Number - /// - public ushort PatchNumber - { - get - { - return patchNumber; - } - set - { - // TODO: validate - patchNumber = value; - } - } - - /// - /// Bank number - /// - public ushort Bank - { - get - { - return bank; - } - set - { - // 0 - 127, GM percussion bank is 128 - // TODO: validate - bank = value; - } - } - - /// - /// Zones - /// - public Zone[] Zones - { - get - { - return zones; - } - set - { - zones = value; - } - } - - /// - /// - /// - public override string ToString() - { - return String.Format("{0}-{1} {2}",bank,patchNumber,name); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Preset.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Preset.cs.meta deleted file mode 100644 index 1c8ad9b..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Preset.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5f83d2a44fa1c1a4796e4aee590b118b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetBuilder.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetBuilder.cs deleted file mode 100644 index 02a833d..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetBuilder.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.SoundFont -{ - class PresetBuilder : StructureBuilder - { - private Preset lastPreset = null; - - public override Preset Read(BinaryReader br) - { - Preset p = new Preset(); - string s = Encoding.UTF8.GetString(br.ReadBytes(20), 0, 20); - if(s.IndexOf('\0') >= 0) { - s = s.Substring(0,s.IndexOf('\0')); - } - p.Name = s; - p.PatchNumber = br.ReadUInt16(); - p.Bank = br.ReadUInt16(); - p.startPresetZoneIndex = br.ReadUInt16(); - p.library = br.ReadUInt32(); - p.genre = br.ReadUInt32(); - p.morphology = br.ReadUInt32(); - if(lastPreset != null) - lastPreset.endPresetZoneIndex = (ushort) (p.startPresetZoneIndex - 1); - data.Add(p); - lastPreset = p; - return p; - } - - public override void Write(BinaryWriter bw, Preset preset) - { - } - - public override int Length { - get { - return 38; - } - } - - public void LoadZones(Zone[] presetZones) - { - // don't do the last preset, which is simply EOP - for(int preset = 0; preset < data.Count - 1; preset++) - { - Preset p = (Preset) data[preset]; - p.Zones = new Zone[p.endPresetZoneIndex - p.startPresetZoneIndex + 1]; - Array.Copy(presetZones,p.startPresetZoneIndex,p.Zones,0,p.Zones.Length); - } - // we can get rid of the EOP record now - data.RemoveAt(data.Count - 1); - } - - public Preset[] Presets - { - get - { - return data.ToArray(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetBuilder.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetBuilder.cs.meta deleted file mode 100644 index 5cfa842..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8299a593997b35946af8bb1a944977ac -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetsChunk.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetsChunk.cs deleted file mode 100644 index a130403..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetsChunk.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.SoundFont -{ - /// - /// Class to read the SoundFont file presets chunk - /// - public class PresetsChunk - { - private PresetBuilder presetHeaders = new PresetBuilder(); - private ZoneBuilder presetZones = new ZoneBuilder(); - private ModulatorBuilder presetZoneModulators = new ModulatorBuilder(); - private GeneratorBuilder presetZoneGenerators = new GeneratorBuilder(); - private InstrumentBuilder instruments = new InstrumentBuilder(); - private ZoneBuilder instrumentZones = new ZoneBuilder(); - private ModulatorBuilder instrumentZoneModulators = new ModulatorBuilder(); - private GeneratorBuilder instrumentZoneGenerators = new GeneratorBuilder(); - private SampleHeaderBuilder sampleHeaders = new SampleHeaderBuilder(); - - internal PresetsChunk(RiffChunk chunk) - { - string header = chunk.ReadChunkID(); - if(header != "pdta") - { - throw new InvalidDataException(String.Format("Not a presets data chunk ({0})",header)); - } - - RiffChunk c; - while((c = chunk.GetNextSubChunk()) != null) - { - switch(c.ChunkID) { - case "PHDR": - case "phdr": - c.GetDataAsStructureArray(presetHeaders); - break; - case "PBAG": - case "pbag": - c.GetDataAsStructureArray(presetZones); - break; - case "PMOD": - case "pmod": - c.GetDataAsStructureArray(presetZoneModulators); - break; - case "PGEN": - case "pgen": - c.GetDataAsStructureArray(presetZoneGenerators); - break; - case "INST": - case "inst": - c.GetDataAsStructureArray(instruments); - break; - case "IBAG": - case "ibag": - c.GetDataAsStructureArray(instrumentZones); - break; - case "IMOD": - case "imod": - c.GetDataAsStructureArray(instrumentZoneModulators); - break; - case "IGEN": - case "igen": - c.GetDataAsStructureArray(instrumentZoneGenerators); - break; - case "SHDR": - case "shdr": - c.GetDataAsStructureArray(sampleHeaders); - break; - default: - throw new InvalidDataException(String.Format("Unknown chunk type {0}", c.ChunkID)); - } - } - - // now link things up - instrumentZoneGenerators.Load(sampleHeaders.SampleHeaders); - instrumentZones.Load(instrumentZoneModulators.Modulators,instrumentZoneGenerators.Generators); - instruments.LoadZones(instrumentZones.Zones); - presetZoneGenerators.Load(instruments.Instruments); - presetZones.Load(presetZoneModulators.Modulators,presetZoneGenerators.Generators); - presetHeaders.LoadZones(presetZones.Zones); - sampleHeaders.RemoveEOS(); - } - - /// - /// The Presets contained in this chunk - /// - public Preset[] Presets - { - get - { - return presetHeaders.Presets; - } - } - - /// - /// The instruments contained in this chunk - /// - public Instrument[] Instruments - { - get - { - return instruments.Instruments; - } - } - - /// - /// The sample headers contained in this chunk - /// - public SampleHeader[] SampleHeaders - { - get - { - return sampleHeaders.SampleHeaders; - } - } - - /// - /// - /// - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("Preset Headers:\r\n"); - foreach(Preset p in presetHeaders.Presets) { - sb.AppendFormat("{0}\r\n",p); - } - sb.Append("Instruments:\r\n"); - foreach(Instrument i in instruments.Instruments) { - sb.AppendFormat("{0}\r\n",i); - } - return sb.ToString(); - } - } - -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetsChunk.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetsChunk.cs.meta deleted file mode 100644 index f88e491..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/PresetsChunk.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d0f3680b81596fb479060cdfb728745f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/RiffChunk.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/RiffChunk.cs deleted file mode 100644 index 864391e..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/RiffChunk.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System; -using System.IO; -using System.Net; -using System.Text; -using NAudio.Utils; - -namespace NAudio.SoundFont -{ - internal class RiffChunk - { - private string chunkID; - private uint chunkSize; - private long dataOffset; // data offset in the file - private BinaryReader riffFile; - - public static RiffChunk GetTopLevelChunk(BinaryReader file) - { - RiffChunk r = new RiffChunk(file); - r.ReadChunk(); - return r; - } - - private RiffChunk(BinaryReader file) - { - riffFile = file; - chunkID = "????"; - chunkSize = 0; - dataOffset = 0; - } - - /// - /// just reads a chunk ID at the current position - /// - /// chunk ID - public string ReadChunkID() - { - byte []cid = riffFile.ReadBytes(4); - if(cid.Length != 4) - { - throw new InvalidDataException("Couldn't read Chunk ID"); - } - return ByteEncoding.Instance.GetString(cid, 0, cid.Length); - } - - /// - /// reads a chunk at the current position - /// - private void ReadChunk() - { - this.chunkID = ReadChunkID(); - this.chunkSize = riffFile.ReadUInt32(); //(uint) IPAddress.NetworkToHostOrder(riffFile.ReadUInt32()); - this.dataOffset = riffFile.BaseStream.Position; - } - - /// - /// creates a new riffchunk from current position checking that we're not - /// at the end of this chunk first - /// - /// the new chunk - public RiffChunk GetNextSubChunk() - { - if(riffFile.BaseStream.Position + 8 < dataOffset + chunkSize) - { - RiffChunk chunk = new RiffChunk(riffFile); - chunk.ReadChunk(); - return chunk; - } - //Console.WriteLine("DEBUG Failed to GetNextSubChunk because Position is {0}, dataOffset{1}, chunkSize {2}",riffFile.BaseStream.Position,dataOffset,chunkSize); - return null; - } - - public byte[] GetData() - { - riffFile.BaseStream.Position = dataOffset; - byte[] data = riffFile.ReadBytes((int) chunkSize); - if(data.Length != chunkSize) - { - throw new InvalidDataException(String.Format("Couldn't read chunk's data Chunk: {0}, read {1} bytes",this,data.Length)); - } - return data; - } - - /// - /// useful for chunks that just contain a string - /// - /// chunk as string - public string GetDataAsString() - { - byte[] data = GetData(); - if(data == null) - return null; - return ByteEncoding.Instance.GetString(data, 0, data.Length); - } - - public T GetDataAsStructure(StructureBuilder s) - { - riffFile.BaseStream.Position = dataOffset; - if(s.Length != chunkSize) - { - throw new InvalidDataException(String.Format("Chunk size is: {0} so can't read structure of: {1}",chunkSize,s.Length)); - } - return s.Read(riffFile); - } - - public T[] GetDataAsStructureArray(StructureBuilder s) - { - riffFile.BaseStream.Position = dataOffset; - if(chunkSize % s.Length != 0) - { - throw new InvalidDataException(String.Format("Chunk size is: {0} not a multiple of structure size: {1}", chunkSize, s.Length)); - } - int structuresToRead = (int) (chunkSize / s.Length); - T[] a = new T[structuresToRead]; - for(int n = 0; n < structuresToRead; n++) - { - a[n] = s.Read(riffFile); - } - return a; - } - - public string ChunkID - { - get - { - return chunkID; - } - set - { - if(value == null) - { - throw new ArgumentNullException("ChunkID may not be null"); - } - if(value.Length != 4) - { - throw new ArgumentException("ChunkID must be four characters"); - } - chunkID = value; - } - } - - public uint ChunkSize - { - get - { - return chunkSize; - } - } - - public long DataOffset - { - get - { - return dataOffset; - } - } - - public override string ToString() - { - return String.Format("RiffChunk ID: {0} Size: {1} Data Offset: {2}",ChunkID,ChunkSize,DataOffset); - } - - } - -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/RiffChunk.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/RiffChunk.cs.meta deleted file mode 100644 index c99ed84..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/RiffChunk.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2a511d518b124194f96479093a9dcb58 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFSampleLink.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFSampleLink.cs deleted file mode 100644 index 29a886c..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFSampleLink.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace NAudio.SoundFont -{ - /// - /// Sample Link Type - /// - public enum SFSampleLink : ushort - { - /// - /// Mono Sample - /// - MonoSample = 1, - /// - /// Right Sample - /// - RightSample = 2, - /// - /// Left Sample - /// - LeftSample = 4, - /// - /// Linked Sample - /// - LinkedSample = 8, - /// - /// ROM Mono Sample - /// - RomMonoSample = 0x8001, - /// - /// ROM Right Sample - /// - RomRightSample = 0x8002, - /// - /// ROM Left Sample - /// - RomLeftSample = 0x8004, - /// - /// ROM Linked Sample - /// - RomLinkedSample = 0x8008 - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFSampleLink.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFSampleLink.cs.meta deleted file mode 100644 index f2235d0..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFSampleLink.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3692a875f78e14b449ff7928c4a7d085 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersion.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersion.cs deleted file mode 100644 index 38f2066..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersion.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.SoundFont -{ - /// - /// SoundFont Version Structure - /// - public class SFVersion - { - private short major; - private short minor; - - /// - /// Major Version - /// - public short Major - { - get - { - return major; - } - set - { - major = value; - } - } - - /// - /// Minor Version - /// - public short Minor - { - get - { - return minor; - } - set - { - minor = value; - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersion.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersion.cs.meta deleted file mode 100644 index 127c445..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersion.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 79f7cd47764c2da44ac7f1e60caa3cb6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersionBuilder.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersionBuilder.cs deleted file mode 100644 index 25a6ab4..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersionBuilder.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.SoundFont -{ - /// - /// Builds a SoundFont version - /// - class SFVersionBuilder : StructureBuilder - { - /// - /// Reads a SoundFont Version structure - /// - public override SFVersion Read(BinaryReader br) - { - SFVersion v = new SFVersion(); - v.Major = br.ReadInt16(); - v.Minor = br.ReadInt16(); - data.Add(v); - return v; - } - - /// - /// Writes a SoundFont Version structure - /// - public override void Write(BinaryWriter bw, SFVersion v) - { - bw.Write(v.Major); - bw.Write(v.Minor); - } - - /// - /// Gets the length of this structure - /// - public override int Length - { - get - { - return 4; - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersionBuilder.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersionBuilder.cs.meta deleted file mode 100644 index 2c6ab4d..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SFVersionBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2174861cba2bd704cae3664c3dc44304 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleDataChunk.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleDataChunk.cs deleted file mode 100644 index d4ddac9..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleDataChunk.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.SoundFont -{ - class SampleDataChunk - { - private byte[] sampleData; - public SampleDataChunk(RiffChunk chunk) - { - string header = chunk.ReadChunkID(); - if(header != "sdta") - { - throw new InvalidDataException(String.Format("Not a sample data chunk ({0})",header)); - } - sampleData = chunk.GetData(); - } - - public byte[] SampleData - { - get - { - return sampleData; - } - } - } - -} // end of namespace \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleDataChunk.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleDataChunk.cs.meta deleted file mode 100644 index b535842..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleDataChunk.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 98ff0c81c102971478db8f2b5fff86bd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeader.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeader.cs deleted file mode 100644 index 6e41218..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeader.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; - -namespace NAudio.SoundFont -{ - /// - /// A SoundFont Sample Header - /// - public class SampleHeader - { - /// - /// The sample name - /// - public string SampleName; - /// - /// Start offset - /// - public uint Start; - /// - /// End offset - /// - public uint End; - /// - /// Start loop point - /// - public uint StartLoop; - /// - /// End loop point - /// - public uint EndLoop; - /// - /// Sample Rate - /// - public uint SampleRate; - /// - /// Original pitch - /// - public byte OriginalPitch; - /// - /// Pitch correction - /// - public sbyte PitchCorrection; - /// - /// Sample Link - /// - public ushort SampleLink; - /// - /// SoundFont Sample Link Type - /// - public SFSampleLink SFSampleLink; - - /// - /// - /// - public override string ToString() - { - return SampleName; - } - - } -} - diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeader.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeader.cs.meta deleted file mode 100644 index 2610ef7..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eb464ae7f392ca1458661bbb035040c8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeaderBuilder.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeaderBuilder.cs deleted file mode 100644 index c106b05..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeaderBuilder.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.IO; -using System.Text; -using NAudio.Utils; - -namespace NAudio.SoundFont -{ - class SampleHeaderBuilder : StructureBuilder - { - public override SampleHeader Read(BinaryReader br) - { - SampleHeader sh = new SampleHeader(); - var s = br.ReadBytes(20); - - sh.SampleName = ByteEncoding.Instance.GetString(s, 0, s.Length); - sh.Start = br.ReadUInt32(); - sh.End = br.ReadUInt32(); - sh.StartLoop = br.ReadUInt32(); - sh.EndLoop = br.ReadUInt32(); - sh.SampleRate = br.ReadUInt32(); - sh.OriginalPitch = br.ReadByte(); - sh.PitchCorrection = br.ReadSByte(); - sh.SampleLink = br.ReadUInt16(); - sh.SFSampleLink = (SFSampleLink) br.ReadUInt16(); - data.Add(sh); - return sh; - } - - public override void Write(BinaryWriter bw, SampleHeader sampleHeader) - { - } - - public override int Length - { - get - { - return 46; - } - } - - internal void RemoveEOS() - { - data.RemoveAt(data.Count-1); - } - - public SampleHeader[] SampleHeaders - { - get - { - return data.ToArray(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeaderBuilder.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeaderBuilder.cs.meta deleted file mode 100644 index b1c0038..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleHeaderBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: df61f7d10de6dab41bf0813daef8f21e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleMode.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleMode.cs deleted file mode 100644 index d918af3..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleMode.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; - -namespace NAudio.SoundFont -{ - /// - /// SoundFont sample modes - /// - public enum SampleMode - { - /// - /// No loop - /// - NoLoop, - /// - /// Loop Continuously - /// - LoopContinuously, - /// - /// Reserved no loop - /// - ReservedNoLoop, - /// - /// Loop and continue - /// - LoopAndContinue - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleMode.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleMode.cs.meta deleted file mode 100644 index 99036de..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SampleMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 43c30a2d4113a5f418ff1aea580908ef -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SoundFont.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SoundFont.cs deleted file mode 100644 index 00e8c72..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SoundFont.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.SoundFont -{ - /// - /// Represents a SoundFont - /// - public class SoundFont - { - private InfoChunk info; - private PresetsChunk presetsChunk; - private SampleDataChunk sampleData; - -#if !NETFX_CORE - /// - /// Loads a SoundFont from a file - /// - /// Filename of the SoundFont - public SoundFont(string fileName) : - this(new FileStream(fileName,FileMode.Open,FileAccess.Read)) - { - } -#endif - - /// - /// Loads a SoundFont from a stream - /// - /// stream - public SoundFont(Stream sfFile) - { - using(sfFile) // a bit ugly, done to get Win store to compile - { - RiffChunk riff = RiffChunk.GetTopLevelChunk(new BinaryReader(sfFile)); - if(riff.ChunkID == "RIFF") - { - string formHeader = riff.ReadChunkID(); - if(formHeader != "sfbk") - { - throw new InvalidDataException(String.Format("Not a SoundFont ({0})",formHeader)); - } - RiffChunk list = riff.GetNextSubChunk(); - if(list.ChunkID == "LIST") - { - //RiffChunk r = list.GetNextSubChunk(); - info = new InfoChunk(list); - - RiffChunk r = riff.GetNextSubChunk(); - sampleData = new SampleDataChunk(r); - - r = riff.GetNextSubChunk(); - presetsChunk = new PresetsChunk(r); - } - else - { - throw new InvalidDataException(String.Format("Not info list found ({0})", list.ChunkID)); - } - } - else - { - throw new InvalidDataException("Not a RIFF file"); - } - } - } - - /// - /// The File Info Chunk - /// - public InfoChunk FileInfo - { - get - { - return info; - } - } - - /// - /// The Presets - /// - public Preset[] Presets - { - get - { - return presetsChunk.Presets; - } - } - - /// - /// The Instruments - /// - public Instrument[] Instruments - { - get - { - return presetsChunk.Instruments; - } - } - - /// - /// The Sample Headers - /// - public SampleHeader[] SampleHeaders - { - get - { - return presetsChunk.SampleHeaders; - } - } - - /// - /// The Sample Data - /// - public byte[] SampleData - { - get - { - return sampleData.SampleData; - } - } - - /// - /// - /// - public override string ToString() - { - return String.Format("Info Chunk:\r\n{0}\r\nPresets Chunk:\r\n{1}", - info,presetsChunk); - } - - // TODO: save / save as function - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SoundFont.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SoundFont.cs.meta deleted file mode 100644 index 6002a19..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/SoundFont.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5b2667e4e6e3b8f4ab114df06b181a9a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/StructureBuilder.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/StructureBuilder.cs deleted file mode 100644 index e33d7e4..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/StructureBuilder.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Collections; - -namespace NAudio.SoundFont -{ - - /// - /// base class for structures that can read themselves - /// - internal abstract class StructureBuilder - { - protected List data; - - public StructureBuilder() - { - Reset(); - } - - public abstract T Read(BinaryReader br); - public abstract void Write(BinaryWriter bw,T o); - public abstract int Length { get; } - - public void Reset() - { - data = new List(); - } - - public T[] Data - { - get - { - return data.ToArray(); - } - } - } - -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/StructureBuilder.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/StructureBuilder.cs.meta deleted file mode 100644 index 70ea43e..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/StructureBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d4cadb98fe9020943b7d922aa7647b14 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Zone.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Zone.cs deleted file mode 100644 index 1a6336a..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Zone.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; - -namespace NAudio.SoundFont -{ - /// - /// A SoundFont zone - /// - public class Zone - { - internal ushort generatorIndex; - internal ushort modulatorIndex; - internal ushort generatorCount; - internal ushort modulatorCount; - private Modulator[] modulators; - private Generator[] generators; - - /// - /// - /// - public override string ToString() - { - return String.Format("Zone {0} Gens:{1} {2} Mods:{3}",generatorCount,generatorIndex, - modulatorCount,modulatorIndex); - } - - /// - /// Modulators for this Zone - /// - public Modulator[] Modulators - { - get - { - return modulators; - } - set - { - modulators = value; - } - } - - /// - /// Generators for this Zone - /// - public Generator[] Generators - { - get - { - return generators; - } - set - { - generators = value; - } - } - - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Zone.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Zone.cs.meta deleted file mode 100644 index b58f330..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/Zone.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 59a4f239555eb7e4996bc9bcef6077f9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ZoneBuilder.cs b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ZoneBuilder.cs deleted file mode 100644 index 78a9325..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ZoneBuilder.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.SoundFont -{ - class ZoneBuilder : StructureBuilder - { - private Zone lastZone = null; - - public override Zone Read(BinaryReader br) - { - Zone z = new Zone(); - z.generatorIndex = br.ReadUInt16(); - z.modulatorIndex = br.ReadUInt16(); - if(lastZone != null) - { - lastZone.generatorCount = (ushort) (z.generatorIndex - lastZone.generatorIndex); - lastZone.modulatorCount = (ushort) (z.modulatorIndex - lastZone.modulatorIndex); - } - data.Add(z); - lastZone = z; - return z; - } - - public override void Write(BinaryWriter bw, Zone zone) - { - //bw.Write(p.---); - } - - public void Load(Modulator[] modulators, Generator[] generators) - { - // don't do the last zone, which is simply EOZ - for(int zone = 0; zone < data.Count - 1; zone++) - { - Zone z = (Zone) data[zone]; - z.Generators = new Generator[z.generatorCount]; - Array.Copy(generators,z.generatorIndex,z.Generators,0,z.generatorCount); - z.Modulators = new Modulator[z.modulatorCount]; - Array.Copy(modulators,z.modulatorIndex,z.Modulators,0,z.modulatorCount); - } - // we can get rid of the EOP record now - data.RemoveAt(data.Count - 1); - } - - public Zone[] Zones - { - get - { - return data.ToArray(); - } - } - - public override int Length { - get { - return 4; - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ZoneBuilder.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ZoneBuilder.cs.meta deleted file mode 100644 index a533dde..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/ZoneBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 505bc90dad3b4c04e89ce3d777322c93 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Wav.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Wav.meta deleted file mode 100644 index 46d6345..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Wav.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 71ef00e1e9d807f4dacd6c0b8148a242 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Wav/WaveFileChunkReader.cs b/Assets/Scripts/Audio/NAudio/FileFormats/Wav/WaveFileChunkReader.cs deleted file mode 100644 index 807435f..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Wav/WaveFileChunkReader.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.IO; -using NAudio.Utils; -using NAudio.Wave; -using System.Diagnostics; - -namespace NAudio.FileFormats.Wav -{ - class WaveFileChunkReader - { - private WaveFormat waveFormat; - private long dataChunkPosition; - private long dataChunkLength; - private List riffChunks; - private readonly bool strictMode; - private bool isRf64; - private readonly bool storeAllChunks; - private long riffSize; - - public WaveFileChunkReader() - { - storeAllChunks = true; - strictMode = false; - } - - public void ReadWaveHeader(Stream stream) - { - this.dataChunkPosition = -1; - this.waveFormat = null; - this.riffChunks = new List(); - this.dataChunkLength = 0; - - var br = new BinaryReader(stream); - ReadRiffHeader(br); - this.riffSize = br.ReadUInt32(); // read the file size (minus 8 bytes) - - if (br.ReadInt32() != ChunkIdentifier.ChunkIdentifierToInt32("WAVE")) - { - throw new FormatException("Not a WAVE file - no WAVE header"); - } - - if (isRf64) - { - ReadDs64Chunk(br); - } - - int dataChunkId = ChunkIdentifier.ChunkIdentifierToInt32("data"); - int formatChunkId = ChunkIdentifier.ChunkIdentifierToInt32("fmt "); - - // sometimes a file has more data than is specified after the RIFF header - long stopPosition = Math.Min(riffSize + 8, stream.Length); - - // this -8 is so we can be sure that there are at least 8 bytes for a chunk id and length - while (stream.Position <= stopPosition - 8) - { - Int32 chunkIdentifier = br.ReadInt32(); - var chunkLength = br.ReadUInt32(); - if (chunkIdentifier == dataChunkId) - { - dataChunkPosition = stream.Position; - if (!isRf64) // we already know the dataChunkLength if this is an RF64 file - { - dataChunkLength = chunkLength; - } - stream.Position += chunkLength; - } - else if (chunkIdentifier == formatChunkId) - { - if (chunkLength > Int32.MaxValue) - throw new InvalidDataException(string.Format("Format chunk length must be between 0 and {0}.", Int32.MaxValue)); - waveFormat = WaveFormat.FromFormatChunk(br, (int)chunkLength); - } - else - { - // check for invalid chunk length - if (chunkLength > stream.Length - stream.Position) - { - if (strictMode) - { - Debug.Assert(false, String.Format("Invalid chunk length {0}, pos: {1}. length: {2}", - chunkLength, stream.Position, stream.Length)); - } - // an exception will be thrown further down if we haven't got a format and data chunk yet, - // otherwise we will tolerate this file despite it having corrupt data at the end - break; - } - if (storeAllChunks) - { - if (chunkLength > Int32.MaxValue) - throw new InvalidDataException(string.Format("RiffChunk chunk length must be between 0 and {0}.", Int32.MaxValue)); - riffChunks.Add(GetRiffChunk(stream, chunkIdentifier, (int)chunkLength)); - } - stream.Position += chunkLength; - } - } - - if (waveFormat == null) - { - throw new FormatException("Invalid WAV file - No fmt chunk found"); - } - if (dataChunkPosition == -1) - { - throw new FormatException("Invalid WAV file - No data chunk found"); - } - } - - /// - /// http://tech.ebu.ch/docs/tech/tech3306-2009.pdf - /// - private void ReadDs64Chunk(BinaryReader reader) - { - int ds64ChunkId = ChunkIdentifier.ChunkIdentifierToInt32("ds64"); - int chunkId = reader.ReadInt32(); - if (chunkId != ds64ChunkId) - { - throw new FormatException("Invalid RF64 WAV file - No ds64 chunk found"); - } - int chunkSize = reader.ReadInt32(); - this.riffSize = reader.ReadInt64(); - this.dataChunkLength = reader.ReadInt64(); - long sampleCount = reader.ReadInt64(); // replaces the value in the fact chunk - reader.ReadBytes(chunkSize - 24); // get to the end of this chunk (should parse extra stuff later) - } - - private static RiffChunk GetRiffChunk(Stream stream, Int32 chunkIdentifier, Int32 chunkLength) - { - return new RiffChunk(chunkIdentifier, chunkLength, stream.Position); - } - - private void ReadRiffHeader(BinaryReader br) - { - int header = br.ReadInt32(); - if (header == ChunkIdentifier.ChunkIdentifierToInt32("RF64")) - { - this.isRf64 = true; - } - else if (header != ChunkIdentifier.ChunkIdentifierToInt32("RIFF")) - { - throw new FormatException("Not a WAVE file - no RIFF header"); - } - } - - /// - /// WaveFormat - /// - public WaveFormat WaveFormat { get { return this.waveFormat; } } - - /// - /// Data Chunk Position - /// - public long DataChunkPosition { get { return this.dataChunkPosition; } } - - /// - /// Data Chunk Length - /// - public long DataChunkLength { get { return this.dataChunkLength; } } - - /// - /// Riff Chunks - /// - public List RiffChunks { get { return this.riffChunks; } } - } -} diff --git a/Assets/Scripts/Audio/NAudio/FileFormats/Wav/WaveFileChunkReader.cs.meta b/Assets/Scripts/Audio/NAudio/FileFormats/Wav/WaveFileChunkReader.cs.meta deleted file mode 100644 index dd5dcc2..0000000 --- a/Assets/Scripts/Audio/NAudio/FileFormats/Wav/WaveFileChunkReader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4584495eb1c483c408acf3fc9a5f0031 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation.meta deleted file mode 100644 index 9961358..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7660bbb26c85620429a3654e16dbd5bd -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/AudioSubtypes.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/AudioSubtypes.cs deleted file mode 100644 index 31c6d89..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/AudioSubtypes.cs +++ /dev/null @@ -1,163 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.MediaFoundation -{ - /// - /// Audio Subtype GUIDs - /// http://msdn.microsoft.com/en-us/library/windows/desktop/aa372553%28v=vs.85%29.aspx - /// - public static class AudioSubtypes - { - /// - /// Advanced Audio Coding (AAC). - /// - [FieldDescription("AAC")] - public static readonly Guid MFAudioFormat_AAC = new Guid("00001610-0000-0010-8000-00aa00389b71"); - /// - /// Not used - /// - [FieldDescription("ADTS")] - public static readonly Guid MFAudioFormat_ADTS = new Guid("00001600-0000-0010-8000-00aa00389b71"); - /// - /// Dolby AC-3 audio over Sony/Philips Digital Interface (S/PDIF). - /// - [FieldDescription("Dolby AC3 SPDIF")] - public static readonly Guid MFAudioFormat_Dolby_AC3_SPDIF = new Guid("00000092-0000-0010-8000-00aa00389b71"); - /// - /// Encrypted audio data used with secure audio path. - /// - [FieldDescription("DRM")] - public static readonly Guid MFAudioFormat_DRM = new Guid("00000009-0000-0010-8000-00aa00389b71"); - /// - /// Digital Theater Systems (DTS) audio. - /// - [FieldDescription("DTS")] - public static readonly Guid MFAudioFormat_DTS = new Guid("00000008-0000-0010-8000-00aa00389b71"); - /// - /// Uncompressed IEEE floating-point audio. - /// - [FieldDescription("IEEE floating-point")] - public static readonly Guid MFAudioFormat_Float = new Guid("00000003-0000-0010-8000-00aa00389b71"); - /// - /// MPEG Audio Layer-3 (MP3). - /// - [FieldDescription("MP3")] - public static readonly Guid MFAudioFormat_MP3 = new Guid("00000055-0000-0010-8000-00aa00389b71"); - /// - /// MPEG-1 audio payload. - /// - [FieldDescription("MPEG")] - public static readonly Guid MFAudioFormat_MPEG = new Guid("00000050-0000-0010-8000-00aa00389b71"); - /// - /// Windows Media Audio 9 Voice codec. - /// - [FieldDescription("WMA 9 Voice codec")] - public static readonly Guid MFAudioFormat_MSP1 = new Guid("0000000a-0000-0010-8000-00aa00389b71"); - /// - /// Uncompressed PCM audio. - /// - [FieldDescription("PCM")] - public static readonly Guid MFAudioFormat_PCM = new Guid("00000001-0000-0010-8000-00aa00389b71"); - /// - /// Windows Media Audio 9 Professional codec over S/PDIF. - /// - [FieldDescription("WMA SPDIF")] - public static readonly Guid MFAudioFormat_WMASPDIF = new Guid("00000164-0000-0010-8000-00aa00389b71"); - /// - /// Windows Media Audio 9 Lossless codec or Windows Media Audio 9.1 codec. - /// - [FieldDescription("WMAudio Lossless")] - public static readonly Guid MFAudioFormat_WMAudio_Lossless = new Guid("00000163-0000-0010-8000-00aa00389b71"); - /// - /// Windows Media Audio 8 codec, Windows Media Audio 9 codec, or Windows Media Audio 9.1 codec. - /// - [FieldDescription("Windows Media Audio")] - public static readonly Guid MFAudioFormat_WMAudioV8 = new Guid("00000161-0000-0010-8000-00aa00389b71"); - /// - /// Windows Media Audio 9 Professional codec or Windows Media Audio 9.1 Professional codec. - /// - [FieldDescription("Windows Media Audio Professional")] - public static readonly Guid MFAudioFormat_WMAudioV9 = new Guid("00000162-0000-0010-8000-00aa00389b71"); - /// - /// Dolby Digital (AC-3). - /// - [FieldDescription("Dolby AC3")] - public static readonly Guid MFAudioFormat_Dolby_AC3 = new Guid("e06d802c-db46-11cf-b4d1-00805f6cbbea"); - - /// - /// MPEG-4 and AAC Audio Types - /// http://msdn.microsoft.com/en-us/library/windows/desktop/dd317599(v=vs.85).aspx - /// Reference : wmcodecdsp.h - /// - [FieldDescription("MPEG-4 and AAC Audio Types")] - public static readonly Guid MEDIASUBTYPE_RAW_AAC1 = new Guid("000000ff-0000-0010-8000-00aa00389b71"); - - /// - /// Dolby Audio Types - /// http://msdn.microsoft.com/en-us/library/windows/desktop/dd317599(v=vs.85).aspx - /// Reference : wmcodecdsp.h - /// - [FieldDescription("Dolby Audio Types")] - public static readonly Guid MEDIASUBTYPE_DVM = new Guid("00002000-0000-0010-8000-00aa00389b71"); - - /// - /// Dolby Audio Types - /// http://msdn.microsoft.com/en-us/library/windows/desktop/dd317599(v=vs.85).aspx - /// Reference : wmcodecdsp.h - /// - [FieldDescription("Dolby Audio Types")] - public static readonly Guid MEDIASUBTYPE_DOLBY_DDPLUS = new Guid("a7fb87af-2d02-42fb-a4d4-05cd93843bdd"); - - /// - /// μ-law coding - /// http://msdn.microsoft.com/en-us/library/windows/desktop/dd390971(v=vs.85).aspx - /// Reference : Ksmedia.h - /// - [FieldDescription("μ-law")] - public static readonly Guid KSDATAFORMAT_SUBTYPE_MULAW = new Guid("00000007-0000-0010-8000-00aa00389b71"); - - /// - /// Adaptive delta pulse code modulation (ADPCM) - /// http://msdn.microsoft.com/en-us/library/windows/desktop/dd390971(v=vs.85).aspx - /// Reference : Ksmedia.h - /// - [FieldDescription("ADPCM")] - public static readonly Guid KSDATAFORMAT_SUBTYPE_ADPCM = new Guid("00000002-0000-0010-8000-00aa00389b71"); - - /// - /// Dolby Digital Plus formatted for HDMI output. - /// http://msdn.microsoft.com/en-us/library/windows/hardware/ff538392(v=vs.85).aspx - /// Reference : internet - /// - [FieldDescription("Dolby Digital Plus for HDMI")] - public static readonly Guid KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL_PLUS = new Guid("0000000a-0cea-0010-8000-00aa00389b71"); - - /// - /// MSAudio1 - unknown meaning - /// Reference : wmcodecdsp.h - /// - [FieldDescription("MSAudio1")] - public static readonly Guid MEDIASUBTYPE_MSAUDIO1 = new Guid("00000160-0000-0010-8000-00aa00389b71"); - - /// - /// IMA ADPCM ACM Wrapper - /// - [FieldDescription("IMA ADPCM")] - public static readonly Guid ImaAdpcm = new Guid("00000011-0000-0010-8000-00aa00389b71"); - - /// - /// WMSP2 - unknown meaning - /// Reference: wmsdkidl.h - /// - [FieldDescription("WMSP2")] - public static readonly Guid WMMEDIASUBTYPE_WMSP2 = new Guid("0000000b-0000-0010-8000-00aa00389b71"); - - - // TODO: find out what these are, and add them: - // {00000031-0000-0010-8000-00aa00389b71} // probably GSM610 ACM wrapper - - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/AudioSubtypes.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/AudioSubtypes.cs.meta deleted file mode 100644 index 3852313..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/AudioSubtypes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f5900b6493807c942a88466ea4d068c3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFActivate.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFActivate.cs deleted file mode 100644 index 85fc841..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFActivate.cs +++ /dev/null @@ -1,183 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.MediaFoundation -{ - /// - /// IMFActivate, defined in mfobjects.h - /// - [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("7FEE9E9A-4A89-47a6-899C-B6A53A70FB67")] - public interface IMFActivate : IMFAttributes - { - /// - /// Retrieves the value associated with a key. - /// - new void GetItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, Out] IntPtr pValue); - - /// - /// Retrieves the data type of the value associated with a key. - /// - new void GetItemType([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pType); - - /// - /// Queries whether a stored attribute value equals a specified PROPVARIANT. - /// - new void CompareItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, IntPtr value, [MarshalAs(UnmanagedType.Bool)] out bool pbResult); - - /// - /// Compares the attributes on this object with the attributes on another object. - /// - new void Compare([MarshalAs(UnmanagedType.Interface)] IMFAttributes pTheirs, int matchType, [MarshalAs(UnmanagedType.Bool)] out bool pbResult); - - /// - /// Retrieves a UINT32 value associated with a key. - /// - new void GetUINT32([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int punValue); - - /// - /// Retrieves a UINT64 value associated with a key. - /// - new void GetUINT64([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out long punValue); - - /// - /// Retrieves a double value associated with a key. - /// - new void GetDouble([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out double pfValue); - - /// - /// Retrieves a GUID value associated with a key. - /// - new void GetGUID([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out Guid pguidValue); - - /// - /// Retrieves the length of a string value associated with a key. - /// - new void GetStringLength([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pcchLength); - - /// - /// Retrieves a wide-character string associated with a key. - /// - new void GetString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pwszValue, int cchBufSize, - out int pcchLength); - - /// - /// Retrieves a wide-character string associated with a key. This method allocates the memory for the string. - /// - new void GetAllocatedString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [MarshalAs(UnmanagedType.LPWStr)] out string ppwszValue, - out int pcchLength); - - /// - /// Retrieves the length of a byte array associated with a key. - /// - new void GetBlobSize([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pcbBlobSize); - - /// - /// Retrieves a byte array associated with a key. - /// - new void GetBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [Out, MarshalAs(UnmanagedType.LPArray)] byte[] pBuf, int cbBufSize, - out int pcbBlobSize); - - /// - /// Retrieves a byte array associated with a key. This method allocates the memory for the array. - /// - new void GetAllocatedBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out IntPtr ip, out int pcbSize); - - /// - /// Retrieves an interface pointer associated with a key. - /// - new void GetUnknown([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, - [MarshalAs(UnmanagedType.IUnknown)] out object ppv); - - /// - /// Associates an attribute value with a key. - /// - new void SetItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, IntPtr value); - - /// - /// Removes a key/value pair from the object's attribute list. - /// - new void DeleteItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey); - - /// - /// Removes all key/value pairs from the object's attribute list. - /// - new void DeleteAllItems(); - - /// - /// Associates a UINT32 value with a key. - /// - new void SetUINT32([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, int unValue); - - /// - /// Associates a UINT64 value with a key. - /// - new void SetUINT64([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, long unValue); - - /// - /// Associates a double value with a key. - /// - new void SetDouble([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, double fValue); - - /// - /// Associates a GUID value with a key. - /// - new void SetGUID([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPStruct)] Guid guidValue); - - /// - /// Associates a wide-character string with a key. - /// - new void SetString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPWStr)] string wszValue); - - /// - /// Associates a byte array with a key. - /// - new void SetBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] pBuf, - int cbBufSize); - - /// - /// Associates an IUnknown pointer with a key. - /// - new void SetUnknown([MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnknown); - - /// - /// Locks the attribute store so that no other thread can access it. - /// - new void LockStore(); - - /// - /// Unlocks the attribute store. - /// - new void UnlockStore(); - - /// - /// Retrieves the number of attributes that are set on this object. - /// - new void GetCount(out int pcItems); - - /// - /// Retrieves an attribute at the specified index. - /// - new void GetItemByIndex(int unIndex, out Guid pGuidKey, [In, Out] IntPtr pValue); - - /// - /// Copies all of the attributes from this object into another attribute store. - /// - new void CopyAllItems([In, MarshalAs(UnmanagedType.Interface)] IMFAttributes pDest); - - /// - /// Creates the object associated with this activation object. - /// - void ActivateObject([In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, [Out,MarshalAs(UnmanagedType.Interface)] out object ppv); - - /// - /// Shuts down the created object. - /// - void ShutdownObject(); - - /// - /// Detaches the created object from the activation object. - /// - void DetachObject(); - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFActivate.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFActivate.cs.meta deleted file mode 100644 index 542376d..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFActivate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 081e5441ff9d82d44a60b691a7bce889 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFAttributes.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFAttributes.cs deleted file mode 100644 index bede23f..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFAttributes.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.MediaFoundation -{ - /// - /// Provides a generic way to store key/value pairs on an object. - /// http://msdn.microsoft.com/en-gb/library/windows/desktop/ms704598%28v=vs.85%29.aspx - /// - [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("2CD2D921-C447-44A7-A13C-4ADABFC247E3")] - public interface IMFAttributes - { - /// - /// Retrieves the value associated with a key. - /// - void GetItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, Out] IntPtr pValue); - - /// - /// Retrieves the data type of the value associated with a key. - /// - void GetItemType([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pType); - - /// - /// Queries whether a stored attribute value equals a specified PROPVARIANT. - /// - void CompareItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, IntPtr value, [MarshalAs(UnmanagedType.Bool)] out bool pbResult); - - /// - /// Compares the attributes on this object with the attributes on another object. - /// - void Compare([MarshalAs(UnmanagedType.Interface)] IMFAttributes pTheirs, int matchType, [MarshalAs(UnmanagedType.Bool)] out bool pbResult); - - /// - /// Retrieves a UINT32 value associated with a key. - /// - void GetUINT32([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int punValue); - - /// - /// Retrieves a UINT64 value associated with a key. - /// - void GetUINT64([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out long punValue); - - /// - /// Retrieves a double value associated with a key. - /// - void GetDouble([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out double pfValue); - - /// - /// Retrieves a GUID value associated with a key. - /// - void GetGUID([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out Guid pguidValue); - - /// - /// Retrieves the length of a string value associated with a key. - /// - void GetStringLength([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pcchLength); - - /// - /// Retrieves a wide-character string associated with a key. - /// - void GetString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pwszValue, int cchBufSize, - out int pcchLength); - - /// - /// Retrieves a wide-character string associated with a key. This method allocates the memory for the string. - /// - void GetAllocatedString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [MarshalAs(UnmanagedType.LPWStr)] out string ppwszValue, - out int pcchLength); - - /// - /// Retrieves the length of a byte array associated with a key. - /// - void GetBlobSize([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pcbBlobSize); - - /// - /// Retrieves a byte array associated with a key. - /// - void GetBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [Out, MarshalAs(UnmanagedType.LPArray)] byte[] pBuf, int cbBufSize, - out int pcbBlobSize); - - /// - /// Retrieves a byte array associated with a key. This method allocates the memory for the array. - /// - void GetAllocatedBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out IntPtr ip, out int pcbSize); - - /// - /// Retrieves an interface pointer associated with a key. - /// - void GetUnknown([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, - [MarshalAs(UnmanagedType.IUnknown)] out object ppv); - - /// - /// Associates an attribute value with a key. - /// - void SetItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, IntPtr Value); - - /// - /// Removes a key/value pair from the object's attribute list. - /// - void DeleteItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey); - - /// - /// Removes all key/value pairs from the object's attribute list. - /// - void DeleteAllItems(); - - /// - /// Associates a UINT32 value with a key. - /// - void SetUINT32([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, int unValue); - - /// - /// Associates a UINT64 value with a key. - /// - void SetUINT64([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, long unValue); - - /// - /// Associates a double value with a key. - /// - void SetDouble([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, double fValue); - - /// - /// Associates a GUID value with a key. - /// - void SetGUID([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPStruct)] Guid guidValue); - - /// - /// Associates a wide-character string with a key. - /// - void SetString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPWStr)] string wszValue); - - /// - /// Associates a byte array with a key. - /// - void SetBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] pBuf, - int cbBufSize); - - /// - /// Associates an IUnknown pointer with a key. - /// - void SetUnknown([MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnknown); - - /// - /// Locks the attribute store so that no other thread can access it. - /// - void LockStore(); - - /// - /// Unlocks the attribute store. - /// - void UnlockStore(); - - /// - /// Retrieves the number of attributes that are set on this object. - /// - void GetCount(out int pcItems); - - /// - /// Retrieves an attribute at the specified index. - /// - void GetItemByIndex(int unIndex, out Guid pGuidKey, [In, Out] IntPtr pValue); - - /// - /// Copies all of the attributes from this object into another attribute store. - /// - void CopyAllItems([In, MarshalAs(UnmanagedType.Interface)] IMFAttributes pDest); - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFAttributes.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFAttributes.cs.meta deleted file mode 100644 index e347827..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFAttributes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d1bfce488b70e1f4a9bfc82560e6c7c8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFByteStream.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFByteStream.cs deleted file mode 100644 index 971d7e9..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFByteStream.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.MediaFoundation -{ - /// - /// IMFByteStream - /// http://msdn.microsoft.com/en-gb/library/windows/desktop/ms698720%28v=vs.85%29.aspx - /// - [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("ad4c1b00-4bf7-422f-9175-756693d9130d")] - public interface IMFByteStream - { - /// - /// Retrieves the characteristics of the byte stream. - /// virtual HRESULT STDMETHODCALLTYPE GetCapabilities(/*[out]*/ __RPC__out DWORD *pdwCapabilities) = 0; - /// - void GetCapabilities(ref int pdwCapabiities); - - /// - /// Retrieves the length of the stream. - /// virtual HRESULT STDMETHODCALLTYPE GetLength(/*[out]*/ __RPC__out QWORD *pqwLength) = 0; - /// - void GetLength(ref long pqwLength); - - /// - /// Sets the length of the stream. - /// virtual HRESULT STDMETHODCALLTYPE SetLength(/*[in]*/ QWORD qwLength) = 0; - /// - void SetLength(long qwLength); - - /// - /// Retrieves the current read or write position in the stream. - /// virtual HRESULT STDMETHODCALLTYPE GetCurrentPosition(/*[out]*/ __RPC__out QWORD *pqwPosition) = 0; - /// - void GetCurrentPosition(ref long pqwPosition); - - /// - /// Sets the current read or write position. - /// virtual HRESULT STDMETHODCALLTYPE SetCurrentPosition(/*[in]*/ QWORD qwPosition) = 0; - /// - void SetCurrentPosition(long qwPosition); - - /// - /// Queries whether the current position has reached the end of the stream. - /// virtual HRESULT STDMETHODCALLTYPE IsEndOfStream(/*[out]*/ __RPC__out BOOL *pfEndOfStream) = 0; - /// - void IsEndOfStream([MarshalAs(UnmanagedType.Bool)] ref bool pfEndOfStream); - - /// - /// Reads data from the stream. - /// virtual HRESULT STDMETHODCALLTYPE Read(/*[size_is][out]*/ __RPC__out_ecount_full(cb) BYTE *pb, /*[in]*/ ULONG cb, /*[out]*/ __RPC__out ULONG *pcbRead) = 0; - /// - void Read(IntPtr pb, int cb, ref int pcbRead); - - /// - /// Begins an asynchronous read operation from the stream. - /// virtual /*[local]*/ HRESULT STDMETHODCALLTYPE BeginRead(/*[out]*/ _Out_writes_bytes_(cb) BYTE *pb, /*[in]*/ ULONG cb, /*[in]*/ IMFAsyncCallback *pCallback, /*[in]*/ IUnknown *punkState) = 0; - /// - void BeginRead(IntPtr pb, int cb, IntPtr pCallback, IntPtr punkState); - - /// - /// Completes an asynchronous read operation. - /// virtual /*[local]*/ HRESULT STDMETHODCALLTYPE EndRead(/*[in]*/ IMFAsyncResult *pResult, /*[out]*/ _Out_ ULONG *pcbRead) = 0; - /// - void EndRead(IntPtr pResult, ref int pcbRead); - - /// - /// Writes data to the stream. - /// virtual HRESULT STDMETHODCALLTYPE Write(/*[size_is][in]*/ __RPC__in_ecount_full(cb) const BYTE *pb, /*[in]*/ ULONG cb, /*[out]*/ __RPC__out ULONG *pcbWritten) = 0; - /// - void Write(IntPtr pb, int cb, ref int pcbWritten); - - /// - /// Begins an asynchronous write operation to the stream. - /// virtual /*[local]*/ HRESULT STDMETHODCALLTYPE BeginWrite(/*[in]*/ _In_reads_bytes_(cb) const BYTE *pb, /*[in]*/ ULONG cb, /*[in]*/ IMFAsyncCallback *pCallback, /*[in]*/ IUnknown *punkState) = 0; - /// - void BeginWrite(IntPtr pb, int cb, IntPtr pCallback, IntPtr punkState); - - /// - /// Completes an asynchronous write operation. - /// virtual /*[local]*/ HRESULT STDMETHODCALLTYPE EndWrite(/*[in]*/ IMFAsyncResult *pResult, /*[out]*/ _Out_ ULONG *pcbWritten) = 0; - /// - void EndWrite(IntPtr pResult, ref int pcbWritten); - - /// - /// Moves the current position in the stream by a specified offset. - /// virtual HRESULT STDMETHODCALLTYPE Seek(/*[in]*/ MFBYTESTREAM_SEEK_ORIGIN SeekOrigin, /*[in]*/ LONGLONG llSeekOffset, /*[in]*/ DWORD dwSeekFlags, /*[out]*/ __RPC__out QWORD *pqwCurrentPosition) = 0; - /// - void Seek(int SeekOrigin, long llSeekOffset, int dwSeekFlags, ref long pqwCurrentPosition); - - /// - /// Clears any internal buffers used by the stream. - /// virtual HRESULT STDMETHODCALLTYPE Flush( void) = 0; - /// - void Flush(); - - /// - /// Closes the stream and releases any resources associated with the stream. - /// virtual HRESULT STDMETHODCALLTYPE Close( void) = 0; - /// - void Close(); - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFByteStream.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFByteStream.cs.meta deleted file mode 100644 index da07b0a..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFByteStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9bc8a11d925094e41937113cd3a98812 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFCollection.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFCollection.cs deleted file mode 100644 index 616c329..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFCollection.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.MediaFoundation -{ - /// - /// Represents a generic collection of IUnknown pointers. - /// - [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("5BC8A76B-869A-46A3-9B03-FA218A66AEBE")] - public interface IMFCollection - { - /// - /// Retrieves the number of objects in the collection. - /// - void GetElementCount(out int pcElements); - - /// - /// Retrieves an object in the collection. - /// - void GetElement([In] int dwElementIndex, [Out, MarshalAs(UnmanagedType.IUnknown)] out object ppUnkElement); - - /// - /// Adds an object to the collection. - /// - void AddElement([In, MarshalAs(UnmanagedType.IUnknown)] object pUnkElement); - - /// - /// Removes an object from the collection. - /// - void RemoveElement([In] int dwElementIndex, [Out, MarshalAs(UnmanagedType.IUnknown)] out object ppUnkElement); - - /// - /// Removes an object from the collection. - /// - void InsertElementAt([In] int dwIndex, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnknown); - - /// - /// Removes all items from the collection. - /// - void RemoveAllElements(); - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFCollection.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFCollection.cs.meta deleted file mode 100644 index f401784..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFCollection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4ba578be132e1934faaee4fa9ba24d06 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaBuffer.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaBuffer.cs deleted file mode 100644 index 0f79776..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaBuffer.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.MediaFoundation -{ - /// - /// IMFMediaBuffer - /// http://msdn.microsoft.com/en-gb/library/windows/desktop/ms696261%28v=vs.85%29.aspx - /// - [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("045FA593-8799-42b8-BC8D-8968C6453507")] - public interface IMFMediaBuffer - { - /// - /// Gives the caller access to the memory in the buffer. - /// - void Lock(out IntPtr ppbBuffer, out int pcbMaxLength, out int pcbCurrentLength); - /// - /// Unlocks a buffer that was previously locked. - /// - void Unlock(); - /// - /// Retrieves the length of the valid data in the buffer. - /// - void GetCurrentLength(out int pcbCurrentLength); - /// - /// Sets the length of the valid data in the buffer. - /// - void SetCurrentLength(int cbCurrentLength); - /// - /// Retrieves the allocated size of the buffer. - /// - void GetMaxLength(out int pcbMaxLength); - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaBuffer.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaBuffer.cs.meta deleted file mode 100644 index 8db6e36..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaBuffer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c0f47599ae04b1648a1f20da0091e48e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaEvent.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaEvent.cs deleted file mode 100644 index 11d9641..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaEvent.cs +++ /dev/null @@ -1,207 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; -using NAudio.CoreAudioApi.Interfaces; - -namespace NAudio.MediaFoundation -{ - /// - /// IMFMediaEvent - Represents an event generated by a Media Foundation object. Use this interface to get information about the event. - /// http://msdn.microsoft.com/en-us/library/windows/desktop/ms702249%28v=vs.85%29.aspx - /// Mfobjects.h - /// - [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("DF598932-F10C-4E39-BBA2-C308F101DAA3")] - public interface IMFMediaEvent : IMFAttributes - { - /// - /// Retrieves the value associated with a key. - /// - new void GetItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, Out] IntPtr pValue); - - /// - /// Retrieves the data type of the value associated with a key. - /// - new void GetItemType([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pType); - - /// - /// Queries whether a stored attribute value equals a specified PROPVARIANT. - /// - new void CompareItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, IntPtr value, [MarshalAs(UnmanagedType.Bool)] out bool pbResult); - - /// - /// Compares the attributes on this object with the attributes on another object. - /// - new void Compare([MarshalAs(UnmanagedType.Interface)] IMFAttributes pTheirs, int matchType, [MarshalAs(UnmanagedType.Bool)] out bool pbResult); - - /// - /// Retrieves a UINT32 value associated with a key. - /// - new void GetUINT32([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int punValue); - - /// - /// Retrieves a UINT64 value associated with a key. - /// - new void GetUINT64([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out long punValue); - - /// - /// Retrieves a double value associated with a key. - /// - new void GetDouble([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out double pfValue); - - /// - /// Retrieves a GUID value associated with a key. - /// - new void GetGUID([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out Guid pguidValue); - - /// - /// Retrieves the length of a string value associated with a key. - /// - new void GetStringLength([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pcchLength); - - /// - /// Retrieves a wide-character string associated with a key. - /// - new void GetString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pwszValue, int cchBufSize, - out int pcchLength); - - /// - /// Retrieves a wide-character string associated with a key. This method allocates the memory for the string. - /// - new void GetAllocatedString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [MarshalAs(UnmanagedType.LPWStr)] out string ppwszValue, - out int pcchLength); - - /// - /// Retrieves the length of a byte array associated with a key. - /// - new void GetBlobSize([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pcbBlobSize); - - /// - /// Retrieves a byte array associated with a key. - /// - new void GetBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [Out, MarshalAs(UnmanagedType.LPArray)] byte[] pBuf, int cbBufSize, - out int pcbBlobSize); - - /// - /// Retrieves a byte array associated with a key. This method allocates the memory for the array. - /// - new void GetAllocatedBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out IntPtr ip, out int pcbSize); - - /// - /// Retrieves an interface pointer associated with a key. - /// - new void GetUnknown([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, - [MarshalAs(UnmanagedType.IUnknown)] out object ppv); - - /// - /// Associates an attribute value with a key. - /// - new void SetItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, IntPtr value); - - /// - /// Removes a key/value pair from the object's attribute list. - /// - new void DeleteItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey); - - /// - /// Removes all key/value pairs from the object's attribute list. - /// - new void DeleteAllItems(); - - /// - /// Associates a UINT32 value with a key. - /// - new void SetUINT32([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, int unValue); - - /// - /// Associates a UINT64 value with a key. - /// - new void SetUINT64([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, long unValue); - - /// - /// Associates a double value with a key. - /// - new void SetDouble([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, double fValue); - - /// - /// Associates a GUID value with a key. - /// - new void SetGUID([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPStruct)] Guid guidValue); - - /// - /// Associates a wide-character string with a key. - /// - new void SetString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPWStr)] string wszValue); - - /// - /// Associates a byte array with a key. - /// - new void SetBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] pBuf, - int cbBufSize); - - /// - /// Associates an IUnknown pointer with a key. - /// - new void SetUnknown([MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnknown); - - /// - /// Locks the attribute store so that no other thread can access it. - /// - new void LockStore(); - - /// - /// Unlocks the attribute store. - /// - new void UnlockStore(); - - /// - /// Retrieves the number of attributes that are set on this object. - /// - new void GetCount(out int pcItems); - - /// - /// Retrieves an attribute at the specified index. - /// - new void GetItemByIndex(int unIndex, out Guid pGuidKey, [In, Out] IntPtr pValue); - - /// - /// Copies all of the attributes from this object into another attribute store. - /// - new void CopyAllItems([In, MarshalAs(UnmanagedType.Interface)] IMFAttributes pDest); - - /// - /// Retrieves the event type. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetType( - /// /* [out] */ __RPC__out MediaEventType *pmet) = 0; - /// - void GetType([Out] out MediaEventType pmet); - - /// - /// Retrieves the extended type of the event. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetExtendedType( - /// /* [out] */ __RPC__out GUID *pguidExtendedType) = 0; - /// - void GetExtendedType([Out] out Guid pguidExtendedType); - - /// - /// Retrieves an HRESULT that specifies the event status. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetStatus( - /// /* [out] */ __RPC__out HRESULT *phrStatus) = 0; - /// - void GetStatus([MarshalAs(UnmanagedType.Error)] out int phrStatus); - - /// - /// Retrieves the value associated with the event, if any. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetValue( - /// /* [out] */ __RPC__out PROPVARIANT *pvValue) = 0; - /// - void GetValue([Out]IntPtr pvValue); - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaEvent.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaEvent.cs.meta deleted file mode 100644 index 781b05a..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e76e1f404f272ea40b0bc2a2b3bfe8cb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaType.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaType.cs deleted file mode 100644 index e7d2d3f..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaType.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.MediaFoundation -{ - /// - /// Represents a description of a media format. - /// http://msdn.microsoft.com/en-us/library/windows/desktop/ms704850%28v=vs.85%29.aspx - /// - [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("44AE0FA8-EA31-4109-8D2E-4CAE4997C555")] - public interface IMFMediaType : IMFAttributes - { - /// - /// Retrieves the value associated with a key. - /// - new void GetItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, Out] IntPtr pValue); - - /// - /// Retrieves the data type of the value associated with a key. - /// - new void GetItemType([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pType); - - /// - /// Queries whether a stored attribute value equals a specified PROPVARIANT. - /// - new void CompareItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, IntPtr value, [MarshalAs(UnmanagedType.Bool)] out bool pbResult); - - /// - /// Compares the attributes on this object with the attributes on another object. - /// - new void Compare([MarshalAs(UnmanagedType.Interface)] IMFAttributes pTheirs, int matchType, [MarshalAs(UnmanagedType.Bool)] out bool pbResult); - - /// - /// Retrieves a UINT32 value associated with a key. - /// - new void GetUINT32([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int punValue); - - /// - /// Retrieves a UINT64 value associated with a key. - /// - new void GetUINT64([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out long punValue); - - /// - /// Retrieves a double value associated with a key. - /// - new void GetDouble([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out double pfValue); - - /// - /// Retrieves a GUID value associated with a key. - /// - new void GetGUID([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out Guid pguidValue); - - /// - /// Retrieves the length of a string value associated with a key. - /// - new void GetStringLength([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pcchLength); - - /// - /// Retrieves a wide-character string associated with a key. - /// - new void GetString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pwszValue, int cchBufSize, - out int pcchLength); - - /// - /// Retrieves a wide-character string associated with a key. This method allocates the memory for the string. - /// - new void GetAllocatedString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [MarshalAs(UnmanagedType.LPWStr)] out string ppwszValue, - out int pcchLength); - - /// - /// Retrieves the length of a byte array associated with a key. - /// - new void GetBlobSize([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pcbBlobSize); - - /// - /// Retrieves a byte array associated with a key. - /// - new void GetBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [Out, MarshalAs(UnmanagedType.LPArray)] byte[] pBuf, int cbBufSize, - out int pcbBlobSize); - - /// - /// Retrieves a byte array associated with a key. This method allocates the memory for the array. - /// - new void GetAllocatedBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out IntPtr ip, out int pcbSize); - - /// - /// Retrieves an interface pointer associated with a key. - /// - new void GetUnknown([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, - [MarshalAs(UnmanagedType.IUnknown)] out object ppv); - - /// - /// Associates an attribute value with a key. - /// - new void SetItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, IntPtr value); - - /// - /// Removes a key/value pair from the object's attribute list. - /// - new void DeleteItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey); - - /// - /// Removes all key/value pairs from the object's attribute list. - /// - new void DeleteAllItems(); - - /// - /// Associates a UINT32 value with a key. - /// - new void SetUINT32([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, int unValue); - - /// - /// Associates a UINT64 value with a key. - /// - new void SetUINT64([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, long unValue); - - /// - /// Associates a double value with a key. - /// - new void SetDouble([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, double fValue); - - /// - /// Associates a GUID value with a key. - /// - new void SetGUID([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPStruct)] Guid guidValue); - - /// - /// Associates a wide-character string with a key. - /// - new void SetString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPWStr)] string wszValue); - - /// - /// Associates a byte array with a key. - /// - new void SetBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] pBuf, - int cbBufSize); - - /// - /// Associates an IUnknown pointer with a key. - /// - new void SetUnknown([MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnknown); - - /// - /// Locks the attribute store so that no other thread can access it. - /// - new void LockStore(); - - /// - /// Unlocks the attribute store. - /// - new void UnlockStore(); - - /// - /// Retrieves the number of attributes that are set on this object. - /// - new void GetCount(out int pcItems); - - /// - /// Retrieves an attribute at the specified index. - /// - new void GetItemByIndex(int unIndex, out Guid pGuidKey, [In, Out] IntPtr pValue); - - /// - /// Copies all of the attributes from this object into another attribute store. - /// - new void CopyAllItems([In, MarshalAs(UnmanagedType.Interface)] IMFAttributes pDest); - - /// - /// Retrieves the major type of the format. - /// - void GetMajorType(out Guid pguidMajorType); - - /// - /// Queries whether the media type is a compressed format. - /// - void IsCompressedFormat([MarshalAs(UnmanagedType.Bool)] out bool pfCompressed); - - /// - /// Compares two media types and determines whether they are identical. - /// - [PreserveSig] - int IsEqual([In, MarshalAs(UnmanagedType.Interface)] IMFMediaType pIMediaType, ref int pdwFlags); - - /// - /// Retrieves an alternative representation of the media type. - /// - - void GetRepresentation([In] Guid guidRepresentation, ref IntPtr ppvRepresentation); - - /// - /// Frees memory that was allocated by the GetRepresentation method. - /// - void FreeRepresentation([In] Guid guidRepresentation, [In] IntPtr pvRepresentation); - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaType.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaType.cs.meta deleted file mode 100644 index 84d3ba8..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFMediaType.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8bfd66c76ddb17f4e9d2ff9fcc9293a8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFReadWriteClassFactory.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFReadWriteClassFactory.cs deleted file mode 100644 index b245817..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFReadWriteClassFactory.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.MediaFoundation -{ - /// - /// Creates an instance of either the sink writer or the source reader. - /// - [ComImport,Guid("E7FE2E12-661C-40DA-92F9-4F002AB67627"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IMFReadWriteClassFactory - { - /// - /// Creates an instance of the sink writer or source reader, given a URL. - /// - void CreateInstanceFromURL([In, MarshalAs(UnmanagedType.LPStruct)] Guid clsid, [In, MarshalAs(UnmanagedType.LPWStr)] string pwszURL, [In, MarshalAs(UnmanagedType.Interface)] IMFAttributes pAttributes, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out object ppvObject); - - /// - /// Creates an instance of the sink writer or source reader, given an IUnknown pointer. - /// - void CreateInstanceFromObject([In, MarshalAs(UnmanagedType.LPStruct)] Guid clsid, [In, MarshalAs(UnmanagedType.IUnknown)] object punkObject, [In, MarshalAs(UnmanagedType.Interface)] IMFAttributes pAttributes, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out object ppvObject); - } - - /// - /// CLSID_MFReadWriteClassFactory - /// - [ComImport, Guid("48e2ed0f-98c2-4a37-bed5-166312ddd83f")] - public class MFReadWriteClassFactory - { - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFReadWriteClassFactory.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFReadWriteClassFactory.cs.meta deleted file mode 100644 index f9c8d07..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFReadWriteClassFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 13e7a2159538c324fa03f7737d36d2ae -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSample.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSample.cs deleted file mode 100644 index dac68bb..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSample.cs +++ /dev/null @@ -1,238 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.MediaFoundation -{ - /// - /// http://msdn.microsoft.com/en-gb/library/windows/desktop/ms702192%28v=vs.85%29.aspx - /// - [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("c40a00f2-b93a-4d80-ae8c-5a1c634f58e4")] - public interface IMFSample : IMFAttributes - { - /// - /// Retrieves the value associated with a key. - /// - new void GetItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, Out] IntPtr pValue); - - /// - /// Retrieves the data type of the value associated with a key. - /// - new void GetItemType([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pType); - - /// - /// Queries whether a stored attribute value equals a specified PROPVARIANT. - /// - new void CompareItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, IntPtr value, [MarshalAs(UnmanagedType.Bool)] out bool pbResult); - - /// - /// Compares the attributes on this object with the attributes on another object. - /// - new void Compare([MarshalAs(UnmanagedType.Interface)] IMFAttributes pTheirs, int matchType, [MarshalAs(UnmanagedType.Bool)] out bool pbResult); - - /// - /// Retrieves a UINT32 value associated with a key. - /// - new void GetUINT32([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int punValue); - - /// - /// Retrieves a UINT64 value associated with a key. - /// - new void GetUINT64([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out long punValue); - - /// - /// Retrieves a double value associated with a key. - /// - new void GetDouble([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out double pfValue); - - /// - /// Retrieves a GUID value associated with a key. - /// - new void GetGUID([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out Guid pguidValue); - - /// - /// Retrieves the length of a string value associated with a key. - /// - new void GetStringLength([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pcchLength); - - /// - /// Retrieves a wide-character string associated with a key. - /// - new void GetString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pwszValue, int cchBufSize, - out int pcchLength); - - /// - /// Retrieves a wide-character string associated with a key. This method allocates the memory for the string. - /// - new void GetAllocatedString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [MarshalAs(UnmanagedType.LPWStr)] out string ppwszValue, - out int pcchLength); - - /// - /// Retrieves the length of a byte array associated with a key. - /// - new void GetBlobSize([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out int pcbBlobSize); - - /// - /// Retrieves a byte array associated with a key. - /// - new void GetBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [Out, MarshalAs(UnmanagedType.LPArray)] byte[] pBuf, int cbBufSize, - out int pcbBlobSize); - - /// - /// Retrieves a byte array associated with a key. This method allocates the memory for the array. - /// - new void GetAllocatedBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, out IntPtr ip, out int pcbSize); - - /// - /// Retrieves an interface pointer associated with a key. - /// - new void GetUnknown([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, - [MarshalAs(UnmanagedType.IUnknown)] out object ppv); - - /// - /// Associates an attribute value with a key. - /// - new void SetItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, IntPtr value); - - /// - /// Removes a key/value pair from the object's attribute list. - /// - new void DeleteItem([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey); - - /// - /// Removes all key/value pairs from the object's attribute list. - /// - new void DeleteAllItems(); - - /// - /// Associates a UINT32 value with a key. - /// - new void SetUINT32([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, int unValue); - - /// - /// Associates a UINT64 value with a key. - /// - new void SetUINT64([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, long unValue); - - /// - /// Associates a double value with a key. - /// - new void SetDouble([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, double fValue); - - /// - /// Associates a GUID value with a key. - /// - new void SetGUID([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPStruct)] Guid guidValue); - - /// - /// Associates a wide-character string with a key. - /// - new void SetString([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPWStr)] string wszValue); - - /// - /// Associates a byte array with a key. - /// - new void SetBlob([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] pBuf, - int cbBufSize); - - /// - /// Associates an IUnknown pointer with a key. - /// - new void SetUnknown([MarshalAs(UnmanagedType.LPStruct)] Guid guidKey, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnknown); - - /// - /// Locks the attribute store so that no other thread can access it. - /// - new void LockStore(); - - /// - /// Unlocks the attribute store. - /// - new void UnlockStore(); - - /// - /// Retrieves the number of attributes that are set on this object. - /// - new void GetCount(out int pcItems); - - /// - /// Retrieves an attribute at the specified index. - /// - new void GetItemByIndex(int unIndex, out Guid pGuidKey, [In, Out] IntPtr pValue); - - /// - /// Copies all of the attributes from this object into another attribute store. - /// - new void CopyAllItems([In, MarshalAs(UnmanagedType.Interface)] IMFAttributes pDest); - - /// - /// Retrieves flags associated with the sample. - /// - void GetSampleFlags(out int pdwSampleFlags); - - /// - /// Sets flags associated with the sample. - /// - void SetSampleFlags(int dwSampleFlags); - - /// - /// Retrieves the presentation time of the sample. - /// - void GetSampleTime(out long phnsSampletime); - - /// - /// Sets the presentation time of the sample. - /// - void SetSampleTime(long hnsSampleTime); - - /// - /// Retrieves the duration of the sample. - /// - void GetSampleDuration(out long phnsSampleDuration); - - /// - /// Sets the duration of the sample. - /// - void SetSampleDuration(long hnsSampleDuration); - - /// - /// Retrieves the number of buffers in the sample. - /// - void GetBufferCount(out int pdwBufferCount); - - /// - /// Retrieves a buffer from the sample. - /// - void GetBufferByIndex(int dwIndex, out IMFMediaBuffer ppBuffer); - - /// - /// Converts a sample with multiple buffers into a sample with a single buffer. - /// - void ConvertToContiguousBuffer(out IMFMediaBuffer ppBuffer); - - /// - /// Adds a buffer to the end of the list of buffers in the sample. - /// - void AddBuffer(IMFMediaBuffer pBuffer); - - /// - /// Removes a buffer at a specified index from the sample. - /// - void RemoveBufferByIndex(int dwIndex); - - /// - /// Removes all buffers from the sample. - /// - void RemoveAllBuffers(); - - /// - /// Retrieves the total length of the valid data in all of the buffers in the sample. - /// - void GetTotalLength(out int pcbTotalLength); - - /// - /// Copies the sample data to a buffer. - /// - void CopyToBuffer(IMFMediaBuffer pBuffer); - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSample.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSample.cs.meta deleted file mode 100644 index f2182e4..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSample.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b6a9be812edd3ba48a7d752bcf387648 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSinkWriter.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSinkWriter.cs deleted file mode 100644 index fcbaabe..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSinkWriter.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.MediaFoundation -{ - /// - /// Implemented by the Microsoft Media Foundation sink writer object. - /// - [ComImport, Guid("3137f1cd-fe5e-4805-a5d8-fb477448cb3d"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IMFSinkWriter - { - /// - /// Adds a stream to the sink writer. - /// - void AddStream([In, MarshalAs(UnmanagedType.Interface)] IMFMediaType pTargetMediaType, out int pdwStreamIndex); - /// - /// Sets the input format for a stream on the sink writer. - /// - void SetInputMediaType([In] int dwStreamIndex, [In, MarshalAs(UnmanagedType.Interface)] IMFMediaType pInputMediaType, [In, MarshalAs(UnmanagedType.Interface)] IMFAttributes pEncodingParameters); - /// - /// Initializes the sink writer for writing. - /// - void BeginWriting(); - /// - /// Delivers a sample to the sink writer. - /// - void WriteSample([In] int dwStreamIndex, [In, MarshalAs(UnmanagedType.Interface)] IMFSample pSample); - /// - /// Indicates a gap in an input stream. - /// - void SendStreamTick([In] int dwStreamIndex, [In] long llTimestamp); - /// - /// Places a marker in the specified stream. - /// - void PlaceMarker([In] int dwStreamIndex, [In] IntPtr pvContext); - /// - /// Notifies the media sink that a stream has reached the end of a segment. - /// - void NotifyEndOfSegment([In] int dwStreamIndex); - /// - /// Flushes one or more streams. - /// - void Flush([In] int dwStreamIndex); - /// - /// (Finalize) Completes all writing operations on the sink writer. - /// - void DoFinalize(); - /// - /// Queries the underlying media sink or encoder for an interface. - /// - void GetServiceForStream([In] int dwStreamIndex, [In] ref Guid guidService, [In] ref Guid riid, out IntPtr ppvObject); - /// - /// Gets statistics about the performance of the sink writer. - /// - void GetStatistics([In] int dwStreamIndex, [In, Out] MF_SINK_WRITER_STATISTICS pStats); - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSinkWriter.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSinkWriter.cs.meta deleted file mode 100644 index 0ff71c1..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSinkWriter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 87d0d817703a57b48bc90e7f6a7323cd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSourceReader.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSourceReader.cs deleted file mode 100644 index 7d34124..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSourceReader.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.MediaFoundation -{ - /// - /// IMFSourceReader interface - /// http://msdn.microsoft.com/en-us/library/windows/desktop/dd374655%28v=vs.85%29.aspx - /// - [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("70ae66f2-c809-4e4f-8915-bdcb406b7993")] - public interface IMFSourceReader - { - /// - /// Queries whether a stream is selected. - /// - void GetStreamSelection([In] int dwStreamIndex, [Out, MarshalAs(UnmanagedType.Bool)] out bool pSelected); - /// - /// Selects or deselects one or more streams. - /// - void SetStreamSelection([In] int dwStreamIndex, [In, MarshalAs(UnmanagedType.Bool)] bool pSelected); - /// - /// Gets a format that is supported natively by the media source. - /// - void GetNativeMediaType([In] int dwStreamIndex, [In] int dwMediaTypeIndex, [Out] out IMFMediaType ppMediaType); - /// - /// Gets the current media type for a stream. - /// - void GetCurrentMediaType([In] int dwStreamIndex, [Out] out IMFMediaType ppMediaType); - /// - /// Sets the media type for a stream. - /// - void SetCurrentMediaType([In] int dwStreamIndex, IntPtr pdwReserved, [In] IMFMediaType pMediaType); - /// - /// Seeks to a new position in the media source. - /// - void SetCurrentPosition([In, MarshalAs(UnmanagedType.LPStruct)] Guid guidTimeFormat, [In] IntPtr varPosition); - /// - /// Reads the next sample from the media source. - /// - void ReadSample([In] int dwStreamIndex, [In] int dwControlFlags, [Out] out int pdwActualStreamIndex, [Out] out MF_SOURCE_READER_FLAG pdwStreamFlags, - [Out] out UInt64 pllTimestamp, [Out] out IMFSample ppSample); - /// - /// Flushes one or more streams. - /// - void Flush([In] int dwStreamIndex); - - /// - /// Queries the underlying media source or decoder for an interface. - /// - void GetServiceForStream([In] int dwStreamIndex, [In, MarshalAs(UnmanagedType.LPStruct)] Guid guidService, - [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, [Out] out IntPtr ppvObject); - - /// - /// Gets an attribute from the underlying media source. - /// - [PreserveSig] - int GetPresentationAttribute([In] int dwStreamIndex, [In, MarshalAs(UnmanagedType.LPStruct)] Guid guidAttribute, [Out] IntPtr pvarAttribute); - } - - /// - /// Contains flags that indicate the status of the IMFSourceReader::ReadSample method - /// http://msdn.microsoft.com/en-us/library/windows/desktop/dd375773(v=vs.85).aspx - /// - [Flags] - public enum MF_SOURCE_READER_FLAG { - /// - /// No Error - /// - None = 0, - /// - /// An error occurred. If you receive this flag, do not make any further calls to IMFSourceReader methods. - /// - MF_SOURCE_READERF_ERROR = 0x00000001, - /// - /// The source reader reached the end of the stream. - /// - MF_SOURCE_READERF_ENDOFSTREAM = 0x00000002, - /// - /// One or more new streams were created - /// - MF_SOURCE_READERF_NEWSTREAM = 0x00000004, - /// - /// The native format has changed for one or more streams. The native format is the format delivered by the media source before any decoders are inserted. - /// - MF_SOURCE_READERF_NATIVEMEDIATYPECHANGED = 0x00000010, - /// - /// The current media has type changed for one or more streams. To get the current media type, call the IMFSourceReader::GetCurrentMediaType method. - /// - MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED = 0x00000020, - /// - /// There is a gap in the stream. This flag corresponds to an MEStreamTick event from the media source. - /// - MF_SOURCE_READERF_STREAMTICK = 0x00000100, - /// - /// All transforms inserted by the application have been removed for a particular stream. - /// - MF_SOURCE_READERF_ALLEFFECTSREMOVED = 0x00000200 - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSourceReader.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSourceReader.cs.meta deleted file mode 100644 index 8662e6e..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFSourceReader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ac0875313a7462340bcfb68e8b1141a6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFTransform.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFTransform.cs deleted file mode 100644 index e9c8ee8..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFTransform.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.MediaFoundation -{ - /// - /// IMFTransform, defined in mftransform.h - /// - [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("bf94c121-5b05-4e6f-8000-ba598961414d")] - public interface IMFTransform - { - /// - /// Retrieves the minimum and maximum number of input and output streams. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetStreamLimits( - /// /* [out] */ __RPC__out DWORD *pdwInputMinimum, - /// /* [out] */ __RPC__out DWORD *pdwInputMaximum, - /// /* [out] */ __RPC__out DWORD *pdwOutputMinimum, - /// /* [out] */ __RPC__out DWORD *pdwOutputMaximum) = 0; - /// - void GetStreamLimits([Out] out int pdwInputMinimum, [Out] out int pdwInputMaximum, [Out] out int pdwOutputMinimum, [Out] out int pdwOutputMaximum); - - /// - /// Retrieves the current number of input and output streams on this MFT. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetStreamCount( - /// /* [out] */ __RPC__out DWORD *pcInputStreams, - /// /* [out] */ __RPC__out DWORD *pcOutputStreams) = 0; - /// - void GetStreamCount([Out] out int pcInputStreams, [Out] out int pcOutputStreams); - - /// - /// Retrieves the stream identifiers for the input and output streams on this MFT. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetStreamIDs( - /// DWORD dwInputIDArraySize, - /// /* [size_is][out] */ __RPC__out_ecount_full(dwInputIDArraySize) DWORD *pdwInputIDs, - /// DWORD dwOutputIDArraySize, - /// /* [size_is][out] */ __RPC__out_ecount_full(dwOutputIDArraySize) DWORD *pdwOutputIDs) = 0; - /// - void GetStreamIds([In] int dwInputIdArraySize, [In, Out] IntPtr pdwInputIDs, [In] int dwOutputIdArraySize, [In, Out] IntPtr pdwOutputIDs); - - /// - /// Gets the buffer requirements and other information for an input stream on this Media Foundation transform (MFT). - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetInputStreamInfo( - /// DWORD dwInputStreamID, - /// /* [out] */ __RPC__out MFT_INPUT_STREAM_INFO *pStreamInfo) = 0; - /// - void GetInputStreamInfo([In] int dwInputStreamId, [Out] out MFT_INPUT_STREAM_INFO pStreamInfo); - - /// - /// Gets the buffer requirements and other information for an output stream on this Media Foundation transform (MFT). - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetOutputStreamInfo( - /// DWORD dwOutputStreamID, - /// /* [out] */ __RPC__out MFT_OUTPUT_STREAM_INFO *pStreamInfo) = 0; - /// - void GetOutputStreamInfo([In] int dwOutputStreamId, [Out] out MFT_OUTPUT_STREAM_INFO pStreamInfo); - - /// - /// Gets the global attribute store for this Media Foundation transform (MFT). - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetAttributes( - /// /* [out] */ __RPC__deref_out_opt IMFAttributes **pAttributes) = 0; - /// - void GetAttributes([Out] out IMFAttributes pAttributes); - - /// - /// Retrieves the attribute store for an input stream on this MFT. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetInputStreamAttributes( - /// DWORD dwInputStreamID, - /// /* [out] */ __RPC__deref_out_opt IMFAttributes **pAttributes) = 0; - /// - void GetInputStreamAttributes([In] int dwInputStreamId, [Out] out IMFAttributes pAttributes); - - /// - /// Retrieves the attribute store for an output stream on this MFT. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetOutputStreamAttributes( - /// DWORD dwOutputStreamID, - /// /* [out] */ __RPC__deref_out_opt IMFAttributes **pAttributes) = 0; - /// - void GetOutputStreamAttributes([In] int dwOutputStreamId, [Out] out IMFAttributes pAttributes); - - /// - /// Removes an input stream from this MFT. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE DeleteInputStream( - /// DWORD dwStreamID) = 0; - /// - void DeleteInputStream([In] int dwOutputStreamId); - - /// - /// Adds one or more new input streams to this MFT. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE AddInputStreams( - /// DWORD cStreams, - /// /* [in] */ __RPC__in DWORD *adwStreamIDs) = 0; - /// - void AddInputStreams([In] int cStreams, [In] IntPtr adwStreamIDs); - - /// - /// Gets an available media type for an input stream on this Media Foundation transform (MFT). - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetInputAvailableType( - /// DWORD dwInputStreamID, - /// DWORD dwTypeIndex, - /// /* [out] */ __RPC__deref_out_opt IMFMediaType **ppType) = 0; - /// - void GetInputAvailableType([In] int dwInputStreamId, [In] int dwTypeIndex, [Out] out IMFMediaType ppType); - - /// - /// Retrieves an available media type for an output stream on this MFT. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetOutputAvailableType( - /// DWORD dwOutputStreamID, - /// DWORD dwTypeIndex, - /// /* [out] */ __RPC__deref_out_opt IMFMediaType **ppType) = 0; - /// - void GetOutputAvailableType([In] int dwOutputStreamId, [In] int dwTypeIndex, [Out] out IMFMediaType ppType); - - /// - /// Sets, tests, or clears the media type for an input stream on this Media Foundation transform (MFT). - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE SetInputType( - /// DWORD dwInputStreamID, - /// /* [in] */ __RPC__in_opt IMFMediaType *pType, - /// DWORD dwFlags) = 0; - /// - void SetInputType([In] int dwInputStreamId, [In] IMFMediaType pType, [In] _MFT_SET_TYPE_FLAGS dwFlags); - - /// - /// Sets, tests, or clears the media type for an output stream on this Media Foundation transform (MFT). - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE SetOutputType( - /// DWORD dwOutputStreamID, - /// /* [in] */ __RPC__in_opt IMFMediaType *pType, - /// DWORD dwFlags) = 0; - /// - void SetOutputType([In] int dwOutputStreamId, [In] IMFMediaType pType, [In] _MFT_SET_TYPE_FLAGS dwFlags); - - /// - /// Gets the current media type for an input stream on this Media Foundation transform (MFT). - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetInputCurrentType( - /// DWORD dwInputStreamID, - /// /* [out] */ __RPC__deref_out_opt IMFMediaType **ppType) = 0; - /// - void GetInputCurrentType([In] int dwInputStreamId, [Out] out IMFMediaType ppType); - - /// - /// Gets the current media type for an output stream on this Media Foundation transform (MFT). - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetOutputCurrentType( - /// DWORD dwOutputStreamID, - /// /* [out] */ __RPC__deref_out_opt IMFMediaType **ppType) = 0; - /// - void GetOutputCurrentType([In] int dwOutputStreamId, [Out] out IMFMediaType ppType); - - /// - /// Queries whether an input stream on this Media Foundation transform (MFT) can accept more data. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetInputStatus( - /// DWORD dwInputStreamID, - /// /* [out] */ __RPC__out DWORD *pdwFlags) = 0; - /// - void GetInputStatus([In] int dwInputStreamId, [Out] out _MFT_INPUT_STATUS_FLAGS pdwFlags); - - /// - /// Queries whether the Media Foundation transform (MFT) is ready to produce output data. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE GetOutputStatus( - /// /* [out] */ __RPC__out DWORD *pdwFlags) = 0; - /// - void GetOutputStatus([In] int dwInputStreamId, [Out] out _MFT_OUTPUT_STATUS_FLAGS pdwFlags); - - /// - /// Sets the range of time stamps the client needs for output. - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE SetOutputBounds( - /// LONGLONG hnsLowerBound, - /// LONGLONG hnsUpperBound) = 0; - /// - void SetOutputBounds([In] long hnsLowerBound, [In] long hnsUpperBound); - - /// - /// Sends an event to an input stream on this Media Foundation transform (MFT). - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE ProcessEvent( - /// DWORD dwInputStreamID, - /// /* [in] */ __RPC__in_opt IMFMediaEvent *pEvent) = 0; - /// - void ProcessEvent([In] int dwInputStreamId, [In] IMFMediaEvent pEvent); - - /// - /// Sends a message to the Media Foundation transform (MFT). - /// - /// - /// virtual HRESULT STDMETHODCALLTYPE ProcessMessage( - /// MFT_MESSAGE_TYPE eMessage, - /// ULONG_PTR ulParam) = 0; - /// - void ProcessMessage([In] MFT_MESSAGE_TYPE eMessage, [In] IntPtr ulParam); - - /// - /// Delivers data to an input stream on this Media Foundation transform (MFT). - /// - /// - /// virtual /* [local] */ HRESULT STDMETHODCALLTYPE ProcessInput( - /// DWORD dwInputStreamID, - /// IMFSample *pSample, - /// DWORD dwFlags) = 0; - /// - void ProcessInput([In] int dwInputStreamId, [In] IMFSample pSample, int dwFlags); - - /// - /// Generates output from the current input data. - /// - /// - /// virtual /* [local] */ HRESULT STDMETHODCALLTYPE ProcessOutput( - /// DWORD dwFlags, - /// DWORD cOutputBufferCount, - /// /* [size_is][out][in] */ MFT_OUTPUT_DATA_BUFFER *pOutputSamples, - /// /* [out] */ DWORD *pdwStatus) = 0; - /// - [PreserveSig] - int ProcessOutput([In] _MFT_PROCESS_OUTPUT_FLAGS dwFlags, - [In] int cOutputBufferCount, - [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] MFT_OUTPUT_DATA_BUFFER[] pOutputSamples, - [Out] out _MFT_PROCESS_OUTPUT_STATUS pdwStatus); - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFTransform.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFTransform.cs.meta deleted file mode 100644 index 23b3379..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/IMFTransform.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c4e34366118f074448baf9fa4e74ca4e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_INPUT_STREAM_INFO.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_INPUT_STREAM_INFO.cs deleted file mode 100644 index 11cff00..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_INPUT_STREAM_INFO.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.MediaFoundation -{ - /// - /// Contains information about an input stream on a Media Foundation transform (MFT) - /// - [StructLayout(LayoutKind.Sequential)] - public struct MFT_INPUT_STREAM_INFO - { - /// - /// Maximum amount of time between an input sample and the corresponding output sample, in 100-nanosecond units. - /// - public long hnsMaxLatency; - /// - /// Bitwise OR of zero or more flags from the _MFT_INPUT_STREAM_INFO_FLAGS enumeration. - /// - public _MFT_INPUT_STREAM_INFO_FLAGS dwFlags; - /// - /// The minimum size of each input buffer, in bytes. - /// - public int cbSize; - /// - /// Maximum amount of input data, in bytes, that the MFT holds to perform lookahead. - /// - public int cbMaxLookahead; - /// - /// The memory alignment required for input buffers. If the MFT does not require a specific alignment, the value is zero. - /// - public int cbAlignment; - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_INPUT_STREAM_INFO.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_INPUT_STREAM_INFO.cs.meta deleted file mode 100644 index 791589f..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_INPUT_STREAM_INFO.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d743a209827d49247a136cf00eeabf88 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_MESSAGE_TYPE.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_MESSAGE_TYPE.cs deleted file mode 100644 index d724f4e..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_MESSAGE_TYPE.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.MediaFoundation -{ - /// - /// Defines messages for a Media Foundation transform (MFT). - /// - public enum MFT_MESSAGE_TYPE - { - /// - /// Requests the MFT to flush all stored data. - /// - MFT_MESSAGE_COMMAND_FLUSH = 0x00000000, - /// - /// Requests the MFT to drain any stored data. - /// - MFT_MESSAGE_COMMAND_DRAIN = 0x00000001, - /// - /// Sets or clears the Direct3D Device Manager for DirectX Video Accereration (DXVA). - /// - MFT_MESSAGE_SET_D3D_MANAGER = 0x00000002, - /// - /// Drop samples - requires Windows 7 - /// - MFT_MESSAGE_DROP_SAMPLES = 0x00000003, - /// - /// Command Tick - requires Windows 8 - /// - MFT_MESSAGE_COMMAND_TICK = 0x00000004, - /// - /// Notifies the MFT that streaming is about to begin. - /// - MFT_MESSAGE_NOTIFY_BEGIN_STREAMING = 0x10000000, - /// - /// Notifies the MFT that streaming is about to end. - /// - MFT_MESSAGE_NOTIFY_END_STREAMING = 0x10000001, - /// - /// Notifies the MFT that an input stream has ended. - /// - MFT_MESSAGE_NOTIFY_END_OF_STREAM = 0x10000002, - /// - /// Notifies the MFT that the first sample is about to be processed. - /// - MFT_MESSAGE_NOTIFY_START_OF_STREAM = 0x10000003, - /// - /// Marks a point in the stream. This message applies only to asynchronous MFTs. Requires Windows 7 - /// - MFT_MESSAGE_COMMAND_MARKER = 0x20000000 - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_MESSAGE_TYPE.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_MESSAGE_TYPE.cs.meta deleted file mode 100644 index d44eb14..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_MESSAGE_TYPE.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 057f8962f9a08fe44aa1d89fbfedf0e3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_DATA_BUFFER.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_DATA_BUFFER.cs deleted file mode 100644 index 19d2bbf..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_DATA_BUFFER.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Runtime.InteropServices; - -namespace NAudio.MediaFoundation -{ - /// - /// Contains information about an output buffer for a Media Foundation transform. - /// - [StructLayout(LayoutKind.Sequential)] - public struct MFT_OUTPUT_DATA_BUFFER - { - /// - /// Output stream identifier. - /// - public int dwStreamID; - /// - /// Pointer to the IMFSample interface. - /// - public IMFSample pSample; - /// - /// Before calling ProcessOutput, set this member to zero. - /// - public _MFT_OUTPUT_DATA_BUFFER_FLAGS dwStatus; - /// - /// Before calling ProcessOutput, set this member to NULL. - /// - public IMFCollection pEvents; - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_DATA_BUFFER.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_DATA_BUFFER.cs.meta deleted file mode 100644 index f89deda..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_DATA_BUFFER.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ba0fcf7ef931a4e4f902b5ca629c4e9b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_STREAM_INFO.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_STREAM_INFO.cs deleted file mode 100644 index 1bec26f..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_STREAM_INFO.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Runtime.InteropServices; - -namespace NAudio.MediaFoundation -{ - /// - /// Contains information about an output stream on a Media Foundation transform (MFT). - /// - [StructLayout(LayoutKind.Sequential)] - public struct MFT_OUTPUT_STREAM_INFO - { - /// - /// Bitwise OR of zero or more flags from the _MFT_OUTPUT_STREAM_INFO_FLAGS enumeration. - /// - public _MFT_OUTPUT_STREAM_INFO_FLAGS dwFlags; - /// - /// Minimum size of each output buffer, in bytes. - /// - public int cbSize; - /// - /// The memory alignment required for output buffers. - /// - public int cbAlignment; - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_STREAM_INFO.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_STREAM_INFO.cs.meta deleted file mode 100644 index cdbbd79..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_OUTPUT_STREAM_INFO.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eb5481cacecd2f043b30c332879a2a1b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_REGISTER_TYPE_INFO.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_REGISTER_TYPE_INFO.cs deleted file mode 100644 index 6af26e9..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_REGISTER_TYPE_INFO.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.MediaFoundation -{ - /// - /// Contains media type information for registering a Media Foundation transform (MFT). - /// - [StructLayout(LayoutKind.Sequential)] - public class MFT_REGISTER_TYPE_INFO - { - /// - /// The major media type. - /// - public Guid guidMajorType; - /// - /// The Media Subtype - /// - public Guid guidSubtype; - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_REGISTER_TYPE_INFO.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_REGISTER_TYPE_INFO.cs.meta deleted file mode 100644 index be01a81..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MFT_REGISTER_TYPE_INFO.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ac2b0f1741579b847baf57052d8f3ce4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MF_SINK_WRITER_STATISTICS.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MF_SINK_WRITER_STATISTICS.cs deleted file mode 100644 index 5f30fb9..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MF_SINK_WRITER_STATISTICS.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; - -namespace NAudio.MediaFoundation -{ - /// - /// Contains statistics about the performance of the sink writer. - /// - [StructLayout(LayoutKind.Sequential)] - public class MF_SINK_WRITER_STATISTICS - { - /// - /// The size of the structure, in bytes. - /// - public int cb; - /// - /// The time stamp of the most recent sample given to the sink writer. - /// - public long llLastTimestampReceived; - /// - /// The time stamp of the most recent sample to be encoded. - /// - public long llLastTimestampEncoded; - /// - /// The time stamp of the most recent sample given to the media sink. - /// - public long llLastTimestampProcessed; - /// - /// The time stamp of the most recent stream tick. - /// - public long llLastStreamTickReceived; - /// - /// The system time of the most recent sample request from the media sink. - /// - public long llLastSinkSampleRequest; - /// - /// The number of samples received. - /// - public long qwNumSamplesReceived; - /// - /// The number of samples encoded. - /// - public long qwNumSamplesEncoded; - /// - /// The number of samples given to the media sink. - /// - public long qwNumSamplesProcessed; - /// - /// The number of stream ticks received. - /// - public long qwNumStreamTicksReceived; - /// - /// The amount of data, in bytes, currently waiting to be processed. - /// - public int dwByteCountQueued; - /// - /// The total amount of data, in bytes, that has been sent to the media sink. - /// - public long qwByteCountProcessed; - /// - /// The number of pending sample requests. - /// - public int dwNumOutstandingSinkSampleRequests; - /// - /// The average rate, in media samples per 100-nanoseconds, at which the application sent samples to the sink writer. - /// - public int dwAverageSampleRateReceived; - /// - /// The average rate, in media samples per 100-nanoseconds, at which the sink writer sent samples to the encoder - /// - public int dwAverageSampleRateEncoded; - /// - /// The average rate, in media samples per 100-nanoseconds, at which the sink writer sent samples to the media sink. - /// - public int dwAverageSampleRateProcessed; - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MF_SINK_WRITER_STATISTICS.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MF_SINK_WRITER_STATISTICS.cs.meta deleted file mode 100644 index fa31336..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MF_SINK_WRITER_STATISTICS.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 13dcdb3a73cec6044b06ab78f7234fe7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaEventType.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaEventType.cs deleted file mode 100644 index da5e401..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaEventType.cs +++ /dev/null @@ -1,437 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.MediaFoundation -{ - /// - /// See mfobjects.h - /// - public enum MediaEventType - { - /// - /// Unknown event type. - /// - MEUnknown = 0, - /// - /// Signals a serious error. - /// - MEError = 1, - /// - /// Custom event type. - /// - MEExtendedType = 2, - /// - /// A non-fatal error occurred during streaming. - /// - MENonFatalError = 3, - // MEGenericV1Anchor = MENonFatalError, - /// - /// Session Unknown - /// - MESessionUnknown = 100, - /// - /// Raised after the IMFMediaSession::SetTopology method completes asynchronously - /// - MESessionTopologySet = 101, - /// - /// Raised by the Media Session when the IMFMediaSession::ClearTopologies method completes asynchronously. - /// - MESessionTopologiesCleared = 102, - /// - /// Raised when the IMFMediaSession::Start method completes asynchronously. - /// - MESessionStarted = 103, - /// - /// Raised when the IMFMediaSession::Pause method completes asynchronously. - /// - MESessionPaused = 104, - /// - /// Raised when the IMFMediaSession::Stop method completes asynchronously. - /// - MESessionStopped = 105, - /// - /// Raised when the IMFMediaSession::Close method completes asynchronously. - /// - MESessionClosed = 106, - /// - /// Raised by the Media Session when it has finished playing the last presentation in the playback queue. - /// - MESessionEnded = 107, - /// - /// Raised by the Media Session when the playback rate changes. - /// - MESessionRateChanged = 108, - /// - /// Raised by the Media Session when it completes a scrubbing request. - /// - MESessionScrubSampleComplete = 109, - /// - /// Raised by the Media Session when the session capabilities change. - /// - MESessionCapabilitiesChanged = 110, - /// - /// Raised by the Media Session when the status of a topology changes. - /// - MESessionTopologyStatus = 111, - /// - /// Raised by the Media Session when a new presentation starts. - /// - MESessionNotifyPresentationTime = 112, - /// - /// Raised by a media source a new presentation is ready. - /// - MENewPresentation = 113, - /// - /// License acquisition is about to begin. - /// - MELicenseAcquisitionStart = 114, - /// - /// License acquisition is complete. - /// - MELicenseAcquisitionCompleted = 115, - /// - /// Individualization is about to begin. - /// - MEIndividualizationStart = 116, - /// - /// Individualization is complete. - /// - MEIndividualizationCompleted = 117, - /// - /// Signals the progress of a content enabler object. - /// - MEEnablerProgress = 118, - /// - /// A content enabler object's action is complete. - /// - MEEnablerCompleted = 119, - /// - /// Raised by a trusted output if an error occurs while enforcing the output policy. - /// - MEPolicyError = 120, - /// - /// Contains status information about the enforcement of an output policy. - /// - MEPolicyReport = 121, - /// - /// A media source started to buffer data. - /// - MEBufferingStarted = 122, - - /// - /// A media source stopped buffering data. - /// - MEBufferingStopped = 123, - - /// - /// The network source started opening a URL. - /// - MEConnectStart = 124, - /// - /// The network source finished opening a URL. - /// - MEConnectEnd = 125, - /// - /// Raised by a media source at the start of a reconnection attempt. - /// - MEReconnectStart = 126, - /// - /// Raised by a media source at the end of a reconnection attempt. - /// - MEReconnectEnd = 127, - /// - /// Raised by the enhanced video renderer (EVR) when it receives a user event from the presenter. - /// - MERendererEvent = 128, - /// - /// Raised by the Media Session when the format changes on a media sink. - /// - MESessionStreamSinkFormatChanged = 129, - //MESessionV1Anchor = MESessionStreamSinkFormatChanged, - /// - /// Source Unknown - /// - MESourceUnknown = 200, - /// - /// Raised when a media source starts without seeking. - /// - MESourceStarted = 201, - /// - /// Raised by a media stream when the source starts without seeking. - /// - MEStreamStarted = 202, - /// - /// Raised when a media source seeks to a new position. - /// - MESourceSeeked = 203, - /// - /// Raised by a media stream after a call to IMFMediaSource::Start causes a seek in the stream. - /// - MEStreamSeeked = 204, - /// - /// Raised by a media source when it starts a new stream. - /// - MENewStream = 205, - /// - /// Raised by a media source when it restarts or seeks a stream that is already active. - /// - MEUpdatedStream = 206, - /// - /// Raised by a media source when the IMFMediaSource::Stop method completes asynchronously. - /// - MESourceStopped = 207, - /// - /// Raised by a media stream when the IMFMediaSource::Stop method completes asynchronously. - /// - MEStreamStopped = 208, - /// - /// Raised by a media source when the IMFMediaSource::Pause method completes asynchronously. - /// - MESourcePaused = 209, - /// - /// Raised by a media stream when the IMFMediaSource::Pause method completes asynchronously. - /// - MEStreamPaused = 210, - /// - /// Raised by a media source when a presentation ends. - /// - MEEndOfPresentation = 211, - /// - /// Raised by a media stream when the stream ends. - /// - MEEndOfStream = 212, - /// - /// Raised when a media stream delivers a new sample. - /// - MEMediaSample = 213, - /// - /// Signals that a media stream does not have data available at a specified time. - /// - MEStreamTick = 214, - /// - /// Raised by a media stream when it starts or stops thinning the stream. - /// - MEStreamThinMode = 215, - /// - /// Raised by a media stream when the media type of the stream changes. - /// - MEStreamFormatChanged = 216, - /// - /// Raised by a media source when the playback rate changes. - /// - MESourceRateChanged = 217, - /// - /// Raised by the sequencer source when a segment is completed and is followed by another segment. - /// - MEEndOfPresentationSegment = 218, - /// - /// Raised by a media source when the source's characteristics change. - /// - MESourceCharacteristicsChanged = 219, - /// - /// Raised by a media source to request a new playback rate. - /// - MESourceRateChangeRequested = 220, - /// - /// Raised by a media source when it updates its metadata. - /// - MESourceMetadataChanged = 221, - /// - /// Raised by the sequencer source when the IMFSequencerSource::UpdateTopology method completes asynchronously. - /// - MESequencerSourceTopologyUpdated = 222, - //MESourceV1Anchor = MESequencerSourceTopologyUpdated, - /// - /// Sink Unknown - /// - MESinkUnknown = 300, - /// - /// Raised by a stream sink when it completes the transition to the running state. - /// - MEStreamSinkStarted = 301, - /// - /// Raised by a stream sink when it completes the transition to the stopped state. - /// - MEStreamSinkStopped = 302, - /// - /// Raised by a stream sink when it completes the transition to the paused state. - /// - MEStreamSinkPaused = 303, - /// - /// Raised by a stream sink when the rate has changed. - /// - MEStreamSinkRateChanged = 304, - /// - /// Raised by a stream sink to request a new media sample from the pipeline. - /// - MEStreamSinkRequestSample = 305, - /// - /// Raised by a stream sink after the IMFStreamSink::PlaceMarker method is called. - /// - MEStreamSinkMarker = 306, - /// - /// Raised by a stream sink when the stream has received enough preroll data to begin rendering. - /// - MEStreamSinkPrerolled = 307, - /// - /// Raised by a stream sink when it completes a scrubbing request. - /// - MEStreamSinkScrubSampleComplete = 308, - /// - /// Raised by a stream sink when the sink's media type is no longer valid. - /// - MEStreamSinkFormatChanged = 309, - /// - /// Raised by the stream sinks of the EVR if the video device changes. - /// - MEStreamSinkDeviceChanged = 310, - /// - /// Provides feedback about playback quality to the quality manager. - /// - MEQualityNotify = 311, - /// - /// Raised when a media sink becomes invalid. - /// - MESinkInvalidated = 312, - - /// - /// The audio session display name changed. - /// - MEAudioSessionNameChanged = 313, - - /// - /// The volume or mute state of the audio session changed - /// - MEAudioSessionVolumeChanged = 314, - - /// - /// The audio device was removed. - /// - MEAudioSessionDeviceRemoved = 315, - - /// - /// The Windows audio server system was shut down. - /// - MEAudioSessionServerShutdown = 316, - - /// - /// The grouping parameters changed for the audio session. - /// - MEAudioSessionGroupingParamChanged = 317, - - /// - /// The audio session icon changed. - /// - MEAudioSessionIconChanged = 318, - - /// - /// The default audio format for the audio device changed. - /// - MEAudioSessionFormatChanged = 319, - - /// - /// The audio session was disconnected from a Windows Terminal Services session - /// - MEAudioSessionDisconnected = 320, - - /// - /// The audio session was preempted by an exclusive-mode connection. - /// - MEAudioSessionExclusiveModeOverride = 321, - //MESinkV1Anchor = MEAudioSessionExclusiveModeOverride, - /// - /// Trust Unknown - /// - METrustUnknown = 400, - /// - /// The output policy for a stream changed. - /// - MEPolicyChanged = 401, - /// - /// Content protection message - /// - MEContentProtectionMessage = 402, - /// - /// The IMFOutputTrustAuthority::SetPolicy method completed. - /// - MEPolicySet = 403, - //METrustV1Anchor = MEPolicySet, - /// - /// DRM License Backup Completed - /// - MEWMDRMLicenseBackupCompleted = 500, - /// - /// DRM License Backup Progress - /// - MEWMDRMLicenseBackupProgress = 501, - /// - /// DRM License Restore Completed - /// - MEWMDRMLicenseRestoreCompleted = 502, - /// - /// DRM License Restore Progress - /// - MEWMDRMLicenseRestoreProgress = 503, - /// - /// DRM License Acquisition Completed - /// - MEWMDRMLicenseAcquisitionCompleted = 506, - /// - /// DRM Individualization Completed - /// - MEWMDRMIndividualizationCompleted = 508, - /// - /// DRM Individualization Progress - /// - MEWMDRMIndividualizationProgress = 513, - /// - /// DRM Proximity Completed - /// - MEWMDRMProximityCompleted = 514, - /// - /// DRM License Store Cleaned - /// - MEWMDRMLicenseStoreCleaned = 515, - /// - /// DRM Revocation Download Completed - /// - MEWMDRMRevocationDownloadCompleted = 516, - //MEWMDRMV1Anchor = MEWMDRMRevocationDownloadCompleted, - /// - /// Transform Unknown - /// - METransformUnknown = 600, - /// - /// Sent by an asynchronous MFT to request a new input sample. - /// - METransformNeedInput = (METransformUnknown + 1), - /// - /// Sent by an asynchronous MFT when new output data is available from the MFT. - /// - METransformHaveOutput = (METransformNeedInput + 1), - /// - /// Sent by an asynchronous Media Foundation transform (MFT) when a drain operation is complete. - /// - METransformDrainComplete = (METransformHaveOutput + 1), - /// - /// Sent by an asynchronous MFT in response to an MFT_MESSAGE_COMMAND_MARKER message. - /// - METransformMarker = (METransformDrainComplete + 1), - //MEReservedMax = 10000 - } -} - - -/* - -MECaptureAudioSessionDeviceRemoved The device was removed. -MECaptureAudioSessionDisconnected The audio session is disconnected because the user logged off from a Windows Terminal Services (WTS) session. -MECaptureAudioSessionExclusiveModeOverride The user opened an audio stream in exclusive mode. -MECaptureAudioSessionFormatChanged The audio format changed. -MECaptureAudioSessionServerShutdown The audio session server shutdown. -MECaptureAudioSessionVolumeChanged The volume changed. -MEContentProtectionMessage The configuration changed for an output protection scheme. -MEVideoCaptureDevicePreempted The device has been preempted. -MEVideoCaptureDeviceRemoved The device has been removed. -}*/ diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaEventType.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaEventType.cs.meta deleted file mode 100644 index 8ee4634..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaEventType.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2f38b3887732b124a82ffa0f480dfd93 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationAttributes.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationAttributes.cs deleted file mode 100644 index a756ad6..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationAttributes.cs +++ /dev/null @@ -1,286 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.MediaFoundation -{ - /// - /// Media Foundation attribute guids - /// http://msdn.microsoft.com/en-us/library/windows/desktop/ms696989%28v=vs.85%29.aspx - /// - public static class MediaFoundationAttributes - { - /// - /// Specifies whether an MFT performs asynchronous processing. - /// - public static readonly Guid MF_TRANSFORM_ASYNC = new Guid("f81a699a-649a-497d-8c73-29f8fed6ad7a"); - - /// - /// Enables the use of an asynchronous MFT. - /// - public static readonly Guid MF_TRANSFORM_ASYNC_UNLOCK = new Guid("e5666d6b-3422-4eb6-a421-da7db1f8e207"); - - /// - /// Contains flags for an MFT activation object. - /// - [FieldDescription("Transform Flags")] - public static readonly Guid MF_TRANSFORM_FLAGS_Attribute = new Guid("9359bb7e-6275-46c4-a025-1c01e45f1a86"); - - /// - /// Specifies the category for an MFT. - /// - [FieldDescription("Transform Category")] - public static readonly Guid MF_TRANSFORM_CATEGORY_Attribute = new Guid("ceabba49-506d-4757-a6ff-66c184987e4e"); - - /// - /// Contains the class identifier (CLSID) of an MFT. - /// - [FieldDescription("Class identifier")] - public static readonly Guid MFT_TRANSFORM_CLSID_Attribute = new Guid("6821c42b-65a4-4e82-99bc-9a88205ecd0c"); - - /// - /// Contains the registered input types for a Media Foundation transform (MFT). - /// - [FieldDescription("Input Types")] - public static readonly Guid MFT_INPUT_TYPES_Attributes = new Guid("4276c9b1-759d-4bf3-9cd0-0d723d138f96"); - - /// - /// Contains the registered output types for a Media Foundation transform (MFT). - /// - [FieldDescription("Output Types")] - public static readonly Guid MFT_OUTPUT_TYPES_Attributes = new Guid("8eae8cf3-a44f-4306-ba5c-bf5dda242818"); - - /// - /// Contains the symbolic link for a hardware-based MFT. - /// - public static readonly Guid MFT_ENUM_HARDWARE_URL_Attribute = new Guid("2fb866ac-b078-4942-ab6c-003d05cda674"); - - /// - /// Contains the display name for a hardware-based MFT. - /// - [FieldDescription("Name")] - public static readonly Guid MFT_FRIENDLY_NAME_Attribute = new Guid("314ffbae-5b41-4c95-9c19-4e7d586face3"); - - /// - /// Contains a pointer to the stream attributes of the connected stream on a hardware-based MFT. - /// - public static readonly Guid MFT_CONNECTED_STREAM_ATTRIBUTE = new Guid("71eeb820-a59f-4de2-bcec-38db1dd611a4"); - - /// - /// Specifies whether a hardware-based MFT is connected to another hardware-based MFT. - /// - public static readonly Guid MFT_CONNECTED_TO_HW_STREAM = new Guid("34e6e728-06d6-4491-a553-4795650db912"); - - /// - /// Specifies the preferred output format for an encoder. - /// - [FieldDescription("Preferred Output Format")] - public static readonly Guid MFT_PREFERRED_OUTPUTTYPE_Attribute = new Guid("7e700499-396a-49ee-b1b4-f628021e8c9d"); - - /// - /// Specifies whether an MFT is registered only in the application's process. - /// - public static readonly Guid MFT_PROCESS_LOCAL_Attribute = new Guid("543186e4-4649-4e65-b588-4aa352aff379"); - - /// - /// Contains configuration properties for an encoder. - /// - public static readonly Guid MFT_PREFERRED_ENCODER_PROFILE = new Guid("53004909-1ef5-46d7-a18e-5a75f8b5905f"); - - /// - /// Specifies whether a hardware device source uses the system time for time stamps. - /// - public static readonly Guid MFT_HW_TIMESTAMP_WITH_QPC_Attribute = new Guid("8d030fb8-cc43-4258-a22e-9210bef89be4"); - - /// - /// Contains an IMFFieldOfUseMFTUnlock pointer, which can be used to unlock the MFT. - /// - public static readonly Guid MFT_FIELDOFUSE_UNLOCK_Attribute = new Guid("8ec2e9fd-9148-410d-831e-702439461a8e"); - - /// - /// Contains the merit value of a hardware codec. - /// - public static readonly Guid MFT_CODEC_MERIT_Attribute = new Guid("88a7cb15-7b07-4a34-9128-e64c6703c4d3"); - - /// - /// Specifies whether a decoder is optimized for transcoding rather than for playback. - /// - public static readonly Guid MFT_ENUM_TRANSCODE_ONLY_ATTRIBUTE = new Guid("111ea8cd-b62a-4bdb-89f6-67ffcdc2458b"); - - // Presentation descriptor attributes: - // http://msdn.microsoft.com/en-gb/library/windows/desktop/aa367736%28v=vs.85%29.aspx - - /// - /// Contains a pointer to the proxy object for the application's presentation descriptor. - /// - [FieldDescription("PMP Host Context")] - public static readonly Guid MF_PD_PMPHOST_CONTEXT = new Guid("6c990d31-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// Contains a pointer to the presentation descriptor from the protected media path (PMP). - /// - [FieldDescription("App Context")] - public static readonly Guid MF_PD_APP_CONTEXT = new Guid("6c990d32-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// Specifies the duration of a presentation, in 100-nanosecond units. - /// - [FieldDescription("Duration")] - public static readonly Guid MF_PD_DURATION = new Guid("6c990d33-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// Specifies the total size of the source file, in bytes. - /// - [FieldDescription("Total File Size")] - public static readonly Guid MF_PD_TOTAL_FILE_SIZE = new Guid("6c990d34-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// Specifies the audio encoding bit rate for the presentation, in bits per second. - /// - [FieldDescription("Audio encoding bitrate")] - public static readonly Guid MF_PD_AUDIO_ENCODING_BITRATE = new Guid("6c990d35-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// Specifies the video encoding bit rate for the presentation, in bits per second. - /// - [FieldDescription("Video Encoding Bitrate")] - public static readonly Guid MF_PD_VIDEO_ENCODING_BITRATE = new Guid("6c990d36-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// Specifies the MIME type of the content. - /// - [FieldDescription("MIME Type")] - public static readonly Guid MF_PD_MIME_TYPE = new Guid("6c990d37-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// Specifies when a presentation was last modified. - /// - [FieldDescription("Last Modified Time")] - public static readonly Guid MF_PD_LAST_MODIFIED_TIME = new Guid("6c990d38-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// The identifier of the playlist element in the presentation. - /// - [FieldDescription("Element ID")] - public static readonly Guid MF_PD_PLAYBACK_ELEMENT_ID = new Guid("6c990d39-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// Contains the preferred RFC 1766 language of the media source. - /// - [FieldDescription("Preferred Language")] - public static readonly Guid MF_PD_PREFERRED_LANGUAGE = new Guid("6c990d3a-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// The time at which the presentation must begin, relative to the start of the media source. - /// - [FieldDescription("Playback boundary time")] - public static readonly Guid MF_PD_PLAYBACK_BOUNDARY_TIME = new Guid("6c990d3b-bb8e-477a-8598-0d5d96fcd88a"); - - /// - /// Specifies whether the audio streams in the presentation have a variable bit rate. - /// - [FieldDescription("Audio is variable bitrate")] - public static readonly Guid MF_PD_AUDIO_ISVARIABLEBITRATE = new Guid("33026ee0-e387-4582-ae0a-34a2ad3baa18"); - - /// - /// Media type Major Type - /// - [FieldDescription("Major Media Type")] - public static readonly Guid MF_MT_MAJOR_TYPE = new Guid("48eba18e-f8c9-4687-bf11-0a74c9f96a8f"); - /// - /// Media Type subtype - /// - [FieldDescription("Media Subtype")] - public static readonly Guid MF_MT_SUBTYPE = new Guid("f7e34c9a-42e8-4714-b74b-cb29d72c35e5"); - /// - /// Audio block alignment - /// - [FieldDescription("Audio block alignment")] - public static readonly Guid MF_MT_AUDIO_BLOCK_ALIGNMENT = new Guid("322de230-9eeb-43bd-ab7a-ff412251541d"); - /// - /// Audio average bytes per second - /// - [FieldDescription("Audio average bytes per second")] - public static readonly Guid MF_MT_AUDIO_AVG_BYTES_PER_SECOND = new Guid("1aab75c8-cfef-451c-ab95-ac034b8e1731"); - /// - /// Audio number of channels - /// - [FieldDescription("Audio number of channels")] - public static readonly Guid MF_MT_AUDIO_NUM_CHANNELS = new Guid("37e48bf5-645e-4c5b-89de-ada9e29b696a"); - /// - /// Audio samples per second - /// - [FieldDescription("Audio samples per second")] - public static readonly Guid MF_MT_AUDIO_SAMPLES_PER_SECOND = new Guid("5faeeae7-0290-4c31-9e8a-c534f68d9dba"); - /// - /// Audio bits per sample - /// - [FieldDescription("Audio bits per sample")] - public static readonly Guid MF_MT_AUDIO_BITS_PER_SAMPLE = new Guid("f2deb57f-40fa-4764-aa33-ed4f2d1ff669"); - - /// - /// Enables the source reader or sink writer to use hardware-based Media Foundation transforms (MFTs). - /// - [FieldDescription("Enable Hardware Transforms")] - public static readonly Guid MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS = new Guid("a634a91c-822b-41b9-a494-4de4643612b0"); - - /// - /// Contains additional format data for a media type. - /// - [FieldDescription("User data")] - public static readonly Guid MF_MT_USER_DATA = new Guid("b6bc765f-4c3b-40a4-bd51-2535b66fe09d"); - - /// - /// Specifies for a media type whether each sample is independent of the other samples in the stream. - /// - [FieldDescription("All samples independent")] - public static readonly Guid MF_MT_ALL_SAMPLES_INDEPENDENT = new Guid("c9173739-5e56-461c-b713-46fb995cb95f"); - - /// - /// Specifies for a media type whether the samples have a fixed size. - /// - [FieldDescription("Fixed size samples")] - public static readonly Guid MF_MT_FIXED_SIZE_SAMPLES = new Guid("b8ebefaf-b718-4e04-b0a9-116775e3321b"); - - /// - /// Contains a DirectShow format GUID for a media type. - /// - [FieldDescription("DirectShow Format Guid")] - public static readonly Guid MF_MT_AM_FORMAT_TYPE = new Guid("73d1072d-1870-4174-a063-29ff4ff6c11e"); - - /// - /// Specifies the preferred legacy format structure to use when converting an audio media type. - /// - [FieldDescription("Preferred legacy format structure")] - public static readonly Guid MF_MT_AUDIO_PREFER_WAVEFORMATEX = new Guid("a901aaba-e037-458a-bdf6-545be2074042"); - - /// - /// Specifies for a media type whether the media data is compressed. - /// - [FieldDescription("Is Compressed")] - public static readonly Guid MF_MT_COMPRESSED = new Guid("3afd0cee-18f2-4ba5-a110-8bea502e1f92"); - - /// - /// Approximate data rate of the video stream, in bits per second, for a video media type. - /// - [FieldDescription("Average bitrate")] - public static readonly Guid MF_MT_AVG_BITRATE = new Guid("20332624-fb0d-4d9e-bd0d-cbf6786c102e"); - - /// - /// Specifies the payload type of an Advanced Audio Coding (AAC) stream. - /// 0 - The stream contains raw_data_block elements only - /// 1 - Audio Data Transport Stream (ADTS). The stream contains an adts_sequence, as defined by MPEG-2. - /// 2 - Audio Data Interchange Format (ADIF). The stream contains an adif_sequence, as defined by MPEG-2. - /// 3 - The stream contains an MPEG-4 audio transport stream with a synchronization layer (LOAS) and a multiplex layer (LATM). - /// - [FieldDescription("AAC payload type")] - public static readonly Guid MF_MT_AAC_PAYLOAD_TYPE = new Guid("bfbabe79-7434-4d1c-94f0-72a3b9e17188"); - - /// - /// Specifies the audio profile and level of an Advanced Audio Coding (AAC) stream, as defined by ISO/IEC 14496-3. - /// - [FieldDescription("AAC Audio Profile Level Indication")] - public static readonly Guid MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION = new Guid("7632f0e6-9538-4d61-acda-ea29c8c14456"); - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationAttributes.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationAttributes.cs.meta deleted file mode 100644 index 29f45c8..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationAttributes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f796a803e8d56aa4ea723c496d3cdc16 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationErrors.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationErrors.cs deleted file mode 100644 index 3ea5455..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationErrors.cs +++ /dev/null @@ -1,2764 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.MediaFoundation -{ - // from mferror.h - /// - /// Media Foundation Errors - /// - /// - /// - /// RANGES - /// 14000 - 14999 = General Media Foundation errors - /// 15000 - 15999 = ASF parsing errors - /// 16000 - 16999 = Media Source errors - /// 17000 - 17999 = MEDIAFOUNDATION Network Error Events - /// 18000 - 18999 = MEDIAFOUNDATION WMContainer Error Events - /// 19000 - 19999 = MEDIAFOUNDATION Media Sink Error Events - /// 20000 - 20999 = Renderer errors - /// 21000 - 21999 = Topology Errors - /// 25000 - 25999 = Timeline Errors - /// 26000 - 26999 = Unused - /// 28000 - 28999 = Transform errors - /// 29000 - 29999 = Content Protection errors - /// 40000 - 40999 = Clock errors - /// 41000 - 41999 = MF Quality Management Errors - /// 42000 - 42999 = MF Transcode API Errors - /// - public static class MediaFoundationErrors - { - #region General Media Foundation errors - /// - /// MessageId: MF_E_PLATFORM_NOT_INITIALIZED - /// - /// MessageText: - /// - /// Platform not initialized. Please call MFStartup().%0 - /// - public const int MF_E_PLATFORM_NOT_INITIALIZED = unchecked((int) 0xC00D36B0); - - /// - /// MessageId: MF_E_BUFFERTOOSMALL - /// - /// MessageText: - /// - /// The buffer was too small to carry out the requested action.%0 - /// - public const int MF_E_BUFFERTOOSMALL = unchecked((int) 0xC00D36B1); - - /// - /// MessageId: MF_E_INVALIDREQUEST - /// - /// MessageText: - /// - /// The request is invalid in the current state.%0 - /// - public const int MF_E_INVALIDREQUEST = unchecked((int) 0xC00D36B2); - - /// - /// MessageId: MF_E_INVALIDSTREAMNUMBER - /// - /// MessageText: - /// - /// The stream number provided was invalid.%0 - /// - public const int MF_E_INVALIDSTREAMNUMBER = unchecked((int) 0xC00D36B3); - - /// - /// MessageId: MF_E_INVALIDMEDIATYPE - /// - /// MessageText: - /// - /// The data specified for the media type is invalid, inconsistent, or not supported by this object.%0 - /// - public const int MF_E_INVALIDMEDIATYPE = unchecked((int) 0xC00D36B4); - - /// - /// MessageId: MF_E_NOTACCEPTING - /// - /// MessageText: - /// - /// The callee is currently not accepting further input.%0 - /// - public const int MF_E_NOTACCEPTING = unchecked((int) 0xC00D36B5); - - /// - /// MessageId: MF_E_NOT_INITIALIZED - /// - /// MessageText: - /// - /// This object needs to be initialized before the requested operation can be carried out.%0 - /// - public const int MF_E_NOT_INITIALIZED = unchecked((int) 0xC00D36B6); - - /// - /// MessageId: MF_E_UNSUPPORTED_REPRESENTATION - /// - /// MessageText: - /// - /// The requested representation is not supported by this object.%0 - /// - public const int MF_E_UNSUPPORTED_REPRESENTATION = unchecked((int) 0xC00D36B7); - - /// - /// MessageId: MF_E_NO_MORE_TYPES - /// - /// MessageText: - /// - /// An object ran out of media types to suggest therefore the requested chain of streaming objects cannot be completed.%0 - /// - public const int MF_E_NO_MORE_TYPES = unchecked((int) 0xC00D36B9); - - /// - /// MessageId: MF_E_UNSUPPORTED_SERVICE - /// - /// MessageText: - /// - /// The object does not support the specified service.%0 - /// - public const int MF_E_UNSUPPORTED_SERVICE = unchecked((int) 0xC00D36BA); - - /// - /// MessageId: MF_E_UNEXPECTED - /// - /// MessageText: - /// - /// An unexpected error has occurred in the operation requested.%0 - /// - public const int MF_E_UNEXPECTED = unchecked((int) 0xC00D36BB); - - /// - /// MessageId: MF_E_INVALIDNAME - /// - /// MessageText: - /// - /// Invalid name.%0 - /// - public const int MF_E_INVALIDNAME = unchecked((int) 0xC00D36BC); - - /// - /// MessageId: MF_E_INVALIDTYPE - /// - /// MessageText: - /// - /// Invalid type.%0 - /// - public const int MF_E_INVALIDTYPE = unchecked((int) 0xC00D36BD); - - /// - /// MessageId: MF_E_INVALID_FILE_FORMAT - /// - /// MessageText: - /// - /// The file does not conform to the relevant file format specification. - /// - public const int MF_E_INVALID_FILE_FORMAT = unchecked((int) 0xC00D36BE); - - /// - /// MessageId: MF_E_INVALIDINDEX - /// - /// MessageText: - /// - /// Invalid index.%0 - /// - public const int MF_E_INVALIDINDEX = unchecked((int) 0xC00D36BF); - - /// - /// MessageId: MF_E_INVALID_TIMESTAMP - /// - /// MessageText: - /// - /// An invalid timestamp was given.%0 - /// - public const int MF_E_INVALID_TIMESTAMP = unchecked((int) 0xC00D36C0); - - /// - /// MessageId: MF_E_UNSUPPORTED_SCHEME - /// - /// MessageText: - /// - /// The scheme of the given URL is unsupported.%0 - /// - public const int MF_E_UNSUPPORTED_SCHEME = unchecked((int) 0xC00D36C3); - - /// - /// MessageId: MF_E_UNSUPPORTED_BYTESTREAM_TYPE - /// - /// MessageText: - /// - /// The byte stream type of the given URL is unsupported.%0 - /// - public const int MF_E_UNSUPPORTED_BYTESTREAM_TYPE = unchecked((int) 0xC00D36C4); - - /// - /// MessageId: MF_E_UNSUPPORTED_TIME_FORMAT - /// - /// MessageText: - /// - /// The given time format is unsupported.%0 - /// - public const int MF_E_UNSUPPORTED_TIME_FORMAT = unchecked((int) 0xC00D36C5); - - /// - /// MessageId: MF_E_NO_SAMPLE_TIMESTAMP - /// - /// MessageText: - /// - /// The Media Sample does not have a timestamp.%0 - /// - public const int MF_E_NO_SAMPLE_TIMESTAMP = unchecked((int) 0xC00D36C8); - - /// - /// MessageId: MF_E_NO_SAMPLE_DURATION - /// - /// MessageText: - /// - /// The Media Sample does not have a duration.%0 - /// - public const int MF_E_NO_SAMPLE_DURATION = unchecked((int) 0xC00D36C9); - - /// - /// MessageId: MF_E_INVALID_STREAM_DATA - /// - /// MessageText: - /// - /// The request failed because the data in the stream is corrupt.%0\n. - /// - public const int MF_E_INVALID_STREAM_DATA = unchecked((int) 0xC00D36CB); - - /// - /// MessageId: MF_E_RT_UNAVAILABLE - /// - /// MessageText: - /// - /// Real time services are not available.%0 - /// - public const int MF_E_RT_UNAVAILABLE = unchecked((int) 0xC00D36CF); - - /// - /// MessageId: MF_E_UNSUPPORTED_RATE - /// - /// MessageText: - /// - /// The specified rate is not supported.%0 - /// - public const int MF_E_UNSUPPORTED_RATE = unchecked((int) 0xC00D36D0); - - /// - /// MessageId: MF_E_THINNING_UNSUPPORTED - /// - /// MessageText: - /// - /// This component does not support stream-thinning.%0 - /// - public const int MF_E_THINNING_UNSUPPORTED = unchecked((int) 0xC00D36D1); - - /// - /// MessageId: MF_E_REVERSE_UNSUPPORTED - /// - /// MessageText: - /// - /// The call failed because no reverse playback rates are available.%0 - /// - public const int MF_E_REVERSE_UNSUPPORTED = unchecked((int) 0xC00D36D2); - - /// - /// MessageId: MF_E_UNSUPPORTED_RATE_TRANSITION - /// - /// MessageText: - /// - /// The requested rate transition cannot occur in the current state.%0 - /// - public const int MF_E_UNSUPPORTED_RATE_TRANSITION = unchecked((int) 0xC00D36D3); - - /// - /// MessageId: MF_E_RATE_CHANGE_PREEMPTED - /// - /// MessageText: - /// - /// The requested rate change has been pre-empted and will not occur.%0 - /// - public const int MF_E_RATE_CHANGE_PREEMPTED = unchecked((int) 0xC00D36D4); - - /// - /// MessageId: MF_E_NOT_FOUND - /// - /// MessageText: - /// - /// The specified object or value does not exist.%0 - /// - public const int MF_E_NOT_FOUND = unchecked((int) 0xC00D36D5); - - /// - /// MessageId: MF_E_NOT_AVAILABLE - /// - /// MessageText: - /// - /// The requested value is not available.%0 - /// - public const int MF_E_NOT_AVAILABLE = unchecked((int) 0xC00D36D6); - - /// - /// MessageId: MF_E_NO_CLOCK - /// - /// MessageText: - /// - /// The specified operation requires a clock and no clock is available.%0 - /// - public const int MF_E_NO_CLOCK = unchecked((int) 0xC00D36D7); - - /// - /// MessageId: MF_S_MULTIPLE_BEGIN - /// - /// MessageText: - /// - /// This callback and state had already been passed in to this event generator earlier.%0 - /// - public const int MF_S_MULTIPLE_BEGIN = unchecked((int) 0x000D36D8); - - /// - /// MessageId: MF_E_MULTIPLE_BEGIN - /// - /// MessageText: - /// - /// This callback has already been passed in to this event generator.%0 - /// - public const int MF_E_MULTIPLE_BEGIN = unchecked((int) 0xC00D36D9); - - /// - /// MessageId: MF_E_MULTIPLE_SUBSCRIBERS - /// - /// MessageText: - /// - /// Some component is already listening to events on this event generator.%0 - /// - public const int MF_E_MULTIPLE_SUBSCRIBERS = unchecked((int) 0xC00D36DA); - - /// - /// MessageId: MF_E_TIMER_ORPHANED - /// - /// MessageText: - /// - /// This timer was orphaned before its callback time arrived.%0 - /// - public const int MF_E_TIMER_ORPHANED = unchecked((int) 0xC00D36DB); - - /// - /// MessageId: MF_E_STATE_TRANSITION_PENDING - /// - /// MessageText: - /// - /// A state transition is already pending.%0 - /// - public const int MF_E_STATE_TRANSITION_PENDING = unchecked((int) 0xC00D36DC); - - /// - /// MessageId: MF_E_UNSUPPORTED_STATE_TRANSITION - /// - /// MessageText: - /// - /// The requested state transition is unsupported.%0 - /// - public const int MF_E_UNSUPPORTED_STATE_TRANSITION = unchecked((int) 0xC00D36DD); - - /// - /// MessageId: MF_E_UNRECOVERABLE_ERROR_OCCURRED - /// - /// MessageText: - /// - /// An unrecoverable error has occurred.%0 - /// - public const int MF_E_UNRECOVERABLE_ERROR_OCCURRED = unchecked((int) 0xC00D36DE); - - /// - /// MessageId: MF_E_SAMPLE_HAS_TOO_MANY_BUFFERS - /// - /// MessageText: - /// - /// The provided sample has too many buffers.%0 - /// - public const int MF_E_SAMPLE_HAS_TOO_MANY_BUFFERS = unchecked((int) 0xC00D36DF); - - /// - /// MessageId: MF_E_SAMPLE_NOT_WRITABLE - /// - /// MessageText: - /// - /// The provided sample is not writable.%0 - /// - public const int MF_E_SAMPLE_NOT_WRITABLE = unchecked((int) 0xC00D36E0); - - /// - /// MessageId: MF_E_INVALID_KEY - /// - /// MessageText: - /// - /// The specified key is not valid. - /// - public const int MF_E_INVALID_KEY = unchecked((int) 0xC00D36E2); - - /// - /// MessageId: MF_E_BAD_STARTUP_VERSION - /// - /// MessageText: - /// - /// You are calling MFStartup with the wrong MF_VERSION. Mismatched bits? - /// - public const int MF_E_BAD_STARTUP_VERSION = unchecked((int) 0xC00D36E3); - - /// - /// MessageId: MF_E_UNSUPPORTED_CAPTION - /// - /// MessageText: - /// - /// The caption of the given URL is unsupported.%0 - /// - public const int MF_E_UNSUPPORTED_CAPTION = unchecked((int) 0xC00D36E4); - - /// - /// MessageId: MF_E_INVALID_POSITION - /// - /// MessageText: - /// - /// The operation on the current offset is not permitted.%0 - /// - public const int MF_E_INVALID_POSITION = unchecked((int) 0xC00D36E5); - - /// - /// MessageId: MF_E_ATTRIBUTENOTFOUND - /// - /// MessageText: - /// - /// The requested attribute was not found.%0 - /// - public const int MF_E_ATTRIBUTENOTFOUND = unchecked((int) 0xC00D36E6); - - /// - /// MessageId: MF_E_PROPERTY_TYPE_NOT_ALLOWED - /// - /// MessageText: - /// - /// The specified property type is not allowed in this context.%0 - /// - public const int MF_E_PROPERTY_TYPE_NOT_ALLOWED = unchecked((int) 0xC00D36E7); - - /// - /// MessageId: MF_E_PROPERTY_TYPE_NOT_SUPPORTED - /// - /// MessageText: - /// - /// The specified property type is not supported.%0 - /// - public const int MF_E_PROPERTY_TYPE_NOT_SUPPORTED = unchecked((int) 0xC00D36E8); - - /// - /// MessageId: MF_E_PROPERTY_EMPTY - /// - /// MessageText: - /// - /// The specified property is empty.%0 - /// - public const int MF_E_PROPERTY_EMPTY = unchecked((int) 0xC00D36E9); - - /// - /// MessageId: MF_E_PROPERTY_NOT_EMPTY - /// - /// MessageText: - /// - /// The specified property is not empty.%0 - /// - public const int MF_E_PROPERTY_NOT_EMPTY = unchecked((int) 0xC00D36EA); - - /// - /// MessageId: MF_E_PROPERTY_VECTOR_NOT_ALLOWED - /// - /// MessageText: - /// - /// The vector property specified is not allowed in this context.%0 - /// - public const int MF_E_PROPERTY_VECTOR_NOT_ALLOWED = unchecked((int) 0xC00D36EB); - - /// - /// MessageId: MF_E_PROPERTY_VECTOR_REQUIRED - /// - /// MessageText: - /// - /// A vector property is required in this context.%0 - /// - public const int MF_E_PROPERTY_VECTOR_REQUIRED = unchecked((int) 0xC00D36EC); - - /// - /// MessageId: MF_E_OPERATION_CANCELLED - /// - /// MessageText: - /// - /// The operation is cancelled.%0 - /// - public const int MF_E_OPERATION_CANCELLED = unchecked((int) 0xC00D36ED); - - /// - /// MessageId: MF_E_BYTESTREAM_NOT_SEEKABLE - /// - /// MessageText: - /// - /// The provided bytestream was expected to be seekable and it is not.%0 - /// - public const int MF_E_BYTESTREAM_NOT_SEEKABLE = unchecked((int) 0xC00D36EE); - - /// - /// MessageId: MF_E_DISABLED_IN_SAFEMODE - /// - /// MessageText: - /// - /// The Media Foundation platform is disabled when the system is running in Safe Mode.%0 - /// - public const int MF_E_DISABLED_IN_SAFEMODE = unchecked((int) 0xC00D36EF); - - /// - /// MessageId: MF_E_CANNOT_PARSE_BYTESTREAM - /// - /// MessageText: - /// - /// The Media Source could not parse the byte stream.%0 - /// - public const int MF_E_CANNOT_PARSE_BYTESTREAM = unchecked((int) 0xC00D36F0); - - /// - /// MessageId: MF_E_SOURCERESOLVER_MUTUALLY_EXCLUSIVE_FLAGS - /// - /// MessageText: - /// - /// Mutually exclusive flags have been specified to source resolver. This flag combination is invalid.%0 - /// - public const int MF_E_SOURCERESOLVER_MUTUALLY_EXCLUSIVE_FLAGS = unchecked((int) 0xC00D36F1); - - /// - /// MessageId: MF_E_MEDIAPROC_WRONGSTATE - /// - /// MessageText: - /// - /// MediaProc is in the wrong state%0 - /// - public const int MF_E_MEDIAPROC_WRONGSTATE = unchecked((int) 0xC00D36F2); - - /// - /// MessageId: MF_E_RT_THROUGHPUT_NOT_AVAILABLE - /// - /// MessageText: - /// - /// Real time I/O service can not provide requested throughput.%0 - /// - public const int MF_E_RT_THROUGHPUT_NOT_AVAILABLE = unchecked((int) 0xC00D36F3); - - /// - /// MessageId: MF_E_RT_TOO_MANY_CLASSES - /// - /// MessageText: - /// - /// The workqueue cannot be registered with more classes.%0 - /// - public const int MF_E_RT_TOO_MANY_CLASSES = unchecked((int) 0xC00D36F4); - - /// - /// MessageId: MF_E_RT_WOULDBLOCK - /// - /// MessageText: - /// - /// This operation cannot succeed because another thread owns this object.%0 - /// - public const int MF_E_RT_WOULDBLOCK = unchecked((int) 0xC00D36F5); - - /// - /// MessageId: MF_E_NO_BITPUMP - /// - /// MessageText: - /// - /// Internal. Bitpump not found.%0 - /// - public const int MF_E_NO_BITPUMP = unchecked((int) 0xC00D36F6); - - /// - /// MessageId: MF_E_RT_OUTOFMEMORY - /// - /// MessageText: - /// - /// No more RT memory available.%0 - /// - public const int MF_E_RT_OUTOFMEMORY = unchecked((int) 0xC00D36F7); - - /// - /// MessageId: MF_E_RT_WORKQUEUE_CLASS_NOT_SPECIFIED - /// - /// MessageText: - /// - /// An MMCSS class has not been set for this work queue.%0 - /// - public const int MF_E_RT_WORKQUEUE_CLASS_NOT_SPECIFIED = unchecked((int) 0xC00D36F8); - - /// - /// MessageId: MF_E_INSUFFICIENT_BUFFER - /// - /// MessageText: - /// - /// Insufficient memory for response.%0 - /// - public const int MF_E_INSUFFICIENT_BUFFER = unchecked((int) 0xC00D7170); - - /// - /// MessageId: MF_E_CANNOT_CREATE_SINK - /// - /// MessageText: - /// - /// Activate failed to create mediasink. Call OutputNode::GetUINT32(MF_TOPONODE_MAJORTYPE) for more information. %0 - /// - public const int MF_E_CANNOT_CREATE_SINK = unchecked((int) 0xC00D36FA); - - /// - /// MessageId: MF_E_BYTESTREAM_UNKNOWN_LENGTH - /// - /// MessageText: - /// - /// The length of the provided bytestream is unknown.%0 - /// - public const int MF_E_BYTESTREAM_UNKNOWN_LENGTH = unchecked((int) 0xC00D36FB); - - /// - /// MessageId: MF_E_SESSION_PAUSEWHILESTOPPED - /// - /// MessageText: - /// - /// The media session cannot pause from a stopped state.%0 - /// - public const int MF_E_SESSION_PAUSEWHILESTOPPED = unchecked((int) 0xC00D36FC); - - /// - /// MessageId: MF_S_ACTIVATE_REPLACED - /// - /// MessageText: - /// - /// The activate could not be created in the remote process for some reason it was replaced with empty one.%0 - /// - public const int MF_S_ACTIVATE_REPLACED = unchecked((int) 0x000D36FD); - - /// - /// MessageId: MF_E_FORMAT_CHANGE_NOT_SUPPORTED - /// - /// MessageText: - /// - /// The data specified for the media type is supported, but would require a format change, which is not supported by this object.%0 - /// - public const int MF_E_FORMAT_CHANGE_NOT_SUPPORTED = unchecked((int) 0xC00D36FE); - - /// - /// MessageId: MF_E_INVALID_WORKQUEUE - /// - /// MessageText: - /// - /// The operation failed because an invalid combination of workqueue ID and flags was specified.%0 - /// - public const int MF_E_INVALID_WORKQUEUE = unchecked((int) 0xC00D36FF); - - /// - /// MessageId: MF_E_DRM_UNSUPPORTED - /// - /// MessageText: - /// - /// No DRM support is available.%0 - /// - public const int MF_E_DRM_UNSUPPORTED = unchecked((int) 0xC00D3700); - - /// - /// MessageId: MF_E_UNAUTHORIZED - /// - /// MessageText: - /// - /// This operation is not authorized.%0 - /// - public const int MF_E_UNAUTHORIZED = unchecked((int) 0xC00D3701); - - /// - /// MessageId: MF_E_OUT_OF_RANGE - /// - /// MessageText: - /// - /// The value is not in the specified or valid range.%0 - /// - public const int MF_E_OUT_OF_RANGE = unchecked((int) 0xC00D3702); - - /// - /// MessageId: MF_E_INVALID_CODEC_MERIT - /// - /// MessageText: - /// - /// The registered codec merit is not valid.%0 - /// - public const int MF_E_INVALID_CODEC_MERIT = unchecked((int) 0xC00D3703); - - /// - /// MessageId: MF_E_HW_MFT_FAILED_START_STREAMING - /// - /// MessageText: - /// - /// Hardware MFT failed to start streaming due to lack of hardware resources.%0 - /// - public const int MF_E_HW_MFT_FAILED_START_STREAMING = unchecked((int) 0xC00D3704); - - #endregion - #region MEDIAFOUNDATION ASF Parsing Informational Events - - /// - /// MessageId: MF_S_ASF_PARSEINPROGRESS - /// - /// MessageText: - /// - /// Parsing is still in progress and is not yet complete.%0 - /// - public const int MF_S_ASF_PARSEINPROGRESS = unchecked((int) 0x400D3A98); - #endregion - - #region MEDIAFOUNDATION ASF Parsing Error Events - - /// - /// MessageId: MF_E_ASF_PARSINGINCOMPLETE - /// - /// MessageText: - /// - /// Not enough data have been parsed to carry out the requested action.%0 - /// - public const int MF_E_ASF_PARSINGINCOMPLETE = unchecked((int) 0xC00D3A98); - - /// - /// MessageId: MF_E_ASF_MISSINGDATA - /// - /// MessageText: - /// - /// There is a gap in the ASF data provided.%0 - /// - public const int MF_E_ASF_MISSINGDATA = unchecked((int) 0xC00D3A99); - - /// - /// MessageId: MF_E_ASF_INVALIDDATA - /// - /// MessageText: - /// - /// The data provided are not valid ASF.%0 - /// - public const int MF_E_ASF_INVALIDDATA = unchecked((int) 0xC00D3A9A); - - /// - /// MessageId: MF_E_ASF_OPAQUEPACKET - /// - /// MessageText: - /// - /// The packet is opaque, so the requested information cannot be returned.%0 - /// - public const int MF_E_ASF_OPAQUEPACKET = unchecked((int) 0xC00D3A9B); - - /// - /// MessageId: MF_E_ASF_NOINDEX - /// - /// MessageText: - /// - /// The requested operation failed since there is no appropriate ASF index.%0 - /// - public const int MF_E_ASF_NOINDEX = unchecked((int) 0xC00D3A9C); - - /// - /// MessageId: MF_E_ASF_OUTOFRANGE - /// - /// MessageText: - /// - /// The value supplied is out of range for this operation.%0 - /// - public const int MF_E_ASF_OUTOFRANGE = unchecked((int) 0xC00D3A9D); - - /// - /// MessageId: MF_E_ASF_INDEXNOTLOADED - /// - /// MessageText: - /// - /// The index entry requested needs to be loaded before it can be available.%0 - /// - public const int MF_E_ASF_INDEXNOTLOADED = unchecked((int) 0xC00D3A9E); - - /// - /// MessageId: MF_E_ASF_TOO_MANY_PAYLOADS - /// - /// MessageText: - /// - /// The packet has reached the maximum number of payloads.%0 - /// - public const int MF_E_ASF_TOO_MANY_PAYLOADS = unchecked((int) 0xC00D3A9F); - - /// - /// MessageId: MF_E_ASF_UNSUPPORTED_STREAM_TYPE - /// - /// MessageText: - /// - /// Stream type is not supported.%0 - /// - public const int MF_E_ASF_UNSUPPORTED_STREAM_TYPE = unchecked((int) 0xC00D3AA0); - - /// - /// MessageId: MF_E_ASF_DROPPED_PACKET - /// - /// MessageText: - /// - /// One or more ASF packets were dropped.%0 - /// - public const int MF_E_ASF_DROPPED_PACKET = unchecked((int) 0xC00D3AA1); - - #endregion - #region MEDIAFOUNDATION Media Source Error Events - - /// - /// MessageId: MF_E_NO_EVENTS_AVAILABLE - /// - /// MessageText: - /// - /// There are no events available in the queue.%0 - /// - public const int MF_E_NO_EVENTS_AVAILABLE = unchecked((int) 0xC00D3E80); - - /// - /// MessageId: MF_E_INVALID_STATE_TRANSITION - /// - /// MessageText: - /// - /// A media source cannot go from the stopped state to the paused state.%0 - /// - public const int MF_E_INVALID_STATE_TRANSITION = unchecked((int) 0xC00D3E82); - - /// - /// MessageId: MF_E_END_OF_STREAM - /// - /// MessageText: - /// - /// The media stream cannot process any more samples because there are no more samples in the stream.%0 - /// - public const int MF_E_END_OF_STREAM = unchecked((int) 0xC00D3E84); - - /// - /// MessageId: MF_E_SHUTDOWN - /// - /// MessageText: - /// - /// The request is invalid because Shutdown() has been called.%0 - /// - public const int MF_E_SHUTDOWN = unchecked((int) 0xC00D3E85); - - /// - /// MessageId: MF_E_MP3_NOTFOUND - /// - /// MessageText: - /// - /// The MP3 object was not found.%0 - /// - public const int MF_E_MP3_NOTFOUND = unchecked((int) 0xC00D3E86); - - /// - /// MessageId: MF_E_MP3_OUTOFDATA - /// - /// MessageText: - /// - /// The MP3 parser ran out of data before finding the MP3 object.%0 - /// - public const int MF_E_MP3_OUTOFDATA = unchecked((int) 0xC00D3E87); - - /// - /// MessageId: MF_E_MP3_NOTMP3 - /// - /// MessageText: - /// - /// The file is not really a MP3 file.%0 - /// - public const int MF_E_MP3_NOTMP3 = unchecked((int) 0xC00D3E88); - - /// - /// MessageId: MF_E_MP3_NOTSUPPORTED - /// - /// MessageText: - /// - /// The MP3 file is not supported.%0 - /// - public const int MF_E_MP3_NOTSUPPORTED = unchecked((int) 0xC00D3E89); - - /// - /// MessageId: MF_E_NO_DURATION - /// - /// MessageText: - /// - /// The Media stream has no duration.%0 - /// - public const int MF_E_NO_DURATION = unchecked((int) 0xC00D3E8A); - - /// - /// MessageId: MF_E_INVALID_FORMAT - /// - /// MessageText: - /// - /// The Media format is recognized but is invalid.%0 - /// - public const int MF_E_INVALID_FORMAT = unchecked((int) 0xC00D3E8C); - - /// - /// MessageId: MF_E_PROPERTY_NOT_FOUND - /// - /// MessageText: - /// - /// The property requested was not found.%0 - /// - public const int MF_E_PROPERTY_NOT_FOUND = unchecked((int) 0xC00D3E8D); - - /// - /// MessageId: MF_E_PROPERTY_READ_ONLY - /// - /// MessageText: - /// - /// The property is read only.%0 - /// - public const int MF_E_PROPERTY_READ_ONLY = unchecked((int) 0xC00D3E8E); - - /// - /// MessageId: MF_E_PROPERTY_NOT_ALLOWED - /// - /// MessageText: - /// - /// The specified property is not allowed in this context.%0 - /// - public const int MF_E_PROPERTY_NOT_ALLOWED = unchecked((int) 0xC00D3E8F); - - /// - /// MessageId: MF_E_MEDIA_SOURCE_NOT_STARTED - /// - /// MessageText: - /// - /// The media source is not started.%0 - /// - public const int MF_E_MEDIA_SOURCE_NOT_STARTED = unchecked((int) 0xC00D3E91); - - /// - /// MessageId: MF_E_UNSUPPORTED_FORMAT - /// - /// MessageText: - /// - /// The Media format is recognized but not supported.%0 - /// - public const int MF_E_UNSUPPORTED_FORMAT = unchecked((int) 0xC00D3E98); - - /// - /// MessageId: MF_E_MP3_BAD_CRC - /// - /// MessageText: - /// - /// The MPEG frame has bad CRC.%0 - /// - public const int MF_E_MP3_BAD_CRC = unchecked((int) 0xC00D3E99); - - /// - /// MessageId: MF_E_NOT_PROTECTED - /// - /// MessageText: - /// - /// The file is not protected.%0 - /// - public const int MF_E_NOT_PROTECTED = unchecked((int) 0xC00D3E9A); - - /// - /// MessageId: MF_E_MEDIA_SOURCE_WRONGSTATE - /// - /// MessageText: - /// - /// The media source is in the wrong state%0 - /// - public const int MF_E_MEDIA_SOURCE_WRONGSTATE = unchecked((int) 0xC00D3E9B); - - /// - /// MessageId: MF_E_MEDIA_SOURCE_NO_STREAMS_SELECTED - /// - /// MessageText: - /// - /// No streams are selected in source presentation descriptor.%0 - /// - public const int MF_E_MEDIA_SOURCE_NO_STREAMS_SELECTED = unchecked((int) 0xC00D3E9C); - - /// - /// MessageId: MF_E_CANNOT_FIND_KEYFRAME_SAMPLE - /// - /// MessageText: - /// - /// No key frame sample was found.%0 - /// - public const int MF_E_CANNOT_FIND_KEYFRAME_SAMPLE = unchecked((int) 0xC00D3E9D); - - #endregion - #region MEDIAFOUNDATION Network Error Events - - /// - /// MessageId: MF_E_NETWORK_RESOURCE_FAILURE - /// - /// MessageText: - /// - /// An attempt to acquire a network resource failed.%0 - /// - public const int MF_E_NETWORK_RESOURCE_FAILURE = unchecked((int) 0xC00D4268); - - /// - /// MessageId: MF_E_NET_WRITE - /// - /// MessageText: - /// - /// Error writing to the network.%0 - /// - public const int MF_E_NET_WRITE = unchecked((int) 0xC00D4269); - - /// - /// MessageId: MF_E_NET_READ - /// - /// MessageText: - /// - /// Error reading from the network.%0 - /// - public const int MF_E_NET_READ = unchecked((int) 0xC00D426A); - - /// - /// MessageId: MF_E_NET_REQUIRE_NETWORK - /// - /// MessageText: - /// - /// Internal. Entry cannot complete operation without network.%0 - /// - public const int MF_E_NET_REQUIRE_NETWORK = unchecked((int) 0xC00D426B); - - /// - /// MessageId: MF_E_NET_REQUIRE_ASYNC - /// - /// MessageText: - /// - /// Internal. Async op is required.%0 - /// - public const int MF_E_NET_REQUIRE_ASYNC = unchecked((int) 0xC00D426C); - - /// - /// MessageId: MF_E_NET_BWLEVEL_NOT_SUPPORTED - /// - /// MessageText: - /// - /// Internal. Bandwidth levels are not supported.%0 - /// - public const int MF_E_NET_BWLEVEL_NOT_SUPPORTED = unchecked((int) 0xC00D426D); - - /// - /// MessageId: MF_E_NET_STREAMGROUPS_NOT_SUPPORTED - /// - /// MessageText: - /// - /// Internal. Stream groups are not supported.%0 - /// - public const int MF_E_NET_STREAMGROUPS_NOT_SUPPORTED = unchecked((int) 0xC00D426E); - - /// - /// MessageId: MF_E_NET_MANUALSS_NOT_SUPPORTED - /// - /// MessageText: - /// - /// Manual stream selection is not supported.%0 - /// - public const int MF_E_NET_MANUALSS_NOT_SUPPORTED = unchecked((int) 0xC00D426F); - - /// - /// MessageId: MF_E_NET_INVALID_PRESENTATION_DESCRIPTOR - /// - /// MessageText: - /// - /// Invalid presentation descriptor.%0 - /// - public const int MF_E_NET_INVALID_PRESENTATION_DESCRIPTOR = unchecked((int) 0xC00D4270); - - /// - /// MessageId: MF_E_NET_CACHESTREAM_NOT_FOUND - /// - /// MessageText: - /// - /// Cannot find cache stream.%0 - /// - public const int MF_E_NET_CACHESTREAM_NOT_FOUND = unchecked((int) 0xC00D4271); - - /// - /// MessageId: MF_I_MANUAL_PROXY - /// - /// MessageText: - /// - /// The proxy setting is manual.%0 - /// - public const int MF_I_MANUAL_PROXY = unchecked((int) 0x400D4272); - - ///duplicate removed - ///MessageId=17011 Severity=Informational Facility=MEDIAFOUNDATION SymbolicName=MF_E_INVALID_REQUEST - ///Language=English - ///The request is invalid in the current state.%0 - ///. - /// - /// MessageId: MF_E_NET_REQUIRE_INPUT - /// - /// MessageText: - /// - /// Internal. Entry cannot complete operation without input.%0 - /// - public const int MF_E_NET_REQUIRE_INPUT = unchecked((int) 0xC00D4274); - - /// - /// MessageId: MF_E_NET_REDIRECT - /// - /// MessageText: - /// - /// The client redirected to another server.%0 - /// - public const int MF_E_NET_REDIRECT = unchecked((int) 0xC00D4275); - - /// - /// MessageId: MF_E_NET_REDIRECT_TO_PROXY - /// - /// MessageText: - /// - /// The client is redirected to a proxy server.%0 - /// - public const int MF_E_NET_REDIRECT_TO_PROXY = unchecked((int) 0xC00D4276); - - /// - /// MessageId: MF_E_NET_TOO_MANY_REDIRECTS - /// - /// MessageText: - /// - /// The client reached maximum redirection limit.%0 - /// - public const int MF_E_NET_TOO_MANY_REDIRECTS = unchecked((int) 0xC00D4277); - - /// - /// MessageId: MF_E_NET_TIMEOUT - /// - /// MessageText: - /// - /// The server, a computer set up to offer multimedia content to other computers, could not handle your request for multimedia content in a timely manner. Please try again later.%0 - /// - public const int MF_E_NET_TIMEOUT = unchecked((int) 0xC00D4278); - - /// - /// MessageId: MF_E_NET_CLIENT_CLOSE - /// - /// MessageText: - /// - /// The control socket is closed by the client.%0 - /// - public const int MF_E_NET_CLIENT_CLOSE = unchecked((int) 0xC00D4279); - - /// - /// MessageId: MF_E_NET_BAD_CONTROL_DATA - /// - /// MessageText: - /// - /// The server received invalid data from the client on the control connection.%0 - /// - public const int MF_E_NET_BAD_CONTROL_DATA = unchecked((int) 0xC00D427A); - - /// - /// MessageId: MF_E_NET_INCOMPATIBLE_SERVER - /// - /// MessageText: - /// - /// The server is not a compatible streaming media server.%0 - /// - public const int MF_E_NET_INCOMPATIBLE_SERVER = unchecked((int) 0xC00D427B); - - /// - /// MessageId: MF_E_NET_UNSAFE_URL - /// - /// MessageText: - /// - /// Url.%0 - /// - public const int MF_E_NET_UNSAFE_URL = unchecked((int) 0xC00D427C); - - /// - /// MessageId: MF_E_NET_CACHE_NO_DATA - /// - /// MessageText: - /// - /// Data is not available.%0 - /// - public const int MF_E_NET_CACHE_NO_DATA = unchecked((int) 0xC00D427D); - - /// - /// MessageId: MF_E_NET_EOL - /// - /// MessageText: - /// - /// End of line.%0 - /// - public const int MF_E_NET_EOL = unchecked((int) 0xC00D427E); - - /// - /// MessageId: MF_E_NET_BAD_REQUEST - /// - /// MessageText: - /// - /// The request could not be understood by the server.%0 - /// - public const int MF_E_NET_BAD_REQUEST = unchecked((int) 0xC00D427F); - - /// - /// MessageId: MF_E_NET_INTERNAL_SERVER_ERROR - /// - /// MessageText: - /// - /// The server encountered an unexpected condition which prevented it from fulfilling the request.%0 - /// - public const int MF_E_NET_INTERNAL_SERVER_ERROR = unchecked((int) 0xC00D4280); - - /// - /// MessageId: MF_E_NET_SESSION_NOT_FOUND - /// - /// MessageText: - /// - /// Session not found.%0 - /// - public const int MF_E_NET_SESSION_NOT_FOUND = unchecked((int) 0xC00D4281); - - /// - /// MessageId: MF_E_NET_NOCONNECTION - /// - /// MessageText: - /// - /// There is no connection established with the Windows Media server. The operation failed.%0 - /// - public const int MF_E_NET_NOCONNECTION = unchecked((int) 0xC00D4282); - - /// - /// MessageId: MF_E_NET_CONNECTION_FAILURE - /// - /// MessageText: - /// - /// The network connection has failed.%0 - /// - public const int MF_E_NET_CONNECTION_FAILURE = unchecked((int) 0xC00D4283); - - /// - /// MessageId: MF_E_NET_INCOMPATIBLE_PUSHSERVER - /// - /// MessageText: - /// - /// The Server service that received the HTTP push request is not a compatible version of Windows Media Services (WMS). This error may indicate the push request was received by IIS instead of WMS. Ensure WMS is started and has the HTTP Server control protocol properly enabled and try again.%0 - /// - public const int MF_E_NET_INCOMPATIBLE_PUSHSERVER = unchecked((int) 0xC00D4284); - - /// - /// MessageId: MF_E_NET_SERVER_ACCESSDENIED - /// - /// MessageText: - /// - /// The Windows Media server is denying access. The username and/or password might be incorrect.%0 - /// - public const int MF_E_NET_SERVER_ACCESSDENIED = unchecked((int) 0xC00D4285); - - /// - /// MessageId: MF_E_NET_PROXY_ACCESSDENIED - /// - /// MessageText: - /// - /// The proxy server is denying access. The username and/or password might be incorrect.%0 - /// - public const int MF_E_NET_PROXY_ACCESSDENIED = unchecked((int) 0xC00D4286); - - /// - /// MessageId: MF_E_NET_CANNOTCONNECT - /// - /// MessageText: - /// - /// Unable to establish a connection to the server.%0 - /// - public const int MF_E_NET_CANNOTCONNECT = unchecked((int) 0xC00D4287); - - /// - /// MessageId: MF_E_NET_INVALID_PUSH_TEMPLATE - /// - /// MessageText: - /// - /// The specified push template is invalid.%0 - /// - public const int MF_E_NET_INVALID_PUSH_TEMPLATE = unchecked((int) 0xC00D4288); - - /// - /// MessageId: MF_E_NET_INVALID_PUSH_PUBLISHING_POINT - /// - /// MessageText: - /// - /// The specified push publishing point is invalid.%0 - /// - public const int MF_E_NET_INVALID_PUSH_PUBLISHING_POINT = unchecked((int) 0xC00D4289); - - /// - /// MessageId: MF_E_NET_BUSY - /// - /// MessageText: - /// - /// The requested resource is in use.%0 - /// - public const int MF_E_NET_BUSY = unchecked((int) 0xC00D428A); - - /// - /// MessageId: MF_E_NET_RESOURCE_GONE - /// - /// MessageText: - /// - /// The Publishing Point or file on the Windows Media Server is no longer available.%0 - /// - public const int MF_E_NET_RESOURCE_GONE = unchecked((int) 0xC00D428B); - - /// - /// MessageId: MF_E_NET_ERROR_FROM_PROXY - /// - /// MessageText: - /// - /// The proxy experienced an error while attempting to contact the media server.%0 - /// - public const int MF_E_NET_ERROR_FROM_PROXY = unchecked((int) 0xC00D428C); - - /// - /// MessageId: MF_E_NET_PROXY_TIMEOUT - /// - /// MessageText: - /// - /// The proxy did not receive a timely response while attempting to contact the media server.%0 - /// - public const int MF_E_NET_PROXY_TIMEOUT = unchecked((int) 0xC00D428D); - - /// - /// MessageId: MF_E_NET_SERVER_UNAVAILABLE - /// - /// MessageText: - /// - /// The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.%0 - /// - public const int MF_E_NET_SERVER_UNAVAILABLE = unchecked((int) 0xC00D428E); - - /// - /// MessageId: MF_E_NET_TOO_MUCH_DATA - /// - /// MessageText: - /// - /// The encoding process was unable to keep up with the amount of supplied data.%0 - /// - public const int MF_E_NET_TOO_MUCH_DATA = unchecked((int) 0xC00D428F); - - /// - /// MessageId: MF_E_NET_SESSION_INVALID - /// - /// MessageText: - /// - /// Session not found.%0 - /// - public const int MF_E_NET_SESSION_INVALID = unchecked((int) 0xC00D4290); - - /// - /// MessageId: MF_E_OFFLINE_MODE - /// - /// MessageText: - /// - /// The requested URL is not available in offline mode.%0 - /// - public const int MF_E_OFFLINE_MODE = unchecked((int) 0xC00D4291); - - /// - /// MessageId: MF_E_NET_UDP_BLOCKED - /// - /// MessageText: - /// - /// A device in the network is blocking UDP traffic.%0 - /// - public const int MF_E_NET_UDP_BLOCKED = unchecked((int) 0xC00D4292); - - /// - /// MessageId: MF_E_NET_UNSUPPORTED_CONFIGURATION - /// - /// MessageText: - /// - /// The specified configuration value is not supported.%0 - /// - public const int MF_E_NET_UNSUPPORTED_CONFIGURATION = unchecked((int) 0xC00D4293); - - /// - /// MessageId: MF_E_NET_PROTOCOL_DISABLED - /// - /// MessageText: - /// - /// The networking protocol is disabled.%0 - /// - public const int MF_E_NET_PROTOCOL_DISABLED = unchecked((int) 0xC00D4294); - - #endregion - #region MEDIAFOUNDATION WMContainer Error Events - - /// - /// MessageId: MF_E_ALREADY_INITIALIZED - /// - /// MessageText: - /// - /// This object has already been initialized and cannot be re-initialized at this time.%0 - /// - public const int MF_E_ALREADY_INITIALIZED = unchecked((int) 0xC00D4650); - - /// - /// MessageId: MF_E_BANDWIDTH_OVERRUN - /// - /// MessageText: - /// - /// The amount of data passed in exceeds the given bitrate and buffer window.%0 - /// - public const int MF_E_BANDWIDTH_OVERRUN = unchecked((int) 0xC00D4651); - - /// - /// MessageId: MF_E_LATE_SAMPLE - /// - /// MessageText: - /// - /// The sample was passed in too late to be correctly processed.%0 - /// - public const int MF_E_LATE_SAMPLE = unchecked((int) 0xC00D4652); - - /// - /// MessageId: MF_E_FLUSH_NEEDED - /// - /// MessageText: - /// - /// The requested action cannot be carried out until the object is flushed and the queue is emptied.%0 - /// - public const int MF_E_FLUSH_NEEDED = unchecked((int) 0xC00D4653); - - /// - /// MessageId: MF_E_INVALID_PROFILE - /// - /// MessageText: - /// - /// The profile is invalid.%0 - /// - public const int MF_E_INVALID_PROFILE = unchecked((int) 0xC00D4654); - - /// - /// MessageId: MF_E_INDEX_NOT_COMMITTED - /// - /// MessageText: - /// - /// The index that is being generated needs to be committed before the requested action can be carried out.%0 - /// - public const int MF_E_INDEX_NOT_COMMITTED = unchecked((int) 0xC00D4655); - - /// - /// MessageId: MF_E_NO_INDEX - /// - /// MessageText: - /// - /// The index that is necessary for the requested action is not found.%0 - /// - public const int MF_E_NO_INDEX = unchecked((int) 0xC00D4656); - - /// - /// MessageId: MF_E_CANNOT_INDEX_IN_PLACE - /// - /// MessageText: - /// - /// The requested index cannot be added in-place to the specified ASF content.%0 - /// - public const int MF_E_CANNOT_INDEX_IN_PLACE = unchecked((int) 0xC00D4657); - - /// - /// MessageId: MF_E_MISSING_ASF_LEAKYBUCKET - /// - /// MessageText: - /// - /// The ASF leaky bucket parameters must be specified in order to carry out this request.%0 - /// - public const int MF_E_MISSING_ASF_LEAKYBUCKET = unchecked((int) 0xC00D4658); - - /// - /// MessageId: MF_E_INVALID_ASF_STREAMID - /// - /// MessageText: - /// - /// The stream id is invalid. The valid range for ASF stream id is from 1 to 127.%0 - /// - public const int MF_E_INVALID_ASF_STREAMID = unchecked((int) 0xC00D4659); - - #endregion - #region MEDIAFOUNDATION Media Sink Error Events - - /// - /// MessageId: MF_E_STREAMSINK_REMOVED - /// - /// MessageText: - /// - /// The requested Stream Sink has been removed and cannot be used.%0 - /// - public const int MF_E_STREAMSINK_REMOVED = unchecked((int) 0xC00D4A38); - - /// - /// MessageId: MF_E_STREAMSINKS_OUT_OF_SYNC - /// - /// MessageText: - /// - /// The various Stream Sinks in this Media Sink are too far out of sync for the requested action to take place.%0 - /// - public const int MF_E_STREAMSINKS_OUT_OF_SYNC = unchecked((int) 0xC00D4A3A); - - /// - /// MessageId: MF_E_STREAMSINKS_FIXED - /// - /// MessageText: - /// - /// Stream Sinks cannot be added to or removed from this Media Sink because its set of streams is fixed.%0 - /// - public const int MF_E_STREAMSINKS_FIXED = unchecked((int) 0xC00D4A3B); - - /// - /// MessageId: MF_E_STREAMSINK_EXISTS - /// - /// MessageText: - /// - /// The given Stream Sink already exists.%0 - /// - public const int MF_E_STREAMSINK_EXISTS = unchecked((int) 0xC00D4A3C); - - /// - /// MessageId: MF_E_SAMPLEALLOCATOR_CANCELED - /// - /// MessageText: - /// - /// Sample allocations have been canceled.%0 - /// - public const int MF_E_SAMPLEALLOCATOR_CANCELED = unchecked((int) 0xC00D4A3D); - - /// - /// MessageId: MF_E_SAMPLEALLOCATOR_EMPTY - /// - /// MessageText: - /// - /// The sample allocator is currently empty, due to outstanding requests.%0 - /// - public const int MF_E_SAMPLEALLOCATOR_EMPTY = unchecked((int) 0xC00D4A3E); - - /// - /// MessageId: MF_E_SINK_ALREADYSTOPPED - /// - /// MessageText: - /// - /// When we try to sopt a stream sink, it is already stopped %0 - /// - public const int MF_E_SINK_ALREADYSTOPPED = unchecked((int) 0xC00D4A3F); - - /// - /// MessageId: MF_E_ASF_FILESINK_BITRATE_UNKNOWN - /// - /// MessageText: - /// - /// The ASF file sink could not reserve AVIO because the bitrate is unknown.%0 - /// - public const int MF_E_ASF_FILESINK_BITRATE_UNKNOWN = unchecked((int) 0xC00D4A40); - - /// - /// MessageId: MF_E_SINK_NO_STREAMS - /// - /// MessageText: - /// - /// No streams are selected in sink presentation descriptor.%0 - /// - public const int MF_E_SINK_NO_STREAMS = unchecked((int) 0xC00D4A41); - - /// - /// MessageId: MF_S_SINK_NOT_FINALIZED - /// - /// MessageText: - /// - /// The sink has not been finalized before shut down. This may cause sink generate a corrupted content.%0 - /// - public const int MF_S_SINK_NOT_FINALIZED = unchecked((int) 0x000D4A42); - - /// - /// MessageId: MF_E_METADATA_TOO_LONG - /// - /// MessageText: - /// - /// A metadata item was too long to write to the output container.%0 - /// - public const int MF_E_METADATA_TOO_LONG = unchecked((int) 0xC00D4A43); - - /// - /// MessageId: MF_E_SINK_NO_SAMPLES_PROCESSED - /// - /// MessageText: - /// - /// The operation failed because no samples were processed by the sink.%0 - /// - public const int MF_E_SINK_NO_SAMPLES_PROCESSED = unchecked((int) 0xC00D4A44); - - #endregion - #region MEDIAFOUNDATION Renderer Error Events - - /// - /// MessageId: MF_E_VIDEO_REN_NO_PROCAMP_HW - /// - /// MessageText: - /// - /// There is no available procamp hardware with which to perform color correction.%0 - /// - public const int MF_E_VIDEO_REN_NO_PROCAMP_HW = unchecked((int) 0xC00D4E20); - - /// - /// MessageId: MF_E_VIDEO_REN_NO_DEINTERLACE_HW - /// - /// MessageText: - /// - /// There is no available deinterlacing hardware with which to deinterlace the video stream.%0 - /// - public const int MF_E_VIDEO_REN_NO_DEINTERLACE_HW = unchecked((int) 0xC00D4E21); - - /// - /// MessageId: MF_E_VIDEO_REN_COPYPROT_FAILED - /// - /// MessageText: - /// - /// A video stream requires copy protection to be enabled, but there was a failure in attempting to enable copy protection.%0 - /// - public const int MF_E_VIDEO_REN_COPYPROT_FAILED = unchecked((int) 0xC00D4E22); - - /// - /// MessageId: MF_E_VIDEO_REN_SURFACE_NOT_SHARED - /// - /// MessageText: - /// - /// A component is attempting to access a surface for sharing that is not shared.%0 - /// - public const int MF_E_VIDEO_REN_SURFACE_NOT_SHARED = unchecked((int) 0xC00D4E23); - - /// - /// MessageId: MF_E_VIDEO_DEVICE_LOCKED - /// - /// MessageText: - /// - /// A component is attempting to access a shared device that is already locked by another component.%0 - /// - public const int MF_E_VIDEO_DEVICE_LOCKED = unchecked((int) 0xC00D4E24); - - /// - /// MessageId: MF_E_NEW_VIDEO_DEVICE - /// - /// MessageText: - /// - /// The device is no longer available. The handle should be closed and a new one opened.%0 - /// - public const int MF_E_NEW_VIDEO_DEVICE = unchecked((int) 0xC00D4E25); - - /// - /// MessageId: MF_E_NO_VIDEO_SAMPLE_AVAILABLE - /// - /// MessageText: - /// - /// A video sample is not currently queued on a stream that is required for mixing.%0 - /// - public const int MF_E_NO_VIDEO_SAMPLE_AVAILABLE = unchecked((int) 0xC00D4E26); - - /// - /// MessageId: MF_E_NO_AUDIO_PLAYBACK_DEVICE - /// - /// MessageText: - /// - /// No audio playback device was found.%0 - /// - public const int MF_E_NO_AUDIO_PLAYBACK_DEVICE = unchecked((int) 0xC00D4E84); - - /// - /// MessageId: MF_E_AUDIO_PLAYBACK_DEVICE_IN_USE - /// - /// MessageText: - /// - /// The requested audio playback device is currently in use.%0 - /// - public const int MF_E_AUDIO_PLAYBACK_DEVICE_IN_USE = unchecked((int) 0xC00D4E85); - - /// - /// MessageId: MF_E_AUDIO_PLAYBACK_DEVICE_INVALIDATED - /// - /// MessageText: - /// - /// The audio playback device is no longer present.%0 - /// - public const int MF_E_AUDIO_PLAYBACK_DEVICE_INVALIDATED = unchecked((int) 0xC00D4E86); - - /// - /// MessageId: MF_E_AUDIO_SERVICE_NOT_RUNNING - /// - /// MessageText: - /// - /// The audio service is not running.%0 - /// - public const int MF_E_AUDIO_SERVICE_NOT_RUNNING = unchecked((int) 0xC00D4E87); - - #endregion - #region MEDIAFOUNDATION Topology Error Events - - /// - /// MessageId: MF_E_TOPO_INVALID_OPTIONAL_NODE - /// - /// MessageText: - /// - /// The topology contains an invalid optional node. Possible reasons are incorrect number of outputs and inputs or optional node is at the beginning or end of a segment. %0 - /// - public const int MF_E_TOPO_INVALID_OPTIONAL_NODE = unchecked((int) 0xC00D520E); - - /// - /// MessageId: MF_E_TOPO_CANNOT_FIND_DECRYPTOR - /// - /// MessageText: - /// - /// No suitable transform was found to decrypt the content. %0 - /// - public const int MF_E_TOPO_CANNOT_FIND_DECRYPTOR = unchecked((int) 0xC00D5211); - - /// - /// MessageId: MF_E_TOPO_CODEC_NOT_FOUND - /// - /// MessageText: - /// - /// No suitable transform was found to encode or decode the content. %0 - /// - public const int MF_E_TOPO_CODEC_NOT_FOUND = unchecked((int) 0xC00D5212); - - /// - /// MessageId: MF_E_TOPO_CANNOT_CONNECT - /// - /// MessageText: - /// - /// Unable to find a way to connect nodes%0 - /// - public const int MF_E_TOPO_CANNOT_CONNECT = unchecked((int) 0xC00D5213); - - /// - /// MessageId: MF_E_TOPO_UNSUPPORTED - /// - /// MessageText: - /// - /// Unsupported operations in topoloader%0 - /// - public const int MF_E_TOPO_UNSUPPORTED = unchecked((int) 0xC00D5214); - - /// - /// MessageId: MF_E_TOPO_INVALID_TIME_ATTRIBUTES - /// - /// MessageText: - /// - /// The topology or its nodes contain incorrectly set time attributes%0 - /// - public const int MF_E_TOPO_INVALID_TIME_ATTRIBUTES = unchecked((int) 0xC00D5215); - - /// - /// MessageId: MF_E_TOPO_LOOPS_IN_TOPOLOGY - /// - /// MessageText: - /// - /// The topology contains loops, which are unsupported in media foundation topologies%0 - /// - public const int MF_E_TOPO_LOOPS_IN_TOPOLOGY = unchecked((int) 0xC00D5216); - - /// - /// MessageId: MF_E_TOPO_MISSING_PRESENTATION_DESCRIPTOR - /// - /// MessageText: - /// - /// A source stream node in the topology does not have a presentation descriptor%0 - /// - public const int MF_E_TOPO_MISSING_PRESENTATION_DESCRIPTOR = unchecked((int) 0xC00D5217); - - /// - /// MessageId: MF_E_TOPO_MISSING_STREAM_DESCRIPTOR - /// - /// MessageText: - /// - /// A source stream node in the topology does not have a stream descriptor%0 - /// - public const int MF_E_TOPO_MISSING_STREAM_DESCRIPTOR = unchecked((int) 0xC00D5218); - - /// - /// MessageId: MF_E_TOPO_STREAM_DESCRIPTOR_NOT_SELECTED - /// - /// MessageText: - /// - /// A stream descriptor was set on a source stream node but it was not selected on the presentation descriptor%0 - /// - public const int MF_E_TOPO_STREAM_DESCRIPTOR_NOT_SELECTED = unchecked((int) 0xC00D5219); - - /// - /// MessageId: MF_E_TOPO_MISSING_SOURCE - /// - /// MessageText: - /// - /// A source stream node in the topology does not have a source%0 - /// - public const int MF_E_TOPO_MISSING_SOURCE = unchecked((int) 0xC00D521A); - - /// - /// MessageId: MF_E_TOPO_SINK_ACTIVATES_UNSUPPORTED - /// - /// MessageText: - /// - /// The topology loader does not support sink activates on output nodes.%0 - /// - public const int MF_E_TOPO_SINK_ACTIVATES_UNSUPPORTED = unchecked((int) 0xC00D521B); - #endregion - #region MEDIAFOUNDATION Timeline Error Events - - /// - /// MessageId: MF_E_SEQUENCER_UNKNOWN_SEGMENT_ID - /// - /// MessageText: - /// - /// The sequencer cannot find a segment with the given ID.%0\n. - /// - public const int MF_E_SEQUENCER_UNKNOWN_SEGMENT_ID = unchecked((int) 0xC00D61AC); - - /// - /// MessageId: MF_S_SEQUENCER_CONTEXT_CANCELED - /// - /// MessageText: - /// - /// The context was canceled.%0\n. - /// - public const int MF_S_SEQUENCER_CONTEXT_CANCELED = unchecked((int) 0x000D61AD); - - /// - /// MessageId: MF_E_NO_SOURCE_IN_CACHE - /// - /// MessageText: - /// - /// Cannot find source in source cache.%0\n. - /// - public const int MF_E_NO_SOURCE_IN_CACHE = unchecked((int) 0xC00D61AE); - - /// - /// MessageId: MF_S_SEQUENCER_SEGMENT_AT_END_OF_STREAM - /// - /// MessageText: - /// - /// Cannot update topology flags.%0\n. - /// - public const int MF_S_SEQUENCER_SEGMENT_AT_END_OF_STREAM = unchecked((int) 0x000D61AF); - #endregion - #region Transform errors - - /// - /// MessageId: MF_E_TRANSFORM_TYPE_NOT_SET - /// - /// MessageText: - /// - /// A valid type has not been set for this stream or a stream that it depends on.%0 - /// - public const int MF_E_TRANSFORM_TYPE_NOT_SET = unchecked((int) 0xC00D6D60); - - /// - /// MessageId: MF_E_TRANSFORM_STREAM_CHANGE - /// - /// MessageText: - /// - /// A stream change has occurred. Output cannot be produced until the streams have been renegotiated.%0 - /// - public const int MF_E_TRANSFORM_STREAM_CHANGE = unchecked((int) 0xC00D6D61); - - /// - /// MessageId: MF_E_TRANSFORM_INPUT_REMAINING - /// - /// MessageText: - /// - /// The transform cannot take the requested action until all of the input data it currently holds is processed or flushed.%0 - /// - public const int MF_E_TRANSFORM_INPUT_REMAINING = unchecked((int) 0xC00D6D62); - - /// - /// MessageId: MF_E_TRANSFORM_PROFILE_MISSING - /// - /// MessageText: - /// - /// The transform requires a profile but no profile was supplied or found.%0 - /// - public const int MF_E_TRANSFORM_PROFILE_MISSING = unchecked((int) 0xC00D6D63); - - /// - /// MessageId: MF_E_TRANSFORM_PROFILE_INVALID_OR_CORRUPT - /// - /// MessageText: - /// - /// The transform requires a profile but the supplied profile was invalid or corrupt.%0 - /// - public const int MF_E_TRANSFORM_PROFILE_INVALID_OR_CORRUPT = unchecked((int) 0xC00D6D64); - - /// - /// MessageId: MF_E_TRANSFORM_PROFILE_TRUNCATED - /// - /// MessageText: - /// - /// The transform requires a profile but the supplied profile ended unexpectedly while parsing.%0 - /// - public const int MF_E_TRANSFORM_PROFILE_TRUNCATED = unchecked((int) 0xC00D6D65); - - /// - /// MessageId: MF_E_TRANSFORM_PROPERTY_PID_NOT_RECOGNIZED - /// - /// MessageText: - /// - /// The property ID does not match any property supported by the transform.%0 - /// - public const int MF_E_TRANSFORM_PROPERTY_PID_NOT_RECOGNIZED = unchecked((int) 0xC00D6D66); - - /// - /// MessageId: MF_E_TRANSFORM_PROPERTY_VARIANT_TYPE_WRONG - /// - /// MessageText: - /// - /// The variant does not have the type expected for this property ID.%0 - /// - public const int MF_E_TRANSFORM_PROPERTY_VARIANT_TYPE_WRONG = unchecked((int) 0xC00D6D67); - - /// - /// MessageId: MF_E_TRANSFORM_PROPERTY_NOT_WRITEABLE - /// - /// MessageText: - /// - /// An attempt was made to set the value on a read-only property.%0 - /// - public const int MF_E_TRANSFORM_PROPERTY_NOT_WRITEABLE = unchecked((int) 0xC00D6D68); - - /// - /// MessageId: MF_E_TRANSFORM_PROPERTY_ARRAY_VALUE_WRONG_NUM_DIM - /// - /// MessageText: - /// - /// The array property value has an unexpected number of dimensions.%0 - /// - public const int MF_E_TRANSFORM_PROPERTY_ARRAY_VALUE_WRONG_NUM_DIM = unchecked((int) 0xC00D6D69); - - /// - /// MessageId: MF_E_TRANSFORM_PROPERTY_VALUE_SIZE_WRONG - /// - /// MessageText: - /// - /// The array or blob property value has an unexpected size.%0 - /// - public const int MF_E_TRANSFORM_PROPERTY_VALUE_SIZE_WRONG = unchecked((int) 0xC00D6D6A); - - /// - /// MessageId: MF_E_TRANSFORM_PROPERTY_VALUE_OUT_OF_RANGE - /// - /// MessageText: - /// - /// The property value is out of range for this transform.%0 - /// - public const int MF_E_TRANSFORM_PROPERTY_VALUE_OUT_OF_RANGE = unchecked((int) 0xC00D6D6B); - - /// - /// MessageId: MF_E_TRANSFORM_PROPERTY_VALUE_INCOMPATIBLE - /// - /// MessageText: - /// - /// The property value is incompatible with some other property or mediatype set on the transform.%0 - /// - public const int MF_E_TRANSFORM_PROPERTY_VALUE_INCOMPATIBLE = unchecked((int) 0xC00D6D6C); - - /// - /// MessageId: MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_OUTPUT_MEDIATYPE - /// - /// MessageText: - /// - /// The requested operation is not supported for the currently set output mediatype.%0 - /// - public const int MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_OUTPUT_MEDIATYPE = unchecked((int) 0xC00D6D6D); - - /// - /// MessageId: MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_INPUT_MEDIATYPE - /// - /// MessageText: - /// - /// The requested operation is not supported for the currently set input mediatype.%0 - /// - public const int MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_INPUT_MEDIATYPE = unchecked((int) 0xC00D6D6E); - - /// - /// MessageId: MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_MEDIATYPE_COMBINATION - /// - /// MessageText: - /// - /// The requested operation is not supported for the currently set combination of mediatypes.%0 - /// - public const int MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_MEDIATYPE_COMBINATION = unchecked((int) 0xC00D6D6F); - - /// - /// MessageId: MF_E_TRANSFORM_CONFLICTS_WITH_OTHER_CURRENTLY_ENABLED_FEATURES - /// - /// MessageText: - /// - /// The requested feature is not supported in combination with some other currently enabled feature.%0 - /// - public const int MF_E_TRANSFORM_CONFLICTS_WITH_OTHER_CURRENTLY_ENABLED_FEATURES = unchecked((int) 0xC00D6D70); - - /// - /// MessageId: MF_E_TRANSFORM_NEED_MORE_INPUT - /// - /// MessageText: - /// - /// The transform cannot produce output until it gets more input samples.%0 - /// - public const int MF_E_TRANSFORM_NEED_MORE_INPUT = unchecked((int) 0xC00D6D72); - - /// - /// MessageId: MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_SPKR_CONFIG - /// - /// MessageText: - /// - /// The requested operation is not supported for the current speaker configuration.%0 - /// - public const int MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_SPKR_CONFIG = unchecked((int) 0xC00D6D73); - - /// - /// MessageId: MF_E_TRANSFORM_CANNOT_CHANGE_MEDIATYPE_WHILE_PROCESSING - /// - /// MessageText: - /// - /// The transform cannot accept mediatype changes in the middle of processing.%0 - /// - public const int MF_E_TRANSFORM_CANNOT_CHANGE_MEDIATYPE_WHILE_PROCESSING = unchecked((int) 0xC00D6D74); - - /// - /// MessageId: MF_S_TRANSFORM_DO_NOT_PROPAGATE_EVENT - /// - /// MessageText: - /// - /// The caller should not propagate this event to downstream components.%0 - /// - public const int MF_S_TRANSFORM_DO_NOT_PROPAGATE_EVENT = unchecked((int) 0x000D6D75); - - /// - /// MessageId: MF_E_UNSUPPORTED_D3D_TYPE - /// - /// MessageText: - /// - /// The input type is not supported for D3D device.%0 - /// - public const int MF_E_UNSUPPORTED_D3D_TYPE = unchecked((int) 0xC00D6D76); - - /// - /// MessageId: MF_E_TRANSFORM_ASYNC_LOCKED - /// - /// MessageText: - /// - /// The caller does not appear to support this transform's asynchronous capabilities.%0 - /// - public const int MF_E_TRANSFORM_ASYNC_LOCKED = unchecked((int) 0xC00D6D77); - - /// - /// MessageId: MF_E_TRANSFORM_CANNOT_INITIALIZE_ACM_DRIVER - /// - /// MessageText: - /// - /// An audio compression manager driver could not be initialized by the transform.%0 - /// - public const int MF_E_TRANSFORM_CANNOT_INITIALIZE_ACM_DRIVER = unchecked((int) 0xC00D6D78); - - #endregion - #region Content Protection errors - - /// - /// MessageId: MF_E_LICENSE_INCORRECT_RIGHTS - /// - /// MessageText: - /// - /// You are not allowed to open this file. Contact the content provider for further assistance.%0 - /// - public const int MF_E_LICENSE_INCORRECT_RIGHTS = unchecked((int) 0xC00D7148); - - /// - /// MessageId: MF_E_LICENSE_OUTOFDATE - /// - /// MessageText: - /// - /// The license for this media file has expired. Get a new license or contact the content provider for further assistance.%0 - /// - public const int MF_E_LICENSE_OUTOFDATE = unchecked((int) 0xC00D7149); - - /// - /// MessageId: MF_E_LICENSE_REQUIRED - /// - /// MessageText: - /// - /// You need a license to perform the requested operation on this media file.%0 - /// - public const int MF_E_LICENSE_REQUIRED = unchecked((int) 0xC00D714A); - - /// - /// MessageId: MF_E_DRM_HARDWARE_INCONSISTENT - /// - /// MessageText: - /// - /// The licenses for your media files are corrupted. Contact Microsoft product support.%0 - /// - public const int MF_E_DRM_HARDWARE_INCONSISTENT = unchecked((int) 0xC00D714B); - - /// - /// MessageId: MF_E_NO_CONTENT_PROTECTION_MANAGER - /// - /// MessageText: - /// - /// The APP needs to provide IMFContentProtectionManager callback to access the protected media file.%0 - /// - public const int MF_E_NO_CONTENT_PROTECTION_MANAGER = unchecked((int) 0xC00D714C); - - /// - /// MessageId: MF_E_LICENSE_RESTORE_NO_RIGHTS - /// - /// MessageText: - /// - /// Client does not have rights to restore licenses.%0 - /// - public const int MF_E_LICENSE_RESTORE_NO_RIGHTS = unchecked((int) 0xC00D714D); - - /// - /// MessageId: MF_E_BACKUP_RESTRICTED_LICENSE - /// - /// MessageText: - /// - /// Licenses are restricted and hence can not be backed up.%0 - /// - public const int MF_E_BACKUP_RESTRICTED_LICENSE = unchecked((int) 0xC00D714E); - - /// - /// MessageId: MF_E_LICENSE_RESTORE_NEEDS_INDIVIDUALIZATION - /// - /// MessageText: - /// - /// License restore requires machine to be individualized.%0 - /// - public const int MF_E_LICENSE_RESTORE_NEEDS_INDIVIDUALIZATION = unchecked((int) 0xC00D714F); - - /// - /// MessageId: MF_S_PROTECTION_NOT_REQUIRED - /// - /// MessageText: - /// - /// Protection for stream is not required.%0 - /// - public const int MF_S_PROTECTION_NOT_REQUIRED = unchecked((int) 0x000D7150); - - /// - /// MessageId: MF_E_COMPONENT_REVOKED - /// - /// MessageText: - /// - /// Component is revoked.%0 - /// - public const int MF_E_COMPONENT_REVOKED = unchecked((int) 0xC00D7151); - - /// - /// MessageId: MF_E_TRUST_DISABLED - /// - /// MessageText: - /// - /// Trusted functionality is currently disabled on this component.%0 - /// - public const int MF_E_TRUST_DISABLED = unchecked((int) 0xC00D7152); - - /// - /// MessageId: MF_E_WMDRMOTA_NO_ACTION - /// - /// MessageText: - /// - /// No Action is set on WMDRM Output Trust Authority.%0 - /// - public const int MF_E_WMDRMOTA_NO_ACTION = unchecked((int) 0xC00D7153); - - /// - /// MessageId: MF_E_WMDRMOTA_ACTION_ALREADY_SET - /// - /// MessageText: - /// - /// Action is already set on WMDRM Output Trust Authority.%0 - /// - public const int MF_E_WMDRMOTA_ACTION_ALREADY_SET = unchecked((int) 0xC00D7154); - - /// - /// MessageId: MF_E_WMDRMOTA_DRM_HEADER_NOT_AVAILABLE - /// - /// MessageText: - /// - /// DRM Heaader is not available.%0 - /// - public const int MF_E_WMDRMOTA_DRM_HEADER_NOT_AVAILABLE = unchecked((int) 0xC00D7155); - - /// - /// MessageId: MF_E_WMDRMOTA_DRM_ENCRYPTION_SCHEME_NOT_SUPPORTED - /// - /// MessageText: - /// - /// Current encryption scheme is not supported.%0 - /// - public const int MF_E_WMDRMOTA_DRM_ENCRYPTION_SCHEME_NOT_SUPPORTED = unchecked((int) 0xC00D7156); - - /// - /// MessageId: MF_E_WMDRMOTA_ACTION_MISMATCH - /// - /// MessageText: - /// - /// Action does not match with current configuration.%0 - /// - public const int MF_E_WMDRMOTA_ACTION_MISMATCH = unchecked((int) 0xC00D7157); - - /// - /// MessageId: MF_E_WMDRMOTA_INVALID_POLICY - /// - /// MessageText: - /// - /// Invalid policy for WMDRM Output Trust Authority.%0 - /// - public const int MF_E_WMDRMOTA_INVALID_POLICY = unchecked((int) 0xC00D7158); - - /// - /// MessageId: MF_E_POLICY_UNSUPPORTED - /// - /// MessageText: - /// - /// The policies that the Input Trust Authority requires to be enforced are unsupported by the outputs.%0 - /// - public const int MF_E_POLICY_UNSUPPORTED = unchecked((int) 0xC00D7159); - - /// - /// MessageId: MF_E_OPL_NOT_SUPPORTED - /// - /// MessageText: - /// - /// The OPL that the license requires to be enforced are not supported by the Input Trust Authority.%0 - /// - public const int MF_E_OPL_NOT_SUPPORTED = unchecked((int) 0xC00D715A); - - /// - /// MessageId: MF_E_TOPOLOGY_VERIFICATION_FAILED - /// - /// MessageText: - /// - /// The topology could not be successfully verified.%0 - /// - public const int MF_E_TOPOLOGY_VERIFICATION_FAILED = unchecked((int) 0xC00D715B); - - /// - /// MessageId: MF_E_SIGNATURE_VERIFICATION_FAILED - /// - /// MessageText: - /// - /// Signature verification could not be completed successfully for this component.%0 - /// - public const int MF_E_SIGNATURE_VERIFICATION_FAILED = unchecked((int) 0xC00D715C); - - /// - /// MessageId: MF_E_DEBUGGING_NOT_ALLOWED - /// - /// MessageText: - /// - /// Running this process under a debugger while using protected content is not allowed.%0 - /// - public const int MF_E_DEBUGGING_NOT_ALLOWED = unchecked((int) 0xC00D715D); - - /// - /// MessageId: MF_E_CODE_EXPIRED - /// - /// MessageText: - /// - /// MF component has expired.%0 - /// - public const int MF_E_CODE_EXPIRED = unchecked((int) 0xC00D715E); - - /// - /// MessageId: MF_E_GRL_VERSION_TOO_LOW - /// - /// MessageText: - /// - /// The current GRL on the machine does not meet the minimum version requirements.%0 - /// - public const int MF_E_GRL_VERSION_TOO_LOW = unchecked((int) 0xC00D715F); - - /// - /// MessageId: MF_E_GRL_RENEWAL_NOT_FOUND - /// - /// MessageText: - /// - /// The current GRL on the machine does not contain any renewal entries for the specified revocation.%0 - /// - public const int MF_E_GRL_RENEWAL_NOT_FOUND = unchecked((int) 0xC00D7160); - - /// - /// MessageId: MF_E_GRL_EXTENSIBLE_ENTRY_NOT_FOUND - /// - /// MessageText: - /// - /// The current GRL on the machine does not contain any extensible entries for the specified extension GUID.%0 - /// - public const int MF_E_GRL_EXTENSIBLE_ENTRY_NOT_FOUND = unchecked((int) 0xC00D7161); - - /// - /// MessageId: MF_E_KERNEL_UNTRUSTED - /// - /// MessageText: - /// - /// The kernel isn't secure for high security level content.%0 - /// - public const int MF_E_KERNEL_UNTRUSTED = unchecked((int) 0xC00D7162); - - /// - /// MessageId: MF_E_PEAUTH_UNTRUSTED - /// - /// MessageText: - /// - /// The response from protected environment driver isn't valid.%0 - /// - public const int MF_E_PEAUTH_UNTRUSTED = unchecked((int) 0xC00D7163); - - /// - /// MessageId: MF_E_NON_PE_PROCESS - /// - /// MessageText: - /// - /// A non-PE process tried to talk to PEAuth.%0 - /// - public const int MF_E_NON_PE_PROCESS = unchecked((int) 0xC00D7165); - - /// - /// MessageId: MF_E_REBOOT_REQUIRED - /// - /// MessageText: - /// - /// We need to reboot the machine.%0 - /// - public const int MF_E_REBOOT_REQUIRED = unchecked((int) 0xC00D7167); - - /// - /// MessageId: MF_S_WAIT_FOR_POLICY_SET - /// - /// MessageText: - /// - /// Protection for this stream is not guaranteed to be enforced until the MEPolicySet event is fired.%0 - /// - public const int MF_S_WAIT_FOR_POLICY_SET = unchecked((int) 0x000D7168); - - /// - /// MessageId: MF_S_VIDEO_DISABLED_WITH_UNKNOWN_SOFTWARE_OUTPUT - /// - /// MessageText: - /// - /// This video stream is disabled because it is being sent to an unknown software output.%0 - /// - public const int MF_S_VIDEO_DISABLED_WITH_UNKNOWN_SOFTWARE_OUTPUT = unchecked((int) 0x000D7169); - - /// - /// MessageId: MF_E_GRL_INVALID_FORMAT - /// - /// MessageText: - /// - /// The GRL file is not correctly formed, it may have been corrupted or overwritten.%0 - /// - public const int MF_E_GRL_INVALID_FORMAT = unchecked((int) 0xC00D716A); - - /// - /// MessageId: MF_E_GRL_UNRECOGNIZED_FORMAT - /// - /// MessageText: - /// - /// The GRL file is in a format newer than those recognized by this GRL Reader.%0 - /// - public const int MF_E_GRL_UNRECOGNIZED_FORMAT = unchecked((int) 0xC00D716B); - - /// - /// MessageId: MF_E_ALL_PROCESS_RESTART_REQUIRED - /// - /// MessageText: - /// - /// The GRL was reloaded and required all processes that can run protected media to restart.%0 - /// - public const int MF_E_ALL_PROCESS_RESTART_REQUIRED = unchecked((int) 0xC00D716C); - - /// - /// MessageId: MF_E_PROCESS_RESTART_REQUIRED - /// - /// MessageText: - /// - /// The GRL was reloaded and the current process needs to restart.%0 - /// - public const int MF_E_PROCESS_RESTART_REQUIRED = unchecked((int) 0xC00D716D); - - /// - /// MessageId: MF_E_USERMODE_UNTRUSTED - /// - /// MessageText: - /// - /// The user space is untrusted for protected content play.%0 - /// - public const int MF_E_USERMODE_UNTRUSTED = unchecked((int) 0xC00D716E); - - /// - /// MessageId: MF_E_PEAUTH_SESSION_NOT_STARTED - /// - /// MessageText: - /// - /// PEAuth communication session hasn't been started.%0 - /// - public const int MF_E_PEAUTH_SESSION_NOT_STARTED = unchecked((int) 0xC00D716F); - - /// - /// MessageId: MF_E_PEAUTH_PUBLICKEY_REVOKED - /// - /// MessageText: - /// - /// PEAuth's public key is revoked.%0 - /// - public const int MF_E_PEAUTH_PUBLICKEY_REVOKED = unchecked((int) 0xC00D7171); - - /// - /// MessageId: MF_E_GRL_ABSENT - /// - /// MessageText: - /// - /// The GRL is absent.%0 - /// - public const int MF_E_GRL_ABSENT = unchecked((int) 0xC00D7172); - - /// - /// MessageId: MF_S_PE_TRUSTED - /// - /// MessageText: - /// - /// The Protected Environment is trusted.%0 - /// - public const int MF_S_PE_TRUSTED = unchecked((int) 0x000D7173); - - /// - /// MessageId: MF_E_PE_UNTRUSTED - /// - /// MessageText: - /// - /// The Protected Environment is untrusted.%0 - /// - public const int MF_E_PE_UNTRUSTED = unchecked((int) 0xC00D7174); - - /// - /// MessageId: MF_E_PEAUTH_NOT_STARTED - /// - /// MessageText: - /// - /// The Protected Environment Authorization service (PEAUTH) has not been started.%0 - /// - public const int MF_E_PEAUTH_NOT_STARTED = unchecked((int) 0xC00D7175); - - /// - /// MessageId: MF_E_INCOMPATIBLE_SAMPLE_PROTECTION - /// - /// MessageText: - /// - /// The sample protection algorithms supported by components are not compatible.%0 - /// - public const int MF_E_INCOMPATIBLE_SAMPLE_PROTECTION = unchecked((int) 0xC00D7176); - - /// - /// MessageId: MF_E_PE_SESSIONS_MAXED - /// - /// MessageText: - /// - /// No more protected environment sessions can be supported.%0 - /// - public const int MF_E_PE_SESSIONS_MAXED = unchecked((int) 0xC00D7177); - - /// - /// MessageId: MF_E_HIGH_SECURITY_LEVEL_CONTENT_NOT_ALLOWED - /// - /// MessageText: - /// - /// WMDRM ITA does not allow protected content with high security level for this release.%0 - /// - public const int MF_E_HIGH_SECURITY_LEVEL_CONTENT_NOT_ALLOWED = unchecked((int) 0xC00D7178); - - /// - /// MessageId: MF_E_TEST_SIGNED_COMPONENTS_NOT_ALLOWED - /// - /// MessageText: - /// - /// WMDRM ITA cannot allow the requested action for the content as one or more components is not properly signed.%0 - /// - public const int MF_E_TEST_SIGNED_COMPONENTS_NOT_ALLOWED = unchecked((int) 0xC00D7179); - - /// - /// MessageId: MF_E_ITA_UNSUPPORTED_ACTION - /// - /// MessageText: - /// - /// WMDRM ITA does not support the requested action.%0 - /// - public const int MF_E_ITA_UNSUPPORTED_ACTION = unchecked((int) 0xC00D717A); - - /// - /// MessageId: MF_E_ITA_ERROR_PARSING_SAP_PARAMETERS - /// - /// MessageText: - /// - /// WMDRM ITA encountered an error in parsing the Secure Audio Path parameters.%0 - /// - public const int MF_E_ITA_ERROR_PARSING_SAP_PARAMETERS = unchecked((int) 0xC00D717B); - - /// - /// MessageId: MF_E_POLICY_MGR_ACTION_OUTOFBOUNDS - /// - /// MessageText: - /// - /// The Policy Manager action passed in is invalid.%0 - /// - public const int MF_E_POLICY_MGR_ACTION_OUTOFBOUNDS = unchecked((int) 0xC00D717C); - - /// - /// MessageId: MF_E_BAD_OPL_STRUCTURE_FORMAT - /// - /// MessageText: - /// - /// The structure specifying Output Protection Level is not the correct format.%0 - /// - public const int MF_E_BAD_OPL_STRUCTURE_FORMAT = unchecked((int) 0xC00D717D); - - /// - /// MessageId: MF_E_ITA_UNRECOGNIZED_ANALOG_VIDEO_PROTECTION_GUID - /// - /// MessageText: - /// - /// WMDRM ITA does not recognize the Explicite Analog Video Output Protection guid specified in the license.%0 - /// - public const int MF_E_ITA_UNRECOGNIZED_ANALOG_VIDEO_PROTECTION_GUID = unchecked((int) 0xC00D717E); - - /// - /// MessageId: MF_E_NO_PMP_HOST - /// - /// MessageText: - /// - /// IMFPMPHost object not available.%0 - /// - public const int MF_E_NO_PMP_HOST = unchecked((int) 0xC00D717F); - - /// - /// MessageId: MF_E_ITA_OPL_DATA_NOT_INITIALIZED - /// - /// MessageText: - /// - /// WMDRM ITA could not initialize the Output Protection Level data.%0 - /// - public const int MF_E_ITA_OPL_DATA_NOT_INITIALIZED = unchecked((int) 0xC00D7180); - - /// - /// MessageId: MF_E_ITA_UNRECOGNIZED_ANALOG_VIDEO_OUTPUT - /// - /// MessageText: - /// - /// WMDRM ITA does not recognize the Analog Video Output specified by the OTA.%0 - /// - public const int MF_E_ITA_UNRECOGNIZED_ANALOG_VIDEO_OUTPUT = unchecked((int) 0xC00D7181); - - /// - /// MessageId: MF_E_ITA_UNRECOGNIZED_DIGITAL_VIDEO_OUTPUT - /// - /// MessageText: - /// - /// WMDRM ITA does not recognize the Digital Video Output specified by the OTA.%0 - /// - public const int MF_E_ITA_UNRECOGNIZED_DIGITAL_VIDEO_OUTPUT = unchecked((int) 0xC00D7182); - - #endregion - #region Clock errors - - /// - /// MessageId: MF_E_CLOCK_INVALID_CONTINUITY_KEY - /// - /// MessageText: - /// - /// The continuity key supplied is not currently valid.%0 - /// - public const int MF_E_CLOCK_INVALID_CONTINUITY_KEY = unchecked((int) 0xC00D9C40); - - /// - /// MessageId: MF_E_CLOCK_NO_TIME_SOURCE - /// - /// MessageText: - /// - /// No Presentation Time Source has been specified.%0 - /// - public const int MF_E_CLOCK_NO_TIME_SOURCE = unchecked((int) 0xC00D9C41); - - /// - /// MessageId: MF_E_CLOCK_STATE_ALREADY_SET - /// - /// MessageText: - /// - /// The clock is already in the requested state.%0 - /// - public const int MF_E_CLOCK_STATE_ALREADY_SET = unchecked((int) 0xC00D9C42); - - /// - /// MessageId: MF_E_CLOCK_NOT_SIMPLE - /// - /// MessageText: - /// - /// The clock has too many advanced features to carry out the request.%0 - /// - public const int MF_E_CLOCK_NOT_SIMPLE = unchecked((int) 0xC00D9C43); - - /// - /// MessageId: MF_S_CLOCK_STOPPED - /// - /// MessageText: - /// - /// Timer::SetTimer returns this success code if called happened while timer is stopped. Timer is not going to be dispatched until clock is running%0 - /// - public const int MF_S_CLOCK_STOPPED = unchecked((int) 0x000D9C44); - #endregion - #region MF Quality Management errors - - /// - /// MessageId: MF_E_NO_MORE_DROP_MODES - /// - /// MessageText: - /// - /// The component does not support any more drop modes.%0 - /// - public const int MF_E_NO_MORE_DROP_MODES = unchecked((int) 0xC00DA028); - - /// - /// MessageId: MF_E_NO_MORE_QUALITY_LEVELS - /// - /// MessageText: - /// - /// The component does not support any more quality levels.%0 - /// - public const int MF_E_NO_MORE_QUALITY_LEVELS = unchecked((int) 0xC00DA029); - - /// - /// MessageId: MF_E_DROPTIME_NOT_SUPPORTED - /// - /// MessageText: - /// - /// The component does not support drop time functionality.%0 - /// - public const int MF_E_DROPTIME_NOT_SUPPORTED = unchecked((int) 0xC00DA02A); - - /// - /// MessageId: MF_E_QUALITYKNOB_WAIT_LONGER - /// - /// MessageText: - /// - /// Quality Manager needs to wait longer before bumping the Quality Level up.%0 - /// - public const int MF_E_QUALITYKNOB_WAIT_LONGER = unchecked((int) 0xC00DA02B); - - /// - /// MessageId: MF_E_QM_INVALIDSTATE - /// - /// MessageText: - /// - /// Quality Manager is in an invalid state. Quality Management is off at this moment.%0 - /// - public const int MF_E_QM_INVALIDSTATE = unchecked((int) 0xC00DA02C); - - #endregion - #region MF Transcode errors - - /// - /// MessageId: MF_E_TRANSCODE_NO_CONTAINERTYPE - /// - /// MessageText: - /// - /// No transcode output container type is specified.%0 - /// - public const int MF_E_TRANSCODE_NO_CONTAINERTYPE = unchecked((int) 0xC00DA410); - - /// - /// MessageId: MF_E_TRANSCODE_PROFILE_NO_MATCHING_STREAMS - /// - /// MessageText: - /// - /// The profile does not have a media type configuration for any selected source streams.%0 - /// - public const int MF_E_TRANSCODE_PROFILE_NO_MATCHING_STREAMS = unchecked((int) 0xC00DA411); - - /// - /// MessageId: MF_E_TRANSCODE_NO_MATCHING_ENCODER - /// - /// MessageText: - /// - /// Cannot find an encoder MFT that accepts the user preferred output type.%0 - /// - public const int MF_E_TRANSCODE_NO_MATCHING_ENCODER = unchecked((int) 0xC00DA412); - - #endregion - #region MF HW Device Proxy errors - - /// - /// MessageId: MF_E_ALLOCATOR_NOT_INITIALIZED - /// - /// MessageText: - /// - /// Memory allocator is not initialized.%0 - /// - public const int MF_E_ALLOCATOR_NOT_INITIALIZED = unchecked((int) 0xC00DA7F8); - - /// - /// MessageId: MF_E_ALLOCATOR_NOT_COMMITED - /// - /// MessageText: - /// - /// Memory allocator is not committed yet.%0 - /// - public const int MF_E_ALLOCATOR_NOT_COMMITED = unchecked((int) 0xC00DA7F9); - - /// - /// MessageId: MF_E_ALLOCATOR_ALREADY_COMMITED - /// - /// MessageText: - /// - /// Memory allocator has already been committed.%0 - /// - public const int MF_E_ALLOCATOR_ALREADY_COMMITED = unchecked((int) 0xC00DA7FA); - - /// - /// MessageId: MF_E_STREAM_ERROR - /// - /// MessageText: - /// - /// An error occurred in media stream.%0 - /// - public const int MF_E_STREAM_ERROR = unchecked((int) 0xC00DA7FB); - - /// - /// MessageId: MF_E_INVALID_STREAM_STATE - /// - /// MessageText: - /// - /// Stream is not in a state to handle the request.%0 - /// - public const int MF_E_INVALID_STREAM_STATE = unchecked((int) 0xC00DA7FC); - - /// - /// MessageId: MF_E_HW_STREAM_NOT_CONNECTED - /// - /// MessageText: - /// - /// Hardware stream is not connected yet.%0 - /// - public const int MF_E_HW_STREAM_NOT_CONNECTED = unchecked((int) 0xC00DA7FD); - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationErrors.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationErrors.cs.meta deleted file mode 100644 index f60d02f..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationErrors.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e3d353a0eae37274f912f50ebd5e3866 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationHelpers.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationHelpers.cs deleted file mode 100644 index 6b6bf16..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationHelpers.cs +++ /dev/null @@ -1,174 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; -using NAudio.Wave; -using System.Runtime.InteropServices.ComTypes; - -namespace NAudio.MediaFoundation -{ - /// - /// Main interface for using Media Foundation with NAudio - /// - public static class MediaFoundationApi - { - private static bool initialized; - - /// - /// initializes MediaFoundation - only needs to be called once per process - /// - public static void Startup() - { - if (!initialized) - { - var sdkVersion = MediaFoundationInterop.MF_SDK_VERSION; -#if !NETFX_CORE - var os = Environment.OSVersion; - if (os.Version.Major == 6 && os.Version.Minor == 0) - sdkVersion = 1; -#endif - MediaFoundationInterop.MFStartup((sdkVersion << 16) | MediaFoundationInterop.MF_API_VERSION, 0); - initialized = true; - } - } - -#if !NETFX_CORE - /// - /// Enumerate the installed MediaFoundation transforms in the specified category - /// - /// A category from MediaFoundationTransformCategories - /// - public static IEnumerable EnumerateTransforms(Guid category) - { - IntPtr interfacesPointer; - int interfaceCount; - MediaFoundationInterop.MFTEnumEx(category, _MFT_ENUM_FLAG.MFT_ENUM_FLAG_ALL, - null, null, out interfacesPointer, out interfaceCount); - var interfaces = new IMFActivate[interfaceCount]; - for (int n = 0; n < interfaceCount; n++) - { - var ptr = - Marshal.ReadIntPtr(new IntPtr(interfacesPointer.ToInt64() + n*Marshal.SizeOf(interfacesPointer))); - interfaces[n] = (IMFActivate) Marshal.GetObjectForIUnknown(ptr); - } - - foreach (var i in interfaces) - { - yield return i; - } - Marshal.FreeCoTaskMem(interfacesPointer); - } -#endif - - /// - /// uninitializes MediaFoundation - /// - public static void Shutdown() - { - if (initialized) - { - MediaFoundationInterop.MFShutdown(); - initialized = false; - } - } - - /// - /// Creates a Media type - /// - public static IMFMediaType CreateMediaType() - { - IMFMediaType mediaType; - MediaFoundationInterop.MFCreateMediaType(out mediaType); - return mediaType; - } - - /// - /// Creates a media type from a WaveFormat - /// - public static IMFMediaType CreateMediaTypeFromWaveFormat(WaveFormat waveFormat) - { - var mediaType = CreateMediaType(); - try - { - MediaFoundationInterop.MFInitMediaTypeFromWaveFormatEx(mediaType, waveFormat, Marshal.SizeOf(waveFormat)); - } - catch (Exception) - { - Marshal.ReleaseComObject(mediaType); - throw; - } - return mediaType; - } - - /// - /// Creates a memory buffer of the specified size - /// - /// Memory buffer size in bytes - /// The memory buffer - public static IMFMediaBuffer CreateMemoryBuffer(int bufferSize) - { - IMFMediaBuffer buffer; - MediaFoundationInterop.MFCreateMemoryBuffer(bufferSize, out buffer); - return buffer; - } - - /// - /// Creates a sample object - /// - /// The sample object - public static IMFSample CreateSample() - { - IMFSample sample; - MediaFoundationInterop.MFCreateSample(out sample); - return sample; - } - - /// - /// Creates a new attributes store - /// - /// Initial size - /// The attributes store - public static IMFAttributes CreateAttributes(int initialSize) - { - IMFAttributes attributes; - MediaFoundationInterop.MFCreateAttributes(out attributes, initialSize); - return attributes; - } - - /// - /// Creates a media foundation byte stream based on a stream object - /// (usable with WinRT streams) - /// - /// The input stream - /// A media foundation byte stream - public static IMFByteStream CreateByteStream(object stream) - { - IMFByteStream byteStream; -#if NETFX_CORE - MediaFoundationInterop.MFCreateMFByteStreamOnStreamEx(stream, out byteStream); -#else - if (stream is IStream) - { - MediaFoundationInterop.MFCreateMFByteStreamOnStream(stream as IStream, out byteStream); - } - else - { - throw new ArgumentException("Stream must be IStream in desktop apps"); - } -#endif - return byteStream; - } - - /// - /// Creates a source reader based on a byte stream - /// - /// The byte stream - /// A media foundation source reader - public static IMFSourceReader CreateSourceReaderFromByteStream(IMFByteStream byteStream) - { - IMFSourceReader reader; - MediaFoundationInterop.MFCreateSourceReaderFromByteStream(byteStream, null, out reader); - return reader; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationHelpers.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationHelpers.cs.meta deleted file mode 100644 index 0f153c6..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationHelpers.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ea3af2f4b6c9ddb4485a2ecc20e4be79 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationInterop.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationInterop.cs deleted file mode 100644 index 7df2c9f..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationInterop.cs +++ /dev/null @@ -1,157 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using NAudio.Wave; -using System.Runtime.InteropServices.ComTypes; - -namespace NAudio.MediaFoundation -{ - /// - /// Interop definitions for MediaFoundation - /// thanks to Lucian Wischik for the initial work on many of these definitions (also various interfaces) - /// n.b. the goal is to make as much of this internal as possible, and provide - /// better .NET APIs using the MediaFoundationApi class instead - /// - public static class MediaFoundationInterop - { - /// - /// Initializes Microsoft Media Foundation. - /// - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - public static extern void MFStartup(int version, int dwFlags = 0); - - /// - /// Shuts down the Microsoft Media Foundation platform - /// - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - public static extern void MFShutdown(); - - /// - /// Creates an empty media type. - /// - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern void MFCreateMediaType(out IMFMediaType ppMFType); - - /// - /// Initializes a media type from a WAVEFORMATEX structure. - /// - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern void MFInitMediaTypeFromWaveFormatEx([In] IMFMediaType pMFType, [In] WaveFormat pWaveFormat, [In] int cbBufSize); - - /// - /// Converts a Media Foundation audio media type to a WAVEFORMATEX structure. - /// - /// TODO: try making second parameter out WaveFormatExtraData - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern void MFCreateWaveFormatExFromMFMediaType(IMFMediaType pMFType, ref IntPtr ppWF, ref int pcbSize, int flags = 0); - - /// - /// Creates the source reader from a URL. - /// - [DllImport("mfreadwrite.dll", ExactSpelling = true, PreserveSig = false)] - public static extern void MFCreateSourceReaderFromURL([In, MarshalAs(UnmanagedType.LPWStr)] string pwszURL, [In] IMFAttributes pAttributes, - [Out, MarshalAs(UnmanagedType.Interface)] out IMFSourceReader ppSourceReader); - - /// - /// Creates the source reader from a byte stream. - /// - [DllImport("mfreadwrite.dll", ExactSpelling = true, PreserveSig = false)] - public static extern void MFCreateSourceReaderFromByteStream([In] IMFByteStream pByteStream, [In] IMFAttributes pAttributes, [Out, MarshalAs(UnmanagedType.Interface)] out IMFSourceReader ppSourceReader); - - /// - /// Creates the sink writer from a URL or byte stream. - /// - [DllImport("mfreadwrite.dll", ExactSpelling = true, PreserveSig = false)] - public static extern void MFCreateSinkWriterFromURL([In, MarshalAs(UnmanagedType.LPWStr)] string pwszOutputURL, - [In] IMFByteStream pByteStream, [In] IMFAttributes pAttributes, [Out] out IMFSinkWriter ppSinkWriter); - - -#if NETFX_CORE - /// - /// Creates a Microsoft Media Foundation byte stream that wraps an IRandomAccessStream object. - /// - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - public static extern void MFCreateMFByteStreamOnStreamEx([MarshalAs(UnmanagedType.IUnknown)] object punkStream, out IMFByteStream ppByteStream); - -#else - /// - /// Creates a Microsoft Media Foundation byte stream that wraps an IRandomAccessStream object. - /// - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - public static extern void MFCreateMFByteStreamOnStream([In] IStream punkStream, out IMFByteStream ppByteStream); -#endif - -#if !NETFX_CORE - /// - /// Gets a list of Microsoft Media Foundation transforms (MFTs) that match specified search criteria. - /// - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - public static extern void MFTEnumEx([In] Guid guidCategory, [In] _MFT_ENUM_FLAG flags, [In] MFT_REGISTER_TYPE_INFO pInputType, [In] MFT_REGISTER_TYPE_INFO pOutputType, - [Out] out IntPtr pppMFTActivate, [Out] out int pcMFTActivate); -#endif - - /// - /// Creates an empty media sample. - /// - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern void MFCreateSample([Out] out IMFSample ppIMFSample); - - /// - /// Allocates system memory and creates a media buffer to manage it. - /// - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern void MFCreateMemoryBuffer( - int cbMaxLength, [Out] out IMFMediaBuffer ppBuffer); - - /// - /// Creates an empty attribute store. - /// - [DllImport("mfplat.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern void MFCreateAttributes( - [Out, MarshalAs(UnmanagedType.Interface)] out IMFAttributes ppMFAttributes, - [In] int cInitialSize); - -#if !NETFX_CORE - /// - /// Gets a list of output formats from an audio encoder. - /// - [DllImport("mf.dll", ExactSpelling = true, PreserveSig = false)] - public static extern void MFTranscodeGetAudioOutputAvailableTypes( - [In, MarshalAs(UnmanagedType.LPStruct)] Guid guidSubType, - [In] _MFT_ENUM_FLAG dwMFTFlags, - [In] IMFAttributes pCodecConfig, - [Out, MarshalAs(UnmanagedType.Interface)] out IMFCollection ppAvailableTypes); -#endif - - /// - /// All streams - /// - public const int MF_SOURCE_READER_ALL_STREAMS = unchecked((int)0xFFFFFFFE); - /// - /// First audio stream - /// - public const int MF_SOURCE_READER_FIRST_AUDIO_STREAM = unchecked((int)0xFFFFFFFD); - /// - /// First video stream - /// - public const int MF_SOURCE_READER_FIRST_VIDEO_STREAM = unchecked((int)0xFFFFFFFC); - /// - /// Media source - /// - public const int MF_SOURCE_READER_MEDIASOURCE = unchecked((int)0xFFFFFFFF); - /// - /// Media Foundation SDK Version - /// - public const int MF_SDK_VERSION = 0x2; - /// - /// Media Foundation API Version - /// - public const int MF_API_VERSION = 0x70; - /// - /// Media Foundation Version - /// - public const int MF_VERSION = (MF_SDK_VERSION << 16) | MF_API_VERSION; - - - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationInterop.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationInterop.cs.meta deleted file mode 100644 index 5e9d9d7..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationInterop.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 63f3bea97f0afa6418bed6392c610fcd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransform.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransform.cs deleted file mode 100644 index 981b7fa..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransform.cs +++ /dev/null @@ -1,287 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.Utils; -using NAudio.Wave; - -namespace NAudio.MediaFoundation -{ - /// - /// An abstract base class for simplifying working with Media Foundation Transforms - /// You need to override the method that actually creates and configures the transform - /// - public abstract class MediaFoundationTransform : IWaveProvider, IDisposable - { - /// - /// The Source Provider - /// - protected readonly IWaveProvider sourceProvider; - /// - /// The Output WaveFormat - /// - protected readonly WaveFormat outputWaveFormat; - private readonly byte[] sourceBuffer; - - private byte[] outputBuffer; - private int outputBufferOffset; - private int outputBufferCount; - - private IMFTransform transform; - private bool disposed; - private long inputPosition; // in ref-time, so we can timestamp the input samples - private long outputPosition; // also in ref-time - private bool initializedForStreaming; - - /// - /// Constructs a new MediaFoundationTransform wrapper - /// Will read one second at a time - /// - /// The source provider for input data to the transform - /// The desired output format - public MediaFoundationTransform(IWaveProvider sourceProvider, WaveFormat outputFormat) - { - this.outputWaveFormat = outputFormat; - this.sourceProvider = sourceProvider; - sourceBuffer = new byte[sourceProvider.WaveFormat.AverageBytesPerSecond]; - outputBuffer = new byte[outputWaveFormat.AverageBytesPerSecond + outputWaveFormat.BlockAlign]; // we will grow this buffer if needed, but try to make something big enough - } - - private void InitializeTransformForStreaming() - { - transform.ProcessMessage(MFT_MESSAGE_TYPE.MFT_MESSAGE_COMMAND_FLUSH, IntPtr.Zero); - transform.ProcessMessage(MFT_MESSAGE_TYPE.MFT_MESSAGE_NOTIFY_BEGIN_STREAMING, IntPtr.Zero); - transform.ProcessMessage(MFT_MESSAGE_TYPE.MFT_MESSAGE_NOTIFY_START_OF_STREAM, IntPtr.Zero); - initializedForStreaming = true; - } - - /// - /// To be implemented by overriding classes. Create the transform object, set up its input and output types, - /// and configure any custom properties in here - /// - /// An object implementing IMFTrasform - protected abstract IMFTransform CreateTransform(); - - /// - /// Disposes this MediaFoundation transform - /// - protected virtual void Dispose(bool disposing) - { - if (transform != null) - { - Marshal.ReleaseComObject(transform); - } - } - - /// - /// Disposes this Media Foundation Transform - /// - public void Dispose() - { - if (!disposed) - { - disposed = true; - Dispose(true); - GC.SuppressFinalize(this); - } - } - - /// - /// Destructor - /// - ~MediaFoundationTransform() - { - Dispose(false); - } - - /// - /// The output WaveFormat of this Media Foundation Transform - /// - public WaveFormat WaveFormat { get { return outputWaveFormat; } } - - /// - /// Reads data out of the source, passing it through the transform - /// - /// Output buffer - /// Offset within buffer to write to - /// Desired byte count - /// Number of bytes read - public int Read(byte[] buffer, int offset, int count) - { - if (transform == null) - { - transform = CreateTransform(); - InitializeTransformForStreaming(); - } - - // strategy will be to always read 1 second from the source, and give it to the resampler - int bytesWritten = 0; - - // read in any leftovers from last time - if (outputBufferCount > 0) - { - bytesWritten += ReadFromOutputBuffer(buffer, offset, count - bytesWritten); - } - - while (bytesWritten < count) - { - var sample = ReadFromSource(); - if (sample == null) // reached the end of our input - { - // be good citizens and send some end messages: - EndStreamAndDrain(); - // resampler might have given us a little bit more to return - bytesWritten += ReadFromOutputBuffer(buffer, offset + bytesWritten, count - bytesWritten); - break; - } - - // might need to resurrect the stream if the user has read all the way to the end, - // and then repositioned the input backwards - if (!initializedForStreaming) - { - InitializeTransformForStreaming(); - } - - // give the input to the resampler - // can get MF_E_NOTACCEPTING if we didn't drain the buffer properly - transform.ProcessInput(0, sample, 0); - - Marshal.ReleaseComObject(sample); - - int readFromTransform; - // n.b. in theory we ought to loop here, although we'd need to be careful as the next time into ReadFromTransform there could - // still be some leftover bytes in outputBuffer, which would get overwritten. Only introduce this if we find a transform that - // needs it. For most transforms, alternating read/write should be OK - //do - //{ - // keep reading from transform - readFromTransform = ReadFromTransform(); - bytesWritten += ReadFromOutputBuffer(buffer, offset + bytesWritten, count - bytesWritten); - //} while (readFromTransform > 0); - } - - return bytesWritten; - } - - private void EndStreamAndDrain() - { - transform.ProcessMessage(MFT_MESSAGE_TYPE.MFT_MESSAGE_NOTIFY_END_OF_STREAM, IntPtr.Zero); - transform.ProcessMessage(MFT_MESSAGE_TYPE.MFT_MESSAGE_COMMAND_DRAIN, IntPtr.Zero); - int read; - do - { - read = ReadFromTransform(); - } while (read > 0); - outputBufferCount = 0; - outputBufferOffset = 0; - inputPosition = 0; - outputPosition = 0; - transform.ProcessMessage(MFT_MESSAGE_TYPE.MFT_MESSAGE_NOTIFY_END_STREAMING, IntPtr.Zero); - initializedForStreaming = false; - } - - /// - /// Attempts to read from the transform - /// Some useful info here: - /// http://msdn.microsoft.com/en-gb/library/windows/desktop/aa965264%28v=vs.85%29.aspx#process_data - /// - /// - private int ReadFromTransform() - { - var outputDataBuffer = new MFT_OUTPUT_DATA_BUFFER[1]; - // we have to create our own for - var sample = MediaFoundationApi.CreateSample(); - var pBuffer = MediaFoundationApi.CreateMemoryBuffer(outputBuffer.Length); - sample.AddBuffer(pBuffer); - sample.SetSampleTime(outputPosition); // hopefully this is not needed - outputDataBuffer[0].pSample = sample; - - _MFT_PROCESS_OUTPUT_STATUS status; - var hr = transform.ProcessOutput(_MFT_PROCESS_OUTPUT_FLAGS.None, - 1, outputDataBuffer, out status); - if (hr == MediaFoundationErrors.MF_E_TRANSFORM_NEED_MORE_INPUT) - { - Marshal.ReleaseComObject(pBuffer); - Marshal.ReleaseComObject(sample); - // nothing to read - return 0; - } - else if (hr != 0) - { - Marshal.ThrowExceptionForHR(hr); - } - - IMFMediaBuffer outputMediaBuffer; - outputDataBuffer[0].pSample.ConvertToContiguousBuffer(out outputMediaBuffer); - IntPtr pOutputBuffer; - int outputBufferLength; - int maxSize; - outputMediaBuffer.Lock(out pOutputBuffer, out maxSize, out outputBufferLength); - outputBuffer = BufferHelpers.Ensure(outputBuffer, outputBufferLength); - Marshal.Copy(pOutputBuffer, outputBuffer, 0, outputBufferLength); - outputBufferOffset = 0; - outputBufferCount = outputBufferLength; - outputMediaBuffer.Unlock(); - outputPosition += BytesToNsPosition(outputBufferCount, WaveFormat); // hopefully not needed - Marshal.ReleaseComObject(pBuffer); - sample.RemoveAllBuffers(); // needed to fix memory leak in some cases - Marshal.ReleaseComObject(sample); - Marshal.ReleaseComObject(outputMediaBuffer); - return outputBufferLength; - } - - private static long BytesToNsPosition(int bytes, WaveFormat waveFormat) - { - long nsPosition = (10000000L * bytes) / waveFormat.AverageBytesPerSecond; - return nsPosition; - } - - private IMFSample ReadFromSource() - { - // we always read a full second - int bytesRead = sourceProvider.Read(sourceBuffer, 0, sourceBuffer.Length); - if (bytesRead == 0) return null; - - var mediaBuffer = MediaFoundationApi.CreateMemoryBuffer(bytesRead); - IntPtr pBuffer; - int maxLength, currentLength; - mediaBuffer.Lock(out pBuffer, out maxLength, out currentLength); - Marshal.Copy(sourceBuffer, 0, pBuffer, bytesRead); - mediaBuffer.Unlock(); - mediaBuffer.SetCurrentLength(bytesRead); - - var sample = MediaFoundationApi.CreateSample(); - sample.AddBuffer(mediaBuffer); - // we'll set the time, I don't think it is needed for Resampler, but other MFTs might need it - sample.SetSampleTime(inputPosition); - long duration = BytesToNsPosition(bytesRead, sourceProvider.WaveFormat); - sample.SetSampleDuration(duration); - inputPosition += duration; - Marshal.ReleaseComObject(mediaBuffer); - return sample; - } - - private int ReadFromOutputBuffer(byte[] buffer, int offset, int needed) - { - int bytesFromOutputBuffer = Math.Min(needed, outputBufferCount); - Array.Copy(outputBuffer, outputBufferOffset, buffer, offset, bytesFromOutputBuffer); - outputBufferOffset += bytesFromOutputBuffer; - outputBufferCount -= bytesFromOutputBuffer; - if (outputBufferCount == 0) - { - outputBufferOffset = 0; - } - return bytesFromOutputBuffer; - } - - /// - /// Indicate that the source has been repositioned and completely drain out the transforms buffers - /// - public void Reposition() - { - if (initializedForStreaming) - { - EndStreamAndDrain(); - InitializeTransformForStreaming(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransform.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransform.cs.meta deleted file mode 100644 index 248728d..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransform.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c55bc6f018636a64a8c683538f8a0bbf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransformCategories.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransformCategories.cs deleted file mode 100644 index f254f97..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransformCategories.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using NAudio.Utils; - -namespace NAudio.MediaFoundation -{ - /// - /// Media Foundation Transform Categories - /// - public static class MediaFoundationTransformCategories - { - /// - /// MFT_CATEGORY_VIDEO_DECODER - /// - [FieldDescription("Video Decoder")] - public static readonly Guid VideoDecoder = new Guid("{d6c02d4b-6833-45b4-971a-05a4b04bab91}"); - /// - /// MFT_CATEGORY_VIDEO_ENCODER - /// - [FieldDescription("Video Encoder")] - public static readonly Guid VideoEncoder = new Guid("{f79eac7d-e545-4387-bdee-d647d7bde42a}"); - /// - /// MFT_CATEGORY_VIDEO_EFFECT - /// - [FieldDescription("Video Effect")] - public static readonly Guid VideoEffect = new Guid("{12e17c21-532c-4a6e-8a1c-40825a736397}"); - /// - /// MFT_CATEGORY_MULTIPLEXER - /// - [FieldDescription("Multiplexer")] - public static readonly Guid Multiplexer = new Guid("{059c561e-05ae-4b61-b69d-55b61ee54a7b}"); - /// - /// MFT_CATEGORY_DEMULTIPLEXER - /// - [FieldDescription("Demultiplexer")] - public static readonly Guid Demultiplexer = new Guid("{a8700a7a-939b-44c5-99d7-76226b23b3f1}"); - /// - /// MFT_CATEGORY_AUDIO_DECODER - /// - [FieldDescription("Audio Decoder")] - public static readonly Guid AudioDecoder = new Guid("{9ea73fb4-ef7a-4559-8d5d-719d8f0426c7}"); - /// - /// MFT_CATEGORY_AUDIO_ENCODER - /// - [FieldDescription("Audio Encoder")] - public static readonly Guid AudioEncoder = new Guid("{91c64bd0-f91e-4d8c-9276-db248279d975}"); - /// - /// MFT_CATEGORY_AUDIO_EFFECT - /// - [FieldDescription("Audio Effect")] - public static readonly Guid AudioEffect = new Guid("{11064c48-3648-4ed0-932e-05ce8ac811b7}"); - /// - /// MFT_CATEGORY_VIDEO_PROCESSOR - /// - [FieldDescription("Video Processor")] - public static readonly Guid VideoProcessor = new Guid("{302EA3FC-AA5F-47f9-9F7A-C2188BB16302}"); - /// - /// MFT_CATEGORY_OTHER - /// - [FieldDescription("Other")] - public static readonly Guid Other = new Guid("{90175d57-b7ea-4901-aeb3-933a8747756f}"); - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransformCategories.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransformCategories.cs.meta deleted file mode 100644 index 4c230b2..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaFoundationTransformCategories.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3f36edc2a14ada74faa14e0485261b20 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaType.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaType.cs deleted file mode 100644 index 7b3bac0..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaType.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.Utils; -using NAudio.Wave; - -namespace NAudio.MediaFoundation -{ - /// - /// Media Type helper class, simplifying working with IMFMediaType - /// (will probably change in the future, to inherit from an attributes class) - /// Currently does not release the COM object, so you must do that yourself - /// - public class MediaType - { - private readonly IMFMediaType mediaType; - - /// - /// Wraps an existing IMFMediaType object - /// - /// The IMFMediaType object - public MediaType(IMFMediaType mediaType) - { - this.mediaType = mediaType; - } - - /// - /// Creates and wraps a new IMFMediaType object - /// - public MediaType() - { - mediaType = MediaFoundationApi.CreateMediaType(); - } - - /// - /// Creates and wraps a new IMFMediaType object based on a WaveFormat - /// - /// WaveFormat - public MediaType(WaveFormat waveFormat) - { - mediaType = MediaFoundationApi.CreateMediaTypeFromWaveFormat(waveFormat); - } - - private int GetUInt32(Guid key) - { - int value; - mediaType.GetUINT32(key, out value); - return value; - } - - private Guid GetGuid(Guid key) - { - Guid value; - mediaType.GetGUID(key, out value); - return value; - } - - /// - /// Tries to get a UINT32 value, returning a default value if it doesn't exist - /// - /// Attribute key - /// Default value - /// Value or default if key doesn't exist - public int TryGetUInt32(Guid key, int defaultValue = -1) - { - int intValue = defaultValue; - try - { - mediaType.GetUINT32(key, out intValue); - } - catch (COMException exception) - { - if (exception.GetHResult() == MediaFoundationErrors.MF_E_ATTRIBUTENOTFOUND) - { - // not a problem, return the default - } - else if (exception.GetHResult() == MediaFoundationErrors.MF_E_INVALIDTYPE) - { - throw new ArgumentException("Not a UINT32 parameter"); - } - else - { - throw; - } - } - return intValue; - } - - /// - /// The Sample Rate (valid for audio media types) - /// - public int SampleRate - { - get { return GetUInt32(MediaFoundationAttributes.MF_MT_AUDIO_SAMPLES_PER_SECOND); } - set { mediaType.SetUINT32(MediaFoundationAttributes.MF_MT_AUDIO_SAMPLES_PER_SECOND, value); } - } - - /// - /// The number of Channels (valid for audio media types) - /// - public int ChannelCount - { - get { return GetUInt32(MediaFoundationAttributes.MF_MT_AUDIO_NUM_CHANNELS); } - set { mediaType.SetUINT32(MediaFoundationAttributes.MF_MT_AUDIO_NUM_CHANNELS, value); } - } - - /// - /// The number of bits per sample (n.b. not always valid for compressed audio types) - /// - public int BitsPerSample - { - get { return GetUInt32(MediaFoundationAttributes.MF_MT_AUDIO_BITS_PER_SAMPLE); } - set { mediaType.SetUINT32(MediaFoundationAttributes.MF_MT_AUDIO_BITS_PER_SAMPLE, value); } - } - - /// - /// The average bytes per second (valid for audio media types) - /// - public int AverageBytesPerSecond - { - get { return GetUInt32(MediaFoundationAttributes.MF_MT_AUDIO_AVG_BYTES_PER_SECOND); } - } - - /// - /// The Media Subtype. For audio, is a value from the AudioSubtypes class - /// - public Guid SubType - { - get { return GetGuid(MediaFoundationAttributes.MF_MT_SUBTYPE); } - set { mediaType.SetGUID(MediaFoundationAttributes.MF_MT_SUBTYPE, value); } - } - - /// - /// The Major type, e.g. audio or video (from the MediaTypes class) - /// - public Guid MajorType - { - get { return GetGuid(MediaFoundationAttributes.MF_MT_MAJOR_TYPE); } - set { mediaType.SetGUID(MediaFoundationAttributes.MF_MT_MAJOR_TYPE, value); } - } - - /// - /// Access to the actual IMFMediaType object - /// Use to pass to MF APIs or Marshal.ReleaseComObject when you are finished with it - /// - public IMFMediaType MediaFoundationObject - { - get { return mediaType; } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaType.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaType.cs.meta deleted file mode 100644 index 246e538..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaType.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4bc35fb1e8808964f89d48f1192f0169 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaTypes.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaTypes.cs deleted file mode 100644 index c9ddec4..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaTypes.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.MediaFoundation -{ - /// - /// Major Media Types - /// http://msdn.microsoft.com/en-us/library/windows/desktop/aa367377%28v=vs.85%29.aspx - /// - public static class MediaTypes - { - /// - /// Default - /// - public static readonly Guid MFMediaType_Default = new Guid("81A412E6-8103-4B06-857F-1862781024AC"); - /// - /// Audio - /// - [FieldDescription("Audio")] - public static readonly Guid MFMediaType_Audio = new Guid("73647561-0000-0010-8000-00aa00389b71"); - /// - /// Video - /// - [FieldDescription("Video")] - public static readonly Guid MFMediaType_Video = new Guid("73646976-0000-0010-8000-00aa00389b71"); - /// - /// Protected Media - /// - [FieldDescription("Protected Media")] - public static readonly Guid MFMediaType_Protected = new Guid("7b4b6fe6-9d04-4494-be14-7e0bd076c8e4"); - /// - /// Synchronized Accessible Media Interchange (SAMI) captions. - /// - [FieldDescription("SAMI captions")] - public static readonly Guid MFMediaType_SAMI = new Guid("e69669a0-3dcd-40cb-9e2e-3708387c0616"); - /// - /// Script stream - /// - [FieldDescription("Script stream")] - public static readonly Guid MFMediaType_Script = new Guid("72178c22-e45b-11d5-bc2a-00b0d0f3f4ab"); - /// - /// Still image stream. - /// - [FieldDescription("Still image stream")] - public static readonly Guid MFMediaType_Image = new Guid("72178c23-e45b-11d5-bc2a-00b0d0f3f4ab"); - /// - /// HTML stream. - /// - [FieldDescription("HTML stream")] - public static readonly Guid MFMediaType_HTML = new Guid("72178c24-e45b-11d5-bc2a-00b0d0f3f4ab"); - /// - /// Binary stream. - /// - [FieldDescription("Binary stream")] - public static readonly Guid MFMediaType_Binary = new Guid("72178c25-e45b-11d5-bc2a-00b0d0f3f4ab"); - /// - /// A stream that contains data files. - /// - [FieldDescription("File transfer")] - public static readonly Guid MFMediaType_FileTransfer = new Guid("72178c26-e45b-11d5-bc2a-00b0d0f3f4ab"); - } -} diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaTypes.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaTypes.cs.meta deleted file mode 100644 index a374ec2..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/MediaTypes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8fdafc6cb718510479bde24c2cdb4633 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_ENUM_FLAG.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_ENUM_FLAG.cs deleted file mode 100644 index 3fdd1ba..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_ENUM_FLAG.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; - -namespace NAudio.MediaFoundation -{ - /// - /// Contains flags for registering and enumeration Media Foundation transforms (MFTs). - /// - [Flags] - public enum _MFT_ENUM_FLAG - { - /// - /// None - /// - None = 0, - /// - /// The MFT performs synchronous data processing in software. - /// - MFT_ENUM_FLAG_SYNCMFT = 0x00000001, - /// - /// The MFT performs asynchronous data processing in software. - /// - MFT_ENUM_FLAG_ASYNCMFT = 0x00000002, - /// - /// The MFT performs hardware-based data processing, using either the AVStream driver or a GPU-based proxy MFT. - /// - MFT_ENUM_FLAG_HARDWARE = 0x00000004, - /// - /// The MFT that must be unlocked by the application before use. - /// - MFT_ENUM_FLAG_FIELDOFUSE = 0x00000008, - /// - /// For enumeration, include MFTs that were registered in the caller's process. - /// - MFT_ENUM_FLAG_LOCALMFT = 0x00000010, - /// - /// The MFT is optimized for transcoding rather than playback. - /// - MFT_ENUM_FLAG_TRANSCODE_ONLY = 0x00000020, - /// - /// For enumeration, sort and filter the results. - /// - MFT_ENUM_FLAG_SORTANDFILTER = 0x00000040, - /// - /// Bitwise OR of all the flags, excluding MFT_ENUM_FLAG_SORTANDFILTER. - /// - MFT_ENUM_FLAG_ALL = 0x0000003F - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_ENUM_FLAG.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_ENUM_FLAG.cs.meta deleted file mode 100644 index 81c6f31..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_ENUM_FLAG.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2361f9e2cd1159944a7957633ba4a0fa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STATUS_FLAGS.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STATUS_FLAGS.cs deleted file mode 100644 index 1e866b1..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STATUS_FLAGS.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -namespace NAudio.MediaFoundation -{ - /// - /// Indicates the status of an input stream on a Media Foundation transform (MFT). - /// - [Flags] - public enum _MFT_INPUT_STATUS_FLAGS - { - /// - /// None - /// - None = 0, - /// - /// The input stream can receive more data at this time. - /// - MFT_INPUT_STATUS_ACCEPT_DATA = 0x00000001 - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STATUS_FLAGS.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STATUS_FLAGS.cs.meta deleted file mode 100644 index 5c06c11..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STATUS_FLAGS.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eb35ff913b4fafc4bbd85f8c3fe0969c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STREAM_INFO_FLAGS.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STREAM_INFO_FLAGS.cs deleted file mode 100644 index 3f028a6..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STREAM_INFO_FLAGS.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; - -namespace NAudio.MediaFoundation -{ - /// - /// Describes an input stream on a Media Foundation transform (MFT). - /// - [Flags] - public enum _MFT_INPUT_STREAM_INFO_FLAGS - { - /// - /// No flags set - /// - None = 0, - /// - /// Each media sample (IMFSample interface) of input data must contain complete, unbroken units of data. - /// - MFT_INPUT_STREAM_WHOLE_SAMPLES = 0x00000001, - /// - /// Each media sample that the client provides as input must contain exactly one unit of data, as defined for the MFT_INPUT_STREAM_WHOLE_SAMPLES flag. - /// - MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER = 0x00000002, - /// - /// All input samples must be the same size. - /// - MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE = 0x00000004, - /// - /// MTF Input Stream Holds buffers - /// - MFT_INPUT_STREAM_HOLDS_BUFFERS = 0x00000008, - /// - /// The MFT does not hold input samples after the IMFTransform::ProcessInput method returns. - /// - MFT_INPUT_STREAM_DOES_NOT_ADDREF = 0x00000100, - /// - /// This input stream can be removed by calling IMFTransform::DeleteInputStream. - /// - MFT_INPUT_STREAM_REMOVABLE = 0x00000200, - /// - /// This input stream is optional. - /// - MFT_INPUT_STREAM_OPTIONAL = 0x00000400, - /// - /// The MFT can perform in-place processing. - /// - MFT_INPUT_STREAM_PROCESSES_IN_PLACE = 0x00000800 - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STREAM_INFO_FLAGS.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STREAM_INFO_FLAGS.cs.meta deleted file mode 100644 index 8d8ded3..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_INPUT_STREAM_INFO_FLAGS.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2bbe1cba39ce587458a5cb69e19180c5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs deleted file mode 100644 index 16a9ff7..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; - -namespace NAudio.MediaFoundation -{ - /// - /// Defines flags for the IMFTransform::ProcessOutput method. - /// - [Flags] - public enum _MFT_OUTPUT_DATA_BUFFER_FLAGS - { - /// - /// None - /// - None = 0, - /// - /// The MFT can still generate output from this stream without receiving any more input. - /// - MFT_OUTPUT_DATA_BUFFER_INCOMPLETE = 0x01000000, - /// - /// The format has changed on this output stream, or there is a new preferred format for this stream. - /// - MFT_OUTPUT_DATA_BUFFER_FORMAT_CHANGE = 0x00000100, - /// - /// The MFT has removed this output stream. - /// - MFT_OUTPUT_DATA_BUFFER_STREAM_END = 0x00000200, - /// - /// There is no sample ready for this stream. - /// - MFT_OUTPUT_DATA_BUFFER_NO_SAMPLE = 0x00000300 - - }; -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs.meta deleted file mode 100644 index 27e1dc7..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bca0930780bbc634db7a5259fb96e86d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STATUS_FLAGS.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STATUS_FLAGS.cs deleted file mode 100644 index 0a87028..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STATUS_FLAGS.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -namespace NAudio.MediaFoundation -{ - /// - /// Indicates whether a Media Foundation transform (MFT) can produce output data. - /// - [Flags] - public enum _MFT_OUTPUT_STATUS_FLAGS - { - /// - /// None - /// - None = 0, - /// - /// There is a sample available for at least one output stream. - /// - MFT_OUTPUT_STATUS_SAMPLE_READY = 0x00000001 - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STATUS_FLAGS.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STATUS_FLAGS.cs.meta deleted file mode 100644 index 7042e54..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STATUS_FLAGS.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 24e6f4b89d3cedf49b7b6273f5133208 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STREAM_INFO_FLAGS.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STREAM_INFO_FLAGS.cs deleted file mode 100644 index 144d3b4..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STREAM_INFO_FLAGS.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; - -namespace NAudio.MediaFoundation -{ - /// - /// Describes an output stream on a Media Foundation transform (MFT). - /// - [Flags] - public enum _MFT_OUTPUT_STREAM_INFO_FLAGS - { - /// - /// No flags set - /// - None = 0, - /// - /// Each media sample (IMFSample interface) of output data from the MFT contains complete, unbroken units of data. - /// - MFT_OUTPUT_STREAM_WHOLE_SAMPLES = 0x00000001, - /// - /// Each output sample contains exactly one unit of data, as defined for the MFT_OUTPUT_STREAM_WHOLE_SAMPLES flag. - /// - MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER = 0x00000002, - /// - /// All output samples are the same size. - /// - MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE = 0x00000004, - /// - /// The MFT can discard the output data from this output stream, if requested by the client. - /// - MFT_OUTPUT_STREAM_DISCARDABLE = 0x00000008, - /// - /// This output stream is optional. - /// - MFT_OUTPUT_STREAM_OPTIONAL = 0x00000010, - /// - /// The MFT provides the output samples for this stream, either by allocating them internally or by operating directly on the input samples. - /// - MFT_OUTPUT_STREAM_PROVIDES_SAMPLES = 0x00000100, - /// - /// The MFT can either provide output samples for this stream or it can use samples that the client allocates. - /// - MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES = 0x00000200, - /// - /// The MFT does not require the client to process the output for this stream. - /// - MFT_OUTPUT_STREAM_LAZY_READ = 0x00000400, - /// - /// The MFT might remove this output stream during streaming. - /// - MFT_OUTPUT_STREAM_REMOVABLE = 0x00000800 - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STREAM_INFO_FLAGS.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STREAM_INFO_FLAGS.cs.meta deleted file mode 100644 index da95755..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_OUTPUT_STREAM_INFO_FLAGS.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b576d3fc6d4aabd4db0fc3f59157b987 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_FLAGS.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_FLAGS.cs deleted file mode 100644 index dd3dace..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_FLAGS.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace NAudio.MediaFoundation -{ - /// - /// Defines flags for processing output samples in a Media Foundation transform (MFT). - /// - [Flags] - public enum _MFT_PROCESS_OUTPUT_FLAGS - { - /// - /// None - /// - None, - /// - /// Do not produce output for streams in which the pSample member of the MFT_OUTPUT_DATA_BUFFER structure is NULL. - /// - MFT_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER = 0x00000001, - /// - /// Regenerates the last output sample. - /// - MFT_PROCESS_OUTPUT_REGENERATE_LAST_OUTPUT = 0x00000002 - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_FLAGS.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_FLAGS.cs.meta deleted file mode 100644 index 8fd691b..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_FLAGS.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 92f2bf074ada0f943ad49bbf0c329375 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_STATUS.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_STATUS.cs deleted file mode 100644 index 40a8193..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_STATUS.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -namespace NAudio.MediaFoundation -{ - /// - /// Process Output Status flags - /// - [Flags] - public enum _MFT_PROCESS_OUTPUT_STATUS - { - /// - /// None - /// - None = 0, - /// - /// The Media Foundation transform (MFT) has created one or more new output streams. - /// - MFT_PROCESS_OUTPUT_STATUS_NEW_STREAMS = 0x00000100 - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_STATUS.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_STATUS.cs.meta deleted file mode 100644 index 5553681..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_STATUS.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 586c82607f05b0a42b5bc0c4e6ca33b5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_SET_TYPE_FLAGS.cs b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_SET_TYPE_FLAGS.cs deleted file mode 100644 index 60a5a73..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_SET_TYPE_FLAGS.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -namespace NAudio.MediaFoundation -{ - /// - /// Defines flags for the setting or testing the media type on a Media Foundation transform (MFT). - /// - [Flags] - public enum _MFT_SET_TYPE_FLAGS - { - /// - /// None - /// - None = 0, - /// - /// Test the proposed media type, but do not set it. - /// - MFT_SET_TYPE_TEST_ONLY = 0x00000001 - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_SET_TYPE_FLAGS.cs.meta b/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_SET_TYPE_FLAGS.cs.meta deleted file mode 100644 index ae1bd45..0000000 --- a/Assets/Scripts/Audio/NAudio/MediaFoundation/_MFT_SET_TYPE_FLAGS.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 87f30c3a92244b34f8589f2791e3e4c7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi.meta b/Assets/Scripts/Audio/NAudio/Midi.meta deleted file mode 100644 index a3d6ad2..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4932560a9d2450448b55d6d6e6c51411 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/ChannelAfterTouchEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/ChannelAfterTouchEvent.cs deleted file mode 100644 index 264ac15..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/ChannelAfterTouchEvent.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI Channel AfterTouch Event. - /// - public class ChannelAfterTouchEvent : MidiEvent - { - private byte afterTouchPressure; - - /// - /// Creates a new ChannelAfterTouchEvent from raw MIDI data - /// - /// A binary reader - public ChannelAfterTouchEvent(BinaryReader br) - { - afterTouchPressure = br.ReadByte(); - if ((afterTouchPressure & 0x80) != 0) - { - // TODO: might be a follow-on - throw new FormatException("Invalid afterTouchPressure"); - } - } - - /// - /// Creates a new Channel After-Touch Event - /// - /// Absolute time - /// Channel - /// After-touch pressure - public ChannelAfterTouchEvent(long absoluteTime, int channel, int afterTouchPressure) - : base(absoluteTime, channel, MidiCommandCode.ChannelAfterTouch) - { - AfterTouchPressure = afterTouchPressure; - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write(afterTouchPressure); - } - - /// - /// The aftertouch pressure value - /// - public int AfterTouchPressure - { - get { return afterTouchPressure; } - set - { - if (value < 0 || value > 127) - { - throw new ArgumentOutOfRangeException("value", "After touch pressure must be in the range 0-127"); - } - afterTouchPressure = (byte) value; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/ChannelAfterTouchEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/ChannelAfterTouchEvent.cs.meta deleted file mode 100644 index eae3a5a..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/ChannelAfterTouchEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1127df682501d8140aa7b114ab1c3909 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/ControlChangeEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/ControlChangeEvent.cs deleted file mode 100644 index 14ee12f..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/ControlChangeEvent.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI control change event - /// - public class ControlChangeEvent : MidiEvent - { - private MidiController controller; - private byte controllerValue; - - /// - /// Reads a control change event from a MIDI stream - /// - /// Binary reader on the MIDI stream - public ControlChangeEvent(BinaryReader br) - { - byte c = br.ReadByte(); - controllerValue = br.ReadByte(); - if((c & 0x80) != 0) - { - // TODO: might be a follow-on - throw new InvalidDataException("Invalid controller"); - } - controller = (MidiController) c; - if((controllerValue & 0x80) != 0) - { - throw new InvalidDataException(String.Format("Invalid controllerValue {0} for controller {1}, Pos 0x{2:X}", controllerValue, controller, br.BaseStream.Position)); - } - } - - /// - /// Creates a control change event - /// - /// Time - /// MIDI Channel Number - /// The MIDI Controller - /// Controller value - public ControlChangeEvent(long absoluteTime, int channel, MidiController controller, int controllerValue) - : base(absoluteTime,channel,MidiCommandCode.ControlChange) - { - this.Controller = controller; - this.ControllerValue = controllerValue; - } - - /// - /// Describes this control change event - /// - /// A string describing this event - public override string ToString() - { - return String.Format("{0} Controller {1} Value {2}", - base.ToString(), - this.controller, - this.controllerValue); - } - - /// - /// - /// - public override int GetAsShortMessage() - { - byte c = (byte)controller; - return base.GetAsShortMessage() + (c << 8) + (controllerValue << 16); - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write((byte)controller); - writer.Write((byte)controllerValue); - } - - /// - /// The controller number - /// - public MidiController Controller - { - get - { - return controller; - } - set - { - if ((int) value < 0 || (int) value > 127) - { - throw new ArgumentOutOfRangeException("value", "Controller number must be in the range 0-127"); - } - controller = value; - } - } - - /// - /// The controller value - /// - public int ControllerValue - { - get - { - return controllerValue; - } - set - { - if (value < 0 || value > 127) - { - throw new ArgumentOutOfRangeException("value", "Controller Value must be in the range 0-127"); - } - controllerValue = (byte) value; - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/ControlChangeEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/ControlChangeEvent.cs.meta deleted file mode 100644 index defcead..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/ControlChangeEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eb5f8b17fe2350e48a7259bbcca6a9a1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/KeySignatureEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/KeySignatureEvent.cs deleted file mode 100644 index 3983fd1..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/KeySignatureEvent.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI key signature event event - /// - public class KeySignatureEvent : MetaEvent - { - private byte sharpsFlats; - private byte majorMinor; - - /// - /// Reads a new track sequence number event from a MIDI stream - /// - /// The MIDI stream - /// the data length - public KeySignatureEvent(BinaryReader br, int length) - { - if (length != 2) - { - throw new FormatException("Invalid key signature length"); - } - sharpsFlats = br.ReadByte(); // sf=sharps/flats (-7=7 flats, 0=key of C,7=7 sharps) - majorMinor = br.ReadByte(); // mi=major/minor (0=major, 1=minor) } - } - - /// - /// Creates a new Key signature event with the specified data - /// - public KeySignatureEvent(int sharpsFlats, int majorMinor, long absoluteTime) - : base(MetaEventType.KeySignature, 2, absoluteTime) - { - this.sharpsFlats = (byte) sharpsFlats; - this.majorMinor = (byte) majorMinor; - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => (KeySignatureEvent)MemberwiseClone(); - - /// - /// Number of sharps or flats - /// - public int SharpsFlats - { - get - { - return sharpsFlats; - } - } - - /// - /// Major or Minor key - /// - public int MajorMinor - { - get - { - return majorMinor; - } - } - - /// - /// Describes this event - /// - /// String describing the event - public override string ToString() - { - return String.Format("{0} {1} {2}", base.ToString(), sharpsFlats, majorMinor); - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write(sharpsFlats); - writer.Write(majorMinor); - } - } -} - - - diff --git a/Assets/Scripts/Audio/NAudio/Midi/KeySignatureEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/KeySignatureEvent.cs.meta deleted file mode 100644 index 367cacf..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/KeySignatureEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 46fd25d8d74ce794ebf560992e1b4c7e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MetaEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/MetaEvent.cs deleted file mode 100644 index 67d07e3..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MetaEvent.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI meta event - /// - public class MetaEvent : MidiEvent - { - private MetaEventType metaEvent; - internal int metaDataLength; - - /// - /// Gets the type of this meta event - /// - public MetaEventType MetaEventType - { - get - { - return metaEvent; - } - } - - /// - /// Empty constructor - /// - protected MetaEvent() - { - } - - /// - /// Custom constructor for use by derived types, who will manage the data themselves - /// - /// Meta event type - /// Meta data length - /// Absolute time - public MetaEvent(MetaEventType metaEventType, int metaDataLength, long absoluteTime) - : base(absoluteTime,1,MidiCommandCode.MetaEvent) - { - this.metaEvent = metaEventType; - this.metaDataLength = metaDataLength; - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => new MetaEvent(metaEvent, metaDataLength, AbsoluteTime); - - /// - /// Reads a meta-event from a stream - /// - /// A binary reader based on the stream of MIDI data - /// A new MetaEvent object - public static MetaEvent ReadMetaEvent(BinaryReader br) - { - MetaEventType metaEvent = (MetaEventType) br.ReadByte(); - int length = ReadVarInt(br); - - MetaEvent me = new MetaEvent(); - switch(metaEvent) - { - case MetaEventType.TrackSequenceNumber: // Sets the track's sequence number. - me = new TrackSequenceNumberEvent(br,length); - break; - case MetaEventType.TextEvent: // Text event - case MetaEventType.Copyright: // Copyright - case MetaEventType.SequenceTrackName: // Sequence / Track Name - case MetaEventType.TrackInstrumentName: // Track instrument name - case MetaEventType.Lyric: // lyric - case MetaEventType.Marker: // marker - case MetaEventType.CuePoint: // cue point - case MetaEventType.ProgramName: - case MetaEventType.DeviceName: - me = new TextEvent(br,length); - break; - case MetaEventType.EndTrack: // This event must come at the end of each track - if(length != 0) - { - throw new FormatException("End track length"); - } - break; - case MetaEventType.SetTempo: // Set tempo - me = new TempoEvent(br,length); - break; - case MetaEventType.TimeSignature: // Time signature - me = new TimeSignatureEvent(br,length); - break; - case MetaEventType.KeySignature: // Key signature - me = new KeySignatureEvent(br, length); - break; - case MetaEventType.SequencerSpecific: // Sequencer specific information - me = new SequencerSpecificEvent(br, length); - break; - case MetaEventType.SmpteOffset: - me = new SmpteOffsetEvent(br, length); - break; - default: -//System.Windows.Forms.MessageBox.Show(String.Format("Unsupported MetaEvent {0} length {1} pos {2}",metaEvent,length,br.BaseStream.Position)); - var data = br.ReadBytes(length); - if (data.Length != length) - { - throw new FormatException("Failed to read metaevent's data fully"); - } - return new RawMetaEvent(metaEvent, default(long), data); - } - me.metaEvent = metaEvent; - me.metaDataLength = length; - - return me; - } - - /// - /// Describes this meta event - /// - public override string ToString() - { - return $"{AbsoluteTime} {metaEvent}"; - } - - /// - /// - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write((byte)metaEvent); - WriteVarInt(writer, metaDataLength); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/MetaEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MetaEvent.cs.meta deleted file mode 100644 index 87a52e2..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MetaEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eba9456f96cab9e439e04e257d5c5d55 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MetaEventType.cs b/Assets/Scripts/Audio/NAudio/Midi/MetaEventType.cs deleted file mode 100644 index 0462703..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MetaEventType.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; - -namespace NAudio.Midi -{ - /// - /// MIDI MetaEvent Type - /// - public enum MetaEventType : byte - { - /// Track sequence number - TrackSequenceNumber = 0x00, - /// Text event - TextEvent = 0x01, - /// Copyright - Copyright = 0x02, - /// Sequence track name - SequenceTrackName = 0x03, - /// Track instrument name - TrackInstrumentName = 0x04, - /// Lyric - Lyric = 0x05, - /// Marker - Marker = 0x06, - /// Cue point - CuePoint = 0x07, - /// Program (patch) name - ProgramName = 0x08, - /// Device (port) name - DeviceName = 0x09, - /// MIDI Channel (not official?) - MidiChannel = 0x20, - /// MIDI Port (not official?) - MidiPort = 0x21, - /// End track - EndTrack = 0x2F, - /// Set tempo - SetTempo = 0x51, - /// SMPTE offset - SmpteOffset = 0x54, - /// Time signature - TimeSignature = 0x58, - /// Key signature - KeySignature = 0x59, - /// Sequencer specific - SequencerSpecific = 0x7F, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/MetaEventType.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MetaEventType.cs.meta deleted file mode 100644 index f3c247f..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MetaEventType.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3a660d0b45487e847bd10ce7aa0fdb3d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiCommandCode.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiCommandCode.cs deleted file mode 100644 index 01cf8cc..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiCommandCode.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace NAudio.Midi -{ - /// - /// MIDI command codes - /// - public enum MidiCommandCode : byte - { - /// Note Off - NoteOff = 0x80, - /// Note On - NoteOn = 0x90, - /// Key After-touch - KeyAfterTouch = 0xA0, - /// Control change - ControlChange = 0xB0, - /// Patch change - PatchChange = 0xC0, - /// Channel after-touch - ChannelAfterTouch = 0xD0, - /// Pitch wheel change - PitchWheelChange = 0xE0, - /// Sysex message - Sysex = 0xF0, - /// Eox (comes at end of a sysex message) - Eox = 0xF7, - /// Timing clock (used when synchronization is required) - TimingClock = 0xF8, - /// Start sequence - StartSequence = 0xFA, - /// Continue sequence - ContinueSequence = 0xFB, - /// Stop sequence - StopSequence = 0xFC, - /// Auto-Sensing - AutoSensing = 0xFE, - /// Meta-event - MetaEvent = 0xFF, - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiCommandCode.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiCommandCode.cs.meta deleted file mode 100644 index fbe17c6..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiCommandCode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5b2c911fe9851e7468de94a649161032 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiController.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiController.cs deleted file mode 100644 index 516678f..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiController.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -namespace NAudio.Midi -{ - /// - /// MidiController enumeration - /// http://www.midi.org/techspecs/midimessages.php#3 - /// - public enum MidiController : byte - { - /// Bank Select (MSB) - BankSelect = 0, - /// Modulation (MSB) - Modulation = 1, - /// Breath Controller - BreathController = 2, - /// Foot controller (MSB) - FootController = 4, - /// Main volume - MainVolume = 7, - /// Pan - Pan = 10, - /// Expression - Expression = 11, - /// Bank Select LSB - BankSelectLsb = 32, - /// Sustain - Sustain = 64, - /// Portamento On/Off - Portamento = 65, - /// Sostenuto On/Off - Sostenuto = 66, - /// Soft Pedal On/Off - SoftPedal = 67, - /// Legato Footswitch - LegatoFootswitch = 68, - /// Reset all controllers - ResetAllControllers = 121, - /// All notes off - AllNotesOff = 123, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiController.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiController.cs.meta deleted file mode 100644 index 1386eb5..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0a4fa56f138c60f47b9fd44d2645178b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiEvent.cs deleted file mode 100644 index ee85042..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiEvent.cs +++ /dev/null @@ -1,399 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents an individual MIDI event - /// - public class MidiEvent : ICloneable - { - /// The MIDI command code - private MidiCommandCode commandCode; - private int channel; - private int deltaTime; - private long absoluteTime; - - /// - /// Creates a MidiEvent from a raw message received using - /// the MME MIDI In APIs - /// - /// The short MIDI message - /// A new MIDI Event - public static MidiEvent FromRawMessage(int rawMessage) - { - long absoluteTime = 0; - int b = rawMessage & 0xFF; - int data1 = (rawMessage >> 8) & 0xFF; - int data2 = (rawMessage >> 16) & 0xFF; - MidiCommandCode commandCode; - int channel = 1; - - if ((b & 0xF0) == 0xF0) - { - // both bytes are used for command code in this case - commandCode = (MidiCommandCode)b; - } - else - { - commandCode = (MidiCommandCode)(b & 0xF0); - channel = (b & 0x0F) + 1; - } - - MidiEvent me; - switch (commandCode) - { - case MidiCommandCode.NoteOn: - case MidiCommandCode.NoteOff: - case MidiCommandCode.KeyAfterTouch: - if (data2 > 0 && commandCode == MidiCommandCode.NoteOn) - { - me = new NoteOnEvent(absoluteTime, channel, data1, data2, 0); - } - else - { - me = new NoteEvent(absoluteTime, channel, commandCode, data1, data2); - } - break; - case MidiCommandCode.ControlChange: - me = new ControlChangeEvent(absoluteTime,channel,(MidiController)data1,data2); - break; - case MidiCommandCode.PatchChange: - me = new PatchChangeEvent(absoluteTime,channel,data1); - break; - case MidiCommandCode.ChannelAfterTouch: - me = new ChannelAfterTouchEvent(absoluteTime,channel,data1); - break; - case MidiCommandCode.PitchWheelChange: - me = new PitchWheelChangeEvent(absoluteTime, channel, data1 + (data2 << 7)); - break; - case MidiCommandCode.TimingClock: - case MidiCommandCode.StartSequence: - case MidiCommandCode.ContinueSequence: - case MidiCommandCode.StopSequence: - case MidiCommandCode.AutoSensing: - me = new MidiEvent(absoluteTime,channel,commandCode); - break; - case MidiCommandCode.MetaEvent: - case MidiCommandCode.Sysex: - default: - throw new FormatException(String.Format("Unsupported MIDI Command Code for Raw Message {0}", commandCode)); - } - return me; - - } - - /// - /// Constructs a MidiEvent from a BinaryStream - /// - /// The binary stream of MIDI data - /// The previous MIDI event (pass null for first event) - /// A new MidiEvent - public static MidiEvent ReadNextEvent(BinaryReader br, MidiEvent previous) - { - int deltaTime = MidiEvent.ReadVarInt(br); - MidiCommandCode commandCode; - int channel = 1; - byte b = br.ReadByte(); - if((b & 0x80) == 0) - { - // a running command - command & channel are same as previous - commandCode = previous.CommandCode; - channel = previous.Channel; - br.BaseStream.Position--; // need to push this back - } - else - { - if((b & 0xF0) == 0xF0) - { - // both bytes are used for command code in this case - commandCode = (MidiCommandCode) b; - } - else - { - commandCode = (MidiCommandCode) (b & 0xF0); - channel = (b & 0x0F) + 1; - } - } - - MidiEvent me; - switch(commandCode) - { - case MidiCommandCode.NoteOn: - me = new NoteOnEvent(br); - break; - case MidiCommandCode.NoteOff: - case MidiCommandCode.KeyAfterTouch: - me = new NoteEvent(br); - break; - case MidiCommandCode.ControlChange: - me = new ControlChangeEvent(br); - break; - case MidiCommandCode.PatchChange: - me = new PatchChangeEvent(br); - break; - case MidiCommandCode.ChannelAfterTouch: - me = new ChannelAfterTouchEvent(br); - break; - case MidiCommandCode.PitchWheelChange: - me = new PitchWheelChangeEvent(br); - break; - case MidiCommandCode.TimingClock: - case MidiCommandCode.StartSequence: - case MidiCommandCode.ContinueSequence: - case MidiCommandCode.StopSequence: - me = new MidiEvent(); - break; - case MidiCommandCode.Sysex: - me = SysexEvent.ReadSysexEvent(br); - break; - case MidiCommandCode.MetaEvent: - me = MetaEvent.ReadMetaEvent(br); - break; - default: - throw new FormatException(String.Format("Unsupported MIDI Command Code {0:X2}",(byte) commandCode)); - } - me.channel = channel; - me.deltaTime = deltaTime; - me.commandCode = commandCode; - return me; - } - - /// - /// Converts this MIDI event to a short message (32 bit integer) that - /// can be sent by the Windows MIDI out short message APIs - /// Cannot be implemented for all MIDI messages - /// - /// A short message - public virtual int GetAsShortMessage() - { - return (channel - 1) + (int)commandCode; - } - - /// - /// Default constructor - /// - protected MidiEvent() - { - } - - /// - /// Creates a MIDI event with specified parameters - /// - /// Absolute time of this event - /// MIDI channel number - /// MIDI command code - public MidiEvent(long absoluteTime, int channel, MidiCommandCode commandCode) - { - this.absoluteTime = absoluteTime; - this.Channel = channel; - this.commandCode = commandCode; - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public virtual MidiEvent Clone() => (MidiEvent)MemberwiseClone(); - - object ICloneable.Clone() => Clone(); - - /// - /// The MIDI Channel Number for this event (1-16) - /// - public virtual int Channel - { - get - { - return channel; - } - set - { - if ((value < 1) || (value > 16)) - { - throw new ArgumentOutOfRangeException("value", value, - String.Format("Channel must be 1-16 (Got {0})",value)); - } - channel = value; - } - } - - /// - /// The Delta time for this event - /// - public int DeltaTime - { - get - { - return deltaTime; - } - } - - /// - /// The absolute time for this event - /// - public long AbsoluteTime - { - get - { - return absoluteTime; - } - set - { - absoluteTime = value; - } - } - - /// - /// The command code for this event - /// - public MidiCommandCode CommandCode - { - get - { - return commandCode; - } - } - - /// - /// Whether this is a note off event - /// - public static bool IsNoteOff(MidiEvent midiEvent) - { - if (midiEvent != null) - { - if (midiEvent.CommandCode == MidiCommandCode.NoteOn) - { - NoteEvent ne = (NoteEvent)midiEvent; - return (ne.Velocity == 0); - } - return (midiEvent.CommandCode == MidiCommandCode.NoteOff); - } - return false; - } - - /// - /// Whether this is a note on event - /// - public static bool IsNoteOn(MidiEvent midiEvent) - { - if (midiEvent != null) - { - if (midiEvent.CommandCode == MidiCommandCode.NoteOn) - { - NoteEvent ne = (NoteEvent)midiEvent; - return (ne.Velocity > 0); - } - } - return false; - } - - /// - /// Determines if this is an end track event - /// - public static bool IsEndTrack(MidiEvent midiEvent) - { - if (midiEvent != null) - { - MetaEvent me = midiEvent as MetaEvent; - if (me != null) - { - return me.MetaEventType == MetaEventType.EndTrack; - } - } - return false; - } - - - /// - /// Displays a summary of the MIDI event - /// - /// A string containing a brief description of this MIDI event - public override string ToString() - { - if(commandCode >= MidiCommandCode.Sysex) - return String.Format("{0} {1}",absoluteTime,commandCode); - else - return String.Format("{0} {1} Ch: {2}", absoluteTime, commandCode, channel); - } - - /// - /// Utility function that can read a variable length integer from a binary stream - /// - /// The binary stream - /// The integer read - public static int ReadVarInt(BinaryReader br) - { - int value = 0; - byte b; - for(int n = 0; n < 4; n++) - { - b = br.ReadByte(); - value <<= 7; - value += (b & 0x7F); - if((b & 0x80) == 0) - { - return value; - } - } - throw new FormatException("Invalid Var Int"); - } - - /// - /// Writes a variable length integer to a binary stream - /// - /// Binary stream - /// The value to write - public static void WriteVarInt(BinaryWriter writer, int value) - { - if (value < 0) - { - throw new ArgumentOutOfRangeException("value", value, "Cannot write a negative Var Int"); - } - if (value > 0x0FFFFFFF) - { - throw new ArgumentOutOfRangeException("value", value, "Maximum allowed Var Int is 0x0FFFFFFF"); - } - - int n = 0; - byte[] buffer = new byte[4]; - do - { - buffer[n++] = (byte)(value & 0x7F); - value >>= 7; - } while (value > 0); - - while (n > 0) - { - n--; - if(n > 0) - writer.Write((byte) (buffer[n] | 0x80)); - else - writer.Write(buffer[n]); - } - } - - /// - /// Exports this MIDI event's data - /// Overriden in derived classes, but they should call this version - /// - /// Absolute time used to calculate delta. - /// Is updated ready for the next delta calculation - /// Stream to write to - public virtual void Export(ref long absoluteTime, BinaryWriter writer) - { - if (this.absoluteTime < absoluteTime) - { - throw new FormatException("Can't export unsorted MIDI events"); - } - WriteVarInt(writer,(int) (this.absoluteTime - absoluteTime)); - absoluteTime = this.absoluteTime; - int output = (int) commandCode; - if (commandCode != MidiCommandCode.MetaEvent) - { - output += (channel - 1); - } - writer.Write((byte)output); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiEvent.cs.meta deleted file mode 100644 index a7a40d4..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8022789019ece3041935aaad96953595 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiEventCollection.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiEventCollection.cs deleted file mode 100644 index a32cc8b..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiEventCollection.cs +++ /dev/null @@ -1,294 +0,0 @@ -using System; -using System.Collections.Generic; -using NAudio.Utils; - -namespace NAudio.Midi -{ - /// - /// A helper class to manage collection of MIDI events - /// It has the ability to organise them in tracks - /// - public class MidiEventCollection : IEnumerable> - { - private int midiFileType; - private readonly List> trackEvents; - - /// - /// Creates a new Midi Event collection - /// - /// Initial file type - /// Delta Ticks Per Quarter Note - public MidiEventCollection(int midiFileType, int deltaTicksPerQuarterNote) - { - this.midiFileType = midiFileType; - DeltaTicksPerQuarterNote = deltaTicksPerQuarterNote; - StartAbsoluteTime = 0; - trackEvents = new List>(); - } - - /// - /// The number of tracks - /// - public int Tracks => trackEvents.Count; - - /// - /// The absolute time that should be considered as time zero - /// Not directly used here, but useful for timeshifting applications - /// - public long StartAbsoluteTime { get; set; } - - /// - /// The number of ticks per quarter note - /// - public int DeltaTicksPerQuarterNote { get; } - - /// - /// Gets events on a specified track - /// - /// Track number - /// The list of events - public IList GetTrackEvents(int trackNumber) - { - return trackEvents[trackNumber]; - } - - /// - /// Gets events on a specific track - /// - /// Track number - /// The list of events - public IList this[int trackNumber] => trackEvents[trackNumber]; - - /// - /// Adds a new track - /// - /// The new track event list - public IList AddTrack() - { - return AddTrack(null); - } - - /// - /// Adds a new track - /// - /// Initial events to add to the new track - /// The new track event list - public IList AddTrack(IList initialEvents) - { - List events = new List(); - if (initialEvents != null) - { - events.AddRange(initialEvents); - } - trackEvents.Add(events); - return events; - } - - /// - /// Removes a track - /// - /// Track number to remove - public void RemoveTrack(int track) - { - trackEvents.RemoveAt(track); - } - - /// - /// Clears all events - /// - public void Clear() - { - trackEvents.Clear(); - } - - /// - /// The MIDI file type - /// - public int MidiFileType - { - get => midiFileType; - set - { - if (midiFileType != value) - { - // set MIDI file type before calling flatten or explode functions - midiFileType = value; - - if (value == 0) - { - FlattenToOneTrack(); - } - else - { - ExplodeToManyTracks(); - } - } - } - } - - /// - /// Adds an event to the appropriate track depending on file type - /// - /// The event to be added - /// The original (or desired) track number - /// When adding events in type 0 mode, the originalTrack parameter - /// is ignored. If in type 1 mode, it will use the original track number to - /// store the new events. If the original track was 0 and this is a channel based - /// event, it will create new tracks if necessary and put it on the track corresponding - /// to its channel number - public void AddEvent(MidiEvent midiEvent, int originalTrack) - { - if (midiFileType == 0) - { - EnsureTracks(1); - trackEvents[0].Add(midiEvent); - } - else - { - if(originalTrack == 0) - { - // if its a channel based event, lets move it off to - // a channel track of its own - switch (midiEvent.CommandCode) - { - case MidiCommandCode.NoteOff: - case MidiCommandCode.NoteOn: - case MidiCommandCode.KeyAfterTouch: - case MidiCommandCode.ControlChange: - case MidiCommandCode.PatchChange: - case MidiCommandCode.ChannelAfterTouch: - case MidiCommandCode.PitchWheelChange: - EnsureTracks(midiEvent.Channel + 1); - trackEvents[midiEvent.Channel].Add(midiEvent); - break; - default: - EnsureTracks(1); - trackEvents[0].Add(midiEvent); - break; - } - - } - else - { - // put it on the track it was originally on - EnsureTracks(originalTrack + 1); - trackEvents[originalTrack].Add(midiEvent); - } - } - } - - - private void EnsureTracks(int count) - { - for (int n = trackEvents.Count; n < count; n++) - { - trackEvents.Add(new List()); - } - } - - private void ExplodeToManyTracks() - { - IList originalList = trackEvents[0]; - Clear(); - foreach (MidiEvent midiEvent in originalList) - { - AddEvent(midiEvent, 0); - } - PrepareForExport(); - } - - private void FlattenToOneTrack() - { - bool eventsAdded = false; - for (int track = 1; track < trackEvents.Count; track++) - { - foreach (MidiEvent midiEvent in trackEvents[track]) - { - if (!MidiEvent.IsEndTrack(midiEvent)) - { - trackEvents[0].Add(midiEvent); - eventsAdded = true; - } - } - } - for (int track = trackEvents.Count - 1; track > 0; track--) - { - RemoveTrack(track); - } - if (eventsAdded) - { - PrepareForExport(); - } - } - - /// - /// Sorts, removes empty tracks and adds end track markers - /// - public void PrepareForExport() - { - var comparer = new MidiEventComparer(); - // 1. sort each track - foreach (var list in trackEvents) - { - MergeSort.Sort(list, comparer); - - // 2. remove all End track events except one at the very end - int index = 0; - while (index < list.Count - 1) - { - if(MidiEvent.IsEndTrack(list[index])) - { - list.RemoveAt(index); - } - else - { - index++; - } - } - } - - int track = 0; - // 3. remove empty tracks and add missing - while (track < trackEvents.Count) - { - var list = trackEvents[track]; - if (list.Count == 0) - { - RemoveTrack(track); - } - else - { - if(list.Count == 1 && MidiEvent.IsEndTrack(list[0])) - { - RemoveTrack(track); - } - else - { - if(!MidiEvent.IsEndTrack(list[list.Count-1])) - { - list.Add(new MetaEvent(MetaEventType.EndTrack, 0, list[list.Count - 1].AbsoluteTime)); - } - track++; - } - } - } - } - - /// - /// Gets an enumerator for the lists of track events - /// - public IEnumerator> GetEnumerator() - { - return trackEvents.GetEnumerator(); - - } - - /// - /// Gets an enumerator for the lists of track events - /// - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return trackEvents.GetEnumerator(); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiEventCollection.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiEventCollection.cs.meta deleted file mode 100644 index 51a6680..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiEventCollection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 82274417df782a145bb31c4164dcd337 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiEventComparer.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiEventComparer.cs deleted file mode 100644 index e27664d..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiEventComparer.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.IO; -using System.Text; -using System.Collections.Generic; - -namespace NAudio.Midi -{ - /// - /// Utility class for comparing MidiEvent objects - /// - public class MidiEventComparer : IComparer - { - #region IComparer Members - - /// - /// Compares two MidiEvents - /// Sorts by time, with EndTrack always sorted to the end - /// - public int Compare(MidiEvent x, MidiEvent y) - { - long xTime = x.AbsoluteTime; - long yTime = y.AbsoluteTime; - - if (xTime == yTime) - { - // sort meta events before note events, except end track - MetaEvent xMeta = x as MetaEvent; - MetaEvent yMeta = y as MetaEvent; - - if (xMeta != null) - { - if (xMeta.MetaEventType == MetaEventType.EndTrack) - xTime = Int64.MaxValue; - else - xTime = Int64.MinValue; - } - if (yMeta != null) - { - if (yMeta.MetaEventType == MetaEventType.EndTrack) - yTime = Int64.MaxValue; - else - yTime = Int64.MinValue; - } - } - return xTime.CompareTo(yTime); - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiEventComparer.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiEventComparer.cs.meta deleted file mode 100644 index 11bf3c6..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiEventComparer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b8bc816cae58f584fa650d321c4c7d8e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiFile.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiFile.cs deleted file mode 100644 index 279a7ce..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiFile.cs +++ /dev/null @@ -1,294 +0,0 @@ -using System; -using System.IO; -using System.Text; -using System.Collections.Generic; -using NAudio.Utils; - -namespace NAudio.Midi -{ - /// - /// Class able to read a MIDI file - /// - public class MidiFile - { - private readonly MidiEventCollection events; - private readonly ushort fileFormat; - //private ushort tracks; - private readonly ushort deltaTicksPerQuarterNote; - private readonly bool strictChecking; - - /// - /// Opens a MIDI file for reading - /// - /// Name of MIDI file - public MidiFile(string filename) - : this(filename,true) - { - } - - /// - /// MIDI File format - /// - public int FileFormat => fileFormat; - - /// - /// Opens a MIDI file for reading - /// - /// Name of MIDI file - /// If true will error on non-paired note events - public MidiFile(string filename, bool strictChecking) : - this(File.OpenRead(filename), strictChecking, true) - { - } - - /// - /// Opens a MIDI file stream for reading - /// - /// The input stream containing a MIDI file - /// If true will error on non-paired note events - public MidiFile(Stream inputStream, bool strictChecking) : - this(inputStream, strictChecking, false) - { - } - - private MidiFile(Stream inputStream, bool strictChecking, bool ownInputStream) - { - this.strictChecking = strictChecking; - - var br = new BinaryReader(inputStream); - try - { - string chunkHeader = Encoding.UTF8.GetString(br.ReadBytes(4)); - if(chunkHeader != "MThd") - { - throw new FormatException("Not a MIDI file - header chunk missing"); - } - uint chunkSize = SwapUInt32(br.ReadUInt32()); - - if(chunkSize != 6) - { - throw new FormatException("Unexpected header chunk length"); - } - // 0 = single track, 1 = multi-track synchronous, 2 = multi-track asynchronous - fileFormat = SwapUInt16(br.ReadUInt16()); - int tracks = SwapUInt16(br.ReadUInt16()); - deltaTicksPerQuarterNote = SwapUInt16(br.ReadUInt16()); - - events = new MidiEventCollection((fileFormat == 0) ? 0 : 1, deltaTicksPerQuarterNote); - for (int n = 0; n < tracks; n++) - { - events.AddTrack(); - } - - long absoluteTime = 0; - - for(int track = 0; track < tracks; track++) - { - if(fileFormat == 1) - { - absoluteTime = 0; - } - chunkHeader = Encoding.UTF8.GetString(br.ReadBytes(4)); - if(chunkHeader != "MTrk") - { - throw new FormatException("Invalid chunk header"); - } - chunkSize = SwapUInt32(br.ReadUInt32()); - - long startPos = br.BaseStream.Position; - MidiEvent me = null; - var outstandingNoteOns = new List(); - while(br.BaseStream.Position < startPos + chunkSize) - { - try - { - me = MidiEvent.ReadNextEvent(br, me); - } - catch (InvalidDataException) - { - if (strictChecking) throw; - continue; - } - catch (FormatException) - { - if (strictChecking) throw; - continue; - } - - absoluteTime += me.DeltaTime; - me.AbsoluteTime = absoluteTime; - events[track].Add(me); - if (me.CommandCode == MidiCommandCode.NoteOn) - { - var ne = (NoteEvent) me; - if(ne.Velocity > 0) - { - outstandingNoteOns.Add((NoteOnEvent) ne); - } - else - { - // don't remove the note offs, even though - // they are annoying - // events[track].Remove(me); - FindNoteOn(ne,outstandingNoteOns); - } - } - else if(me.CommandCode == MidiCommandCode.NoteOff) - { - FindNoteOn((NoteEvent) me,outstandingNoteOns); - } - else if(me.CommandCode == MidiCommandCode.MetaEvent) - { - MetaEvent metaEvent = (MetaEvent) me; - if(metaEvent.MetaEventType == MetaEventType.EndTrack) - { - //break; - // some dodgy MIDI files have an event after end track - if (strictChecking) - { - if (br.BaseStream.Position < startPos + chunkSize) - { - throw new FormatException( - $"End Track event was not the last MIDI event on track {track}"); - } - } - } - } - } - if(outstandingNoteOns.Count > 0) - { - if (strictChecking) - { - throw new FormatException( - $"Note ons without note offs {outstandingNoteOns.Count} (file format {fileFormat})"); - } - } - if(br.BaseStream.Position != startPos + chunkSize) - { - throw new FormatException($"Read too far {chunkSize}+{startPos}!={br.BaseStream.Position}"); - } - } - } - finally - { - if (ownInputStream) - br.Close(); - } - } - - /// - /// The collection of events in this MIDI file - /// - public MidiEventCollection Events => events; - - /// - /// Number of tracks in this MIDI file - /// - public int Tracks => events.Tracks; - - /// - /// Delta Ticks Per Quarter Note - /// - public int DeltaTicksPerQuarterNote => deltaTicksPerQuarterNote; - - private void FindNoteOn(NoteEvent offEvent, List outstandingNoteOns) - { - bool found = false; - foreach(NoteOnEvent noteOnEvent in outstandingNoteOns) - { - if ((noteOnEvent.Channel == offEvent.Channel) && (noteOnEvent.NoteNumber == offEvent.NoteNumber)) - { - noteOnEvent.OffEvent = offEvent; - outstandingNoteOns.Remove(noteOnEvent); - found = true; - break; - } - } - if(!found) - { - if (strictChecking) - { - throw new FormatException($"Got an off without an on {offEvent}"); - } - } - } - - private static uint SwapUInt32(uint i) - { - return ((i & 0xFF000000) >> 24) | ((i & 0x00FF0000) >> 8) | ((i & 0x0000FF00) << 8) | ((i & 0x000000FF) << 24); - } - - private static ushort SwapUInt16(ushort i) - { - return (ushort) (((i & 0xFF00) >> 8) | ((i & 0x00FF) << 8)); - } - - /// - /// Describes the MIDI file - /// - /// A string describing the MIDI file and its events - public override string ToString() - { - var sb = new StringBuilder(); - sb.AppendFormat("Format {0}, Tracks {1}, Delta Ticks Per Quarter Note {2}\r\n", - fileFormat,Tracks,deltaTicksPerQuarterNote); - for (var n = 0; n < Tracks; n++) - { - foreach (var midiEvent in events[n]) - { - sb.AppendFormat("{0}\r\n", midiEvent); - } - } - return sb.ToString(); - } - - /// - /// Exports a MIDI file - /// - /// Filename to export to - /// Events to export - public static void Export(string filename, MidiEventCollection events) - { - if (events.MidiFileType == 0 && events.Tracks > 1) - { - throw new ArgumentException("Can't export more than one track to a type 0 file"); - } - using (var writer = new BinaryWriter(File.Create(filename))) - { - writer.Write(Encoding.UTF8.GetBytes("MThd")); - writer.Write(SwapUInt32(6)); // chunk size - writer.Write(SwapUInt16((ushort)events.MidiFileType)); - writer.Write(SwapUInt16((ushort)events.Tracks)); - writer.Write(SwapUInt16((ushort)events.DeltaTicksPerQuarterNote)); - - for (int track = 0; track < events.Tracks; track++ ) - { - IList eventList = events[track]; - - writer.Write(Encoding.UTF8.GetBytes("MTrk")); - long trackSizePosition = writer.BaseStream.Position; - writer.Write(SwapUInt32(0)); - - long absoluteTime = events.StartAbsoluteTime; - - // use a stable sort to preserve ordering of MIDI events whose - // absolute times are the same - MergeSort.Sort(eventList, new MidiEventComparer()); - if (eventList.Count > 0) - { - System.Diagnostics.Debug.Assert(MidiEvent.IsEndTrack(eventList[eventList.Count - 1]), "Exporting a track with a missing end track"); - } - foreach (var midiEvent in eventList) - { - midiEvent.Export(ref absoluteTime, writer); - } - - uint trackChunkLength = (uint)(writer.BaseStream.Position - trackSizePosition) - 4; - writer.BaseStream.Position = trackSizePosition; - writer.Write(SwapUInt32(trackChunkLength)); - writer.BaseStream.Position += trackChunkLength; - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiFile.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiFile.cs.meta deleted file mode 100644 index 1601590..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiFile.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a8c68eadf978bfe4190fe03a1e928c16 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiIn.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiIn.cs deleted file mode 100644 index 3e8ab74..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiIn.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI in device - /// - public class MidiIn : IDisposable - { - private IntPtr hMidiIn = IntPtr.Zero; - private bool disposed = false; - private MidiInterop.MidiInCallback callback; - - /// - /// Called when a MIDI message is received - /// - public event EventHandler MessageReceived; - - /// - /// An invalid MIDI message - /// - public event EventHandler ErrorReceived; - - /// - /// Gets the number of MIDI input devices available in the system - /// - public static int NumberOfDevices - { - get - { - return MidiInterop.midiInGetNumDevs(); - } - } - - /// - /// Opens a specified MIDI in device - /// - /// The device number - public MidiIn(int deviceNo) - { - this.callback = new MidiInterop.MidiInCallback(Callback); - MmException.Try(MidiInterop.midiInOpen(out hMidiIn, (IntPtr) deviceNo,this.callback,IntPtr.Zero,MidiInterop.CALLBACK_FUNCTION),"midiInOpen"); - } - - /// - /// Closes this MIDI in device - /// - public void Close() - { - Dispose(); - } - - /// - /// Closes this MIDI in device - /// - public void Dispose() - { - GC.KeepAlive(callback); - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Start the MIDI in device - /// - public void Start() - { - MmException.Try(MidiInterop.midiInStart(hMidiIn), "midiInStart"); - } - - /// - /// Stop the MIDI in device - /// - public void Stop() - { - MmException.Try(MidiInterop.midiInStop(hMidiIn), "midiInStop"); - } - - /// - /// Reset the MIDI in device - /// - public void Reset() - { - MmException.Try(MidiInterop.midiInReset(hMidiIn), "midiInReset"); - } - - private void Callback(IntPtr midiInHandle, MidiInterop.MidiInMessage message, IntPtr userData, IntPtr messageParameter1, IntPtr messageParameter2) - { - switch(message) - { - case MidiInterop.MidiInMessage.Open: - // message Parameter 1 & 2 are not used - break; - case MidiInterop.MidiInMessage.Data: - // parameter 1 is packed MIDI message - // parameter 2 is milliseconds since MidiInStart - if (MessageReceived != null) - { - MessageReceived(this, new MidiInMessageEventArgs(messageParameter1.ToInt32(), messageParameter2.ToInt32())); - } - break; - case MidiInterop.MidiInMessage.Error: - // parameter 1 is invalid MIDI message - if (ErrorReceived != null) - { - ErrorReceived(this, new MidiInMessageEventArgs(messageParameter1.ToInt32(), messageParameter2.ToInt32())); - } - break; - case MidiInterop.MidiInMessage.Close: - // message Parameter 1 & 2 are not used - break; - case MidiInterop.MidiInMessage.LongData: - // parameter 1 is pointer to MIDI header - // parameter 2 is milliseconds since MidiInStart - break; - case MidiInterop.MidiInMessage.LongError: - // parameter 1 is pointer to MIDI header - // parameter 2 is milliseconds since MidiInStart - break; - case MidiInterop.MidiInMessage.MoreData: - // parameter 1 is packed MIDI message - // parameter 2 is milliseconds since MidiInStart - break; - } - } - - /// - /// Gets the MIDI in device info - /// - public static MidiInCapabilities DeviceInfo(int midiInDeviceNumber) - { - MidiInCapabilities caps = new MidiInCapabilities(); - int structSize = Marshal.SizeOf(caps); - MmException.Try(MidiInterop.midiInGetDevCaps((IntPtr)midiInDeviceNumber,out caps,structSize),"midiInGetDevCaps"); - return caps; - } - - /// - /// Closes the MIDI out device - /// - /// True if called from Dispose - protected virtual void Dispose(bool disposing) - { - if(!this.disposed) - { - //if(disposing) Components.Dispose(); - MidiInterop.midiInClose(hMidiIn); - } - disposed = true; - } - - /// - /// Cleanup - /// - ~MidiIn() - { - System.Diagnostics.Debug.Assert(false,"MIDI In was not finalised"); - Dispose(false); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiIn.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiIn.cs.meta deleted file mode 100644 index 1cb6567..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiIn.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0531953a522419046a0fe9601a6e5dba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiInCapabilities.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiInCapabilities.cs deleted file mode 100644 index 7374c4f..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiInCapabilities.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.Midi -{ - /// - /// MIDI In Device Capabilities - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - public struct MidiInCapabilities - { - /// - /// wMid - /// - UInt16 manufacturerId; - /// - /// wPid - /// - UInt16 productId; - /// - /// vDriverVersion - /// - UInt32 driverVersion; - /// - /// Product Name - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxProductNameLength)] - string productName; - /// - /// Support - Reserved - /// - Int32 support; - - private const int MaxProductNameLength = 32; - - /// - /// Gets the manufacturer of this device - /// - public Manufacturers Manufacturer - { - get - { - return (Manufacturers)manufacturerId; - } - } - - /// - /// Gets the product identifier (manufacturer specific) - /// - public int ProductId - { - get - { - return productId; - } - } - - /// - /// Gets the product name - /// - public string ProductName - { - get - { - return productName; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiInCapabilities.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiInCapabilities.cs.meta deleted file mode 100644 index 79da4c9..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiInCapabilities.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 745306f4052675d49888c4b100a950d6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiInMessageEventArgs.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiInMessageEventArgs.cs deleted file mode 100644 index 01da607..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiInMessageEventArgs.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; - -namespace NAudio.Midi -{ - /// - /// MIDI In Message Information - /// - public class MidiInMessageEventArgs : EventArgs - { - /// - /// Create a new MIDI In Message EventArgs - /// - /// - /// - public MidiInMessageEventArgs(int message, int timestamp) - { - this.RawMessage = message; - this.Timestamp = timestamp; - try - { - this.MidiEvent = MidiEvent.FromRawMessage(message); - } - catch (Exception) - { - // don't worry too much - might be an invalid message - } - } - - /// - /// The Raw message received from the MIDI In API - /// - public int RawMessage { get; private set; } - - /// - /// The raw message interpreted as a MidiEvent - /// - public MidiEvent MidiEvent { get; private set; } - - /// - /// The timestamp in milliseconds for this message - /// - public int Timestamp { get; private set; } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiInMessageEventArgs.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiInMessageEventArgs.cs.meta deleted file mode 100644 index 713a4d5..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiInMessageEventArgs.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4a9145bd0d9a8d043af60e456456ba0c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiInterop.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiInterop.cs deleted file mode 100644 index 7724337..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiInterop.cs +++ /dev/null @@ -1,277 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.Wave; - -namespace NAudio.Midi -{ - internal class MidiInterop - { - - public enum MidiInMessage - { - /// - /// MIM_OPEN - /// - Open = 0x3C1, - /// - /// MIM_CLOSE - /// - Close = 0x3C2, - /// - /// MIM_DATA - /// - Data = 0x3C3, - /// - /// MIM_LONGDATA - /// - LongData = 0x3C4, - /// - /// MIM_ERROR - /// - Error = 0x3C5, - /// - /// MIM_LONGERROR - /// - LongError = 0x3C6, - /// - /// MIM_MOREDATA - /// - MoreData = 0x3CC, - } - - - - public enum MidiOutMessage - { - /// - /// MOM_OPEN - /// - Open = 0x3C7, - /// - /// MOM_CLOSE - /// - Close = 0x3C8, - /// - /// MOM_DONE - /// - Done = 0x3C9 - } - - // http://msdn.microsoft.com/en-us/library/dd798460%28VS.85%29.aspx - public delegate void MidiInCallback(IntPtr midiInHandle, MidiInMessage message, IntPtr userData, IntPtr messageParameter1, IntPtr messageParameter2); - - // http://msdn.microsoft.com/en-us/library/dd798478%28VS.85%29.aspx - public delegate void MidiOutCallback(IntPtr midiInHandle, MidiOutMessage message, IntPtr userData, IntPtr messageParameter1, IntPtr messageParameter2); - - // http://msdn.microsoft.com/en-us/library/dd798446%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiConnect(IntPtr hMidiIn, IntPtr hMidiOut, IntPtr pReserved); - - // http://msdn.microsoft.com/en-us/library/dd798447%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiDisconnect(IntPtr hMidiIn, IntPtr hMidiOut, IntPtr pReserved); - - // http://msdn.microsoft.com/en-us/library/dd798450%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiInAddBuffer(IntPtr hMidiIn, [MarshalAs(UnmanagedType.Struct)] ref MIDIHDR lpMidiInHdr, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd798452%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiInClose(IntPtr hMidiIn); - - // http://msdn.microsoft.com/en-us/library/dd798453%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Auto)] - public static extern MmResult midiInGetDevCaps(IntPtr deviceId, out MidiInCapabilities capabilities, int size); - - // http://msdn.microsoft.com/en-us/library/dd798454%28VS.85%29.aspx - // TODO: review this, probably doesn't work - [DllImport("winmm.dll")] - public static extern MmResult midiInGetErrorText(int err, string lpText, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd798455%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiInGetID(IntPtr hMidiIn, out int lpuDeviceId); - - // http://msdn.microsoft.com/en-us/library/dd798456%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern int midiInGetNumDevs(); - - // http://msdn.microsoft.com/en-us/library/dd798457%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiInMessage(IntPtr hMidiIn, int msg, IntPtr dw1, IntPtr dw2); - - // http://msdn.microsoft.com/en-us/library/dd798458%28VS.85%29.aspx - [DllImport("winmm.dll", EntryPoint = "midiInOpen")] - public static extern MmResult midiInOpen(out IntPtr hMidiIn, IntPtr uDeviceID, MidiInCallback callback, IntPtr dwInstance, int dwFlags); - - // http://msdn.microsoft.com/en-us/library/dd798458%28VS.85%29.aspx - [DllImport("winmm.dll", EntryPoint = "midiInOpen")] - public static extern MmResult midiInOpenWindow(out IntPtr hMidiIn, IntPtr uDeviceID, IntPtr callbackWindowHandle, IntPtr dwInstance, int dwFlags); - - // http://msdn.microsoft.com/en-us/library/dd798459%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiInPrepareHeader(IntPtr hMidiIn, [MarshalAs(UnmanagedType.Struct)] ref MIDIHDR lpMidiInHdr, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd798461%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiInReset(IntPtr hMidiIn); - - // http://msdn.microsoft.com/en-us/library/dd798462%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiInStart(IntPtr hMidiIn); - - // http://msdn.microsoft.com/en-us/library/dd798463%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiInStop(IntPtr hMidiIn); - - // http://msdn.microsoft.com/en-us/library/dd798464%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiInUnprepareHeader(IntPtr hMidiIn, [MarshalAs(UnmanagedType.Struct)] ref MIDIHDR lpMidiInHdr, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd798465%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutCacheDrumPatches(IntPtr hMidiOut, int uPatch, IntPtr lpKeyArray, int uFlags); - - // http://msdn.microsoft.com/en-us/library/dd798466%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutCachePatches(IntPtr hMidiOut, int uBank, IntPtr lpPatchArray, int uFlags); - - // http://msdn.microsoft.com/en-us/library/dd798468%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutClose(IntPtr hMidiOut); - - // http://msdn.microsoft.com/en-us/library/dd798469%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Auto)] - public static extern MmResult midiOutGetDevCaps(IntPtr deviceNumber, out MidiOutCapabilities caps, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd798470%28VS.85%29.aspx - // TODO: review, probably doesn't work - [DllImport("winmm.dll")] - public static extern MmResult midiOutGetErrorText(IntPtr err, string lpText, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd798471%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutGetID(IntPtr hMidiOut, out int lpuDeviceID); - - // http://msdn.microsoft.com/en-us/library/dd798472%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern int midiOutGetNumDevs(); - - // http://msdn.microsoft.com/en-us/library/dd798473%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutGetVolume(IntPtr uDeviceID, ref int lpdwVolume); - - // http://msdn.microsoft.com/en-us/library/dd798474%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutLongMsg(IntPtr hMidiOut, [MarshalAs(UnmanagedType.Struct)] ref MIDIHDR lpMidiOutHdr, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd798475%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutMessage(IntPtr hMidiOut, int msg, IntPtr dw1, IntPtr dw2); - - // http://msdn.microsoft.com/en-us/library/dd798476%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutOpen(out IntPtr lphMidiOut, IntPtr uDeviceID, MidiOutCallback dwCallback, IntPtr dwInstance, int dwFlags); - - // http://msdn.microsoft.com/en-us/library/dd798477%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutPrepareHeader(IntPtr hMidiOut, [MarshalAs(UnmanagedType.Struct)] ref MIDIHDR lpMidiOutHdr, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd798479%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutReset(IntPtr hMidiOut); - - // http://msdn.microsoft.com/en-us/library/dd798480%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutSetVolume(IntPtr hMidiOut, int dwVolume); - - // http://msdn.microsoft.com/en-us/library/dd798481%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutShortMsg(IntPtr hMidiOut, int dwMsg); - - // http://msdn.microsoft.com/en-us/library/dd798482%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiOutUnprepareHeader(IntPtr hMidiOut, [MarshalAs(UnmanagedType.Struct)] ref MIDIHDR lpMidiOutHdr, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd798485%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiStreamClose(IntPtr hMidiStream); - - // http://msdn.microsoft.com/en-us/library/dd798486%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiStreamOpen(out IntPtr hMidiStream, IntPtr puDeviceID, int cMidi, IntPtr dwCallback, IntPtr dwInstance, int fdwOpen); - - // http://msdn.microsoft.com/en-us/library/dd798487%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiStreamOut(IntPtr hMidiStream, [MarshalAs(UnmanagedType.Struct)] ref MIDIHDR pmh, int cbmh); - - // http://msdn.microsoft.com/en-us/library/dd798488%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiStreamPause(IntPtr hMidiStream); - - // http://msdn.microsoft.com/en-us/library/dd798489%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiStreamPosition(IntPtr hMidiStream, [MarshalAs(UnmanagedType.Struct)] ref MMTIME lpmmt, int cbmmt); - - // http://msdn.microsoft.com/en-us/library/dd798490%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiStreamProperty(IntPtr hMidiStream, IntPtr lppropdata, int dwProperty); - - // http://msdn.microsoft.com/en-us/library/dd798491%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiStreamRestart(IntPtr hMidiStream); - - // http://msdn.microsoft.com/en-us/library/dd798492%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult midiStreamStop(IntPtr hMidiStream); - - // TODO: this is general MM interop - public const int CALLBACK_FUNCTION = 0x30000; - public const int CALLBACK_NULL = 0; - - // http://msdn.microsoft.com/en-us/library/dd757347%28VS.85%29.aspx - // TODO: not sure this is right - [StructLayout(LayoutKind.Sequential)] - public struct MMTIME - { - public int wType; - public int u; - } - - // TODO: check for ANSI strings in these structs - // TODO: check for WORD params - [StructLayout(LayoutKind.Sequential)] - public struct MIDIEVENT - { - public int dwDeltaTime; - public int dwStreamID; - public int dwEvent; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] - public int dwParms; - } - - // http://msdn.microsoft.com/en-us/library/dd798449%28VS.85%29.aspx - [StructLayout(LayoutKind.Sequential)] - public struct MIDIHDR - { - public IntPtr lpData; // LPSTR - public int dwBufferLength; // DWORD - public int dwBytesRecorded; // DWORD - public IntPtr dwUser; // DWORD_PTR - public int dwFlags; // DWORD - public IntPtr lpNext; // struct mididhdr_tag * - public IntPtr reserved; // DWORD_PTR - public int dwOffset; // DWORD - // n.b. MSDN documentation incorrect, see mmsystem.h - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public IntPtr[] dwReserved; // DWORD_PTR dwReserved[8] - } - - [StructLayout(LayoutKind.Sequential)] - public struct MIDIPROPTEMPO - { - public int cbStruct; - public int dwTempo; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiInterop.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiInterop.cs.meta deleted file mode 100644 index 86fef1b..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiInterop.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 27b430aced9c05749856a08c10f122aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiMessage.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiMessage.cs deleted file mode 100644 index 350bd8f..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiMessage.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI message - /// - public class MidiMessage - { - private int rawData; - - /// - /// Creates a new MIDI message - /// - /// Status - /// Data parameter 1 - /// Data parameter 2 - public MidiMessage(int status, int data1, int data2) - { - rawData = status + (data1 << 8) + (data2 << 16); - } - - /// - /// Creates a new MIDI message from a raw message - /// - /// A packed MIDI message from an MMIO function - public MidiMessage(int rawData) - { - this.rawData = rawData; - } - - /// - /// Creates a Note On message - /// - /// Note number (0 to 127) - /// Volume (0 to 127) - /// MIDI channel (1 to 16) - /// A new MidiMessage object - public static MidiMessage StartNote(int note, int volume, int channel) - { - ValidateNoteParameters(note, volume, channel); - return new MidiMessage((int)MidiCommandCode.NoteOn + channel - 1, note, volume); - } - - private static void ValidateNoteParameters(int note, int volume, int channel) - { - ValidateChannel(channel); - if (note < 0 || note > 127) - { - throw new ArgumentOutOfRangeException("note", "Note number must be in the range 0-127"); - } - if (volume < 0 || volume > 127) - { - throw new ArgumentOutOfRangeException("volume", "Velocity must be in the range 0-127"); - } - } - - private static void ValidateChannel(int channel) - { - if ((channel < 1) || (channel > 16)) - { - throw new ArgumentOutOfRangeException("channel", channel, - String.Format("Channel must be 1-16 (Got {0})", channel)); - } - } - - /// - /// Creates a Note Off message - /// - /// Note number - /// Volume - /// MIDI channel (1-16) - /// A new MidiMessage object - public static MidiMessage StopNote(int note, int volume, int channel) - { - ValidateNoteParameters(note, volume, channel); - return new MidiMessage((int)MidiCommandCode.NoteOff + channel - 1, note, volume); - } - - /// - /// Creates a patch change message - /// - /// The patch number - /// The MIDI channel number (1-16) - /// A new MidiMessageObject - public static MidiMessage ChangePatch(int patch, int channel) - { - ValidateChannel(channel); - return new MidiMessage((int)MidiCommandCode.PatchChange + channel - 1, patch, 0); - } - - /// - /// Creates a Control Change message - /// - /// The controller number to change - /// The value to set the controller to - /// The MIDI channel number (1-16) - /// A new MidiMessageObject - public static MidiMessage ChangeControl(int controller, int value, int channel) - { - ValidateChannel(channel); - return new MidiMessage((int)MidiCommandCode.ControlChange + channel - 1, controller, value); - } - - /// - /// Returns the raw MIDI message data - /// - public int RawData - { - get - { - return rawData; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiMessage.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiMessage.cs.meta deleted file mode 100644 index c6895f0..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiMessage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e21f34201dc1ff6419e0d6b257b341fd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiOut.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiOut.cs deleted file mode 100644 index b69f611..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiOut.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.Wave; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI out device - /// - public class MidiOut : IDisposable - { - private IntPtr hMidiOut = IntPtr.Zero; - private bool disposed = false; - MidiInterop.MidiOutCallback callback; - - /// - /// Gets the number of MIDI devices available in the system - /// - public static int NumberOfDevices - { - get - { - return MidiInterop.midiOutGetNumDevs(); - } - } - - /// - /// Gets the MIDI Out device info - /// - public static MidiOutCapabilities DeviceInfo(int midiOutDeviceNumber) - { - MidiOutCapabilities caps = new MidiOutCapabilities(); - int structSize = Marshal.SizeOf(caps); - MmException.Try(MidiInterop.midiOutGetDevCaps((IntPtr)midiOutDeviceNumber, out caps, structSize), "midiOutGetDevCaps"); - return caps; - } - - - /// - /// Opens a specified MIDI out device - /// - /// The device number - public MidiOut(int deviceNo) - { - this.callback = new MidiInterop.MidiOutCallback(Callback); - MmException.Try(MidiInterop.midiOutOpen(out hMidiOut, (IntPtr)deviceNo, callback, IntPtr.Zero, MidiInterop.CALLBACK_FUNCTION), "midiOutOpen"); - } - - /// - /// Closes this MIDI out device - /// - public void Close() - { - Dispose(); - } - - /// - /// Closes this MIDI out device - /// - public void Dispose() - { - GC.KeepAlive(callback); - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Gets or sets the volume for this MIDI out device - /// - public int Volume - { - // TODO: Volume can be accessed by device ID - get - { - int volume = 0; - MmException.Try(MidiInterop.midiOutGetVolume(hMidiOut,ref volume),"midiOutGetVolume"); - return volume; - } - set - { - MmException.Try(MidiInterop.midiOutSetVolume(hMidiOut,value),"midiOutSetVolume"); - } - } - - /// - /// Resets the MIDI out device - /// - public void Reset() - { - MmException.Try(MidiInterop.midiOutReset(hMidiOut),"midiOutReset"); - } - - /// - /// Sends a MIDI out message - /// - /// Message - /// Parameter 1 - /// Parameter 2 - public void SendDriverMessage(int message, int param1, int param2) - { - MmException.Try(MidiInterop.midiOutMessage(hMidiOut,message,(IntPtr)param1,(IntPtr)param2),"midiOutMessage"); - } - - /// - /// Sends a MIDI message to the MIDI out device - /// - /// The message to send - public void Send(int message) - { - MmException.Try(MidiInterop.midiOutShortMsg(hMidiOut,message),"midiOutShortMsg"); - } - - /// - /// Closes the MIDI out device - /// - /// True if called from Dispose - protected virtual void Dispose(bool disposing) - { - if(!this.disposed) - { - //if(disposing) Components.Dispose(); - MidiInterop.midiOutClose(hMidiOut); - } - disposed = true; - } - - private void Callback(IntPtr midiInHandle, MidiInterop.MidiOutMessage message, IntPtr userData, IntPtr messageParameter1, IntPtr messageParameter2) - { - } - - /// - /// Send a long message, for example sysex. - /// - /// The bytes to send. - public void SendBuffer(byte[] byteBuffer) - { - var header = new MidiInterop.MIDIHDR(); - header.lpData = Marshal.AllocHGlobal(byteBuffer.Length); - Marshal.Copy(byteBuffer, 0, header.lpData, byteBuffer.Length); - - header.dwBufferLength = byteBuffer.Length; - header.dwBytesRecorded = byteBuffer.Length; - int size = Marshal.SizeOf(header); - MidiInterop.midiOutPrepareHeader(this.hMidiOut, ref header, size); - var errcode = MidiInterop.midiOutLongMsg(this.hMidiOut, ref header, size); - if (errcode != MmResult.NoError) - { - MidiInterop.midiOutUnprepareHeader(this.hMidiOut, ref header, size); - } - Marshal.FreeHGlobal(header.lpData); - } - - /// - /// Cleanup - /// - ~MidiOut() - { - System.Diagnostics.Debug.Assert(false); - Dispose(false); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiOut.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiOut.cs.meta deleted file mode 100644 index a5f41d4..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiOut.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c5c1427d40301a74d8e049908578fbd4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiOutCapabilities.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiOutCapabilities.cs deleted file mode 100644 index 202d59d..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiOutCapabilities.cs +++ /dev/null @@ -1,181 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Midi -{ - /// - /// class representing the capabilities of a MIDI out device - /// MIDIOUTCAPS: http://msdn.microsoft.com/en-us/library/dd798467%28VS.85%29.aspx - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - public struct MidiOutCapabilities - { - Int16 manufacturerId; - Int16 productId; - int driverVersion; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxProductNameLength)] - string productName; - Int16 wTechnology; - Int16 wVoices; - Int16 wNotes; - UInt16 wChannelMask; - MidiOutCapabilityFlags dwSupport; - - const int MaxProductNameLength = 32; // max product name length (including NULL) - - [Flags] - enum MidiOutCapabilityFlags - { - /// - /// MIDICAPS_VOLUME - /// - Volume = 1, - /// - /// separate left-right volume control - /// MIDICAPS_LRVOLUME - /// - LeftRightVolume = 2, - /// - /// MIDICAPS_CACHE - /// - PatchCaching = 4, - /// - /// MIDICAPS_STREAM - /// driver supports midiStreamOut directly - /// - Stream = 8, - } - - /// - /// Gets the manufacturer of this device - /// - public Manufacturers Manufacturer - { - get - { - return (Manufacturers)manufacturerId; - } - } - - /// - /// Gets the product identifier (manufacturer specific) - /// - public short ProductId - { - get - { - return productId; - } - } - - /// - /// Gets the product name - /// - public String ProductName - { - get - { - return productName; - } - } - - /// - /// Returns the number of supported voices - /// - public int Voices - { - get - { - return wVoices; - } - } - - /// - /// Gets the polyphony of the device - /// - public int Notes - { - get - { - return wNotes; - } - } - - /// - /// Returns true if the device supports all channels - /// - public bool SupportsAllChannels - { - get - { - return wChannelMask == 0xFFFF; - } - } - - /// - /// Queries whether a particular channel is supported - /// - /// Channel number to test - /// True if the channel is supported - public bool SupportsChannel(int channel) - { - return (wChannelMask & (1 << (channel - 1))) > 0; - } - - /// - /// Returns true if the device supports patch caching - /// - public bool SupportsPatchCaching - { - get - { - return (dwSupport & MidiOutCapabilityFlags.PatchCaching) != 0; - } - } - - /// - /// Returns true if the device supports separate left and right volume - /// - public bool SupportsSeparateLeftAndRightVolume - { - get - { - return (dwSupport & MidiOutCapabilityFlags.LeftRightVolume) != 0; - } - } - - /// - /// Returns true if the device supports MIDI stream out - /// - public bool SupportsMidiStreamOut - { - get - { - return (dwSupport & MidiOutCapabilityFlags.Stream) != 0; - } - } - - /// - /// Returns true if the device supports volume control - /// - public bool SupportsVolumeControl - { - get - { - return (dwSupport & MidiOutCapabilityFlags.Volume) != 0; - } - } - - /// - /// Returns the type of technology used by this MIDI out device - /// - public MidiOutTechnology Technology - { - get - { - return (MidiOutTechnology)wTechnology; - } - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiOutCapabilities.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiOutCapabilities.cs.meta deleted file mode 100644 index 43ac96c..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiOutCapabilities.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d31ad2f84474d194d9333260968cae3e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiOutTechnology.cs b/Assets/Scripts/Audio/NAudio/Midi/MidiOutTechnology.cs deleted file mode 100644 index 82d6693..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiOutTechnology.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; - -namespace NAudio.Midi -{ - /// - /// Represents the different types of technology used by a MIDI out device - /// - /// from mmsystem.h - public enum MidiOutTechnology - { - /// The device is a MIDI port - MidiPort = 1, - /// The device is a MIDI synth - Synth = 2, - /// The device is a square wave synth - SquareWaveSynth = 3, - /// The device is an FM synth - FMSynth = 4, - /// The device is a MIDI mapper - MidiMapper = 5, - /// The device is a WaveTable synth - WaveTableSynth = 6, - /// The device is a software synth - SoftwareSynth = 7 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/MidiOutTechnology.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/MidiOutTechnology.cs.meta deleted file mode 100644 index d485424..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/MidiOutTechnology.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5067b48571b3a4a47b85e5d3c1113ac1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/NoteEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/NoteEvent.cs deleted file mode 100644 index a329a0a..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/NoteEvent.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a note MIDI event - /// - public class NoteEvent : MidiEvent - { - private int noteNumber; - private int velocity; - - /// - /// Reads a NoteEvent from a stream of MIDI data - /// - /// Binary Reader for the stream - public NoteEvent(BinaryReader br) - { - NoteNumber = br.ReadByte(); - velocity = br.ReadByte(); - // it seems it is possible for cubase - // to output some notes with a NoteOff velocity > 127 - if (velocity > 127) - { - velocity = 127; - } - } - - /// - /// Creates a MIDI Note Event with specified parameters - /// - /// Absolute time of this event - /// MIDI channel number - /// MIDI command code - /// MIDI Note Number - /// MIDI Note Velocity - public NoteEvent(long absoluteTime, int channel, MidiCommandCode commandCode, int noteNumber, int velocity) - : base(absoluteTime, channel, commandCode) - { - this.NoteNumber = noteNumber; - this.Velocity = velocity; - } - - private static readonly string[] NoteNames = new string[] { "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" }; - - /// - /// - /// - public override int GetAsShortMessage() - { - return base.GetAsShortMessage() + (noteNumber << 8) + (velocity << 16); - } - - /// - /// The MIDI note number - /// - public virtual int NoteNumber - { - get - { - return noteNumber; - } - set - { - if (value < 0 || value > 127) - { - throw new ArgumentOutOfRangeException("value", "Note number must be in the range 0-127"); - } - noteNumber = value; - } - } - - /// - /// The note velocity - /// - public int Velocity - { - get - { - return velocity; - } - set - { - if (value < 0 || value > 127) - { - throw new ArgumentOutOfRangeException("value", "Velocity must be in the range 0-127"); - } - velocity = value; - } - } - - /// - /// The note name - /// - public string NoteName - { - get - { - if ((Channel == 16) || (Channel == 10)) - { - switch (noteNumber) - { - case 35: return "Acoustic Bass Drum"; - case 36: return "Bass Drum 1"; - case 37: return "Side Stick"; - case 38: return "Acoustic Snare"; - case 39: return "Hand Clap"; - case 40: return "Electric Snare"; - case 41: return "Low Floor Tom"; - case 42: return "Closed Hi-Hat"; - case 43: return "High Floor Tom"; - case 44: return "Pedal Hi-Hat"; - case 45: return "Low Tom"; - case 46: return "Open Hi-Hat"; - case 47: return "Low-Mid Tom"; - case 48: return "Hi-Mid Tom"; - case 49: return "Crash Cymbal 1"; - case 50: return "High Tom"; - case 51: return "Ride Cymbal 1"; - case 52: return "Chinese Cymbal"; - case 53: return "Ride Bell"; - case 54: return "Tambourine"; - case 55: return "Splash Cymbal"; - case 56: return "Cowbell"; - case 57: return "Crash Cymbal 2"; - case 58: return "Vibraslap"; - case 59: return "Ride Cymbal 2"; - case 60: return "Hi Bongo"; - case 61: return "Low Bongo"; - case 62: return "Mute Hi Conga"; - case 63: return "Open Hi Conga"; - case 64: return "Low Conga"; - case 65: return "High Timbale"; - case 66: return "Low Timbale"; - case 67: return "High Agogo"; - case 68: return "Low Agogo"; - case 69: return "Cabasa"; - case 70: return "Maracas"; - case 71: return "Short Whistle"; - case 72: return "Long Whistle"; - case 73: return "Short Guiro"; - case 74: return "Long Guiro"; - case 75: return "Claves"; - case 76: return "Hi Wood Block"; - case 77: return "Low Wood Block"; - case 78: return "Mute Cuica"; - case 79: return "Open Cuica"; - case 80: return "Mute Triangle"; - case 81: return "Open Triangle"; - default: return String.Format("Drum {0}", noteNumber); - } - } - else - { - int octave = noteNumber / 12; - return String.Format("{0}{1}", NoteNames[noteNumber % 12], octave); - } - } - } - - /// - /// Describes the Note Event - /// - /// Note event as a string - public override string ToString() - { - return String.Format("{0} {1} Vel:{2}", - base.ToString(), - this.NoteName, - this.Velocity); - } - - /// - /// - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write((byte)noteNumber); - writer.Write((byte)velocity); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/NoteEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/NoteEvent.cs.meta deleted file mode 100644 index 16c5e34..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/NoteEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c38c98c63f2216e47b108ff3a48d910e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/NoteOnEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/NoteOnEvent.cs deleted file mode 100644 index 6f181df..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/NoteOnEvent.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI note on event - /// - public class NoteOnEvent : NoteEvent - { - private NoteEvent offEvent; - - /// - /// Reads a new Note On event from a stream of MIDI data - /// - /// Binary reader on the MIDI data stream - public NoteOnEvent(BinaryReader br) - : base(br) - { - } - - /// - /// Creates a NoteOn event with specified parameters - /// - /// Absolute time of this event - /// MIDI channel number - /// MIDI note number - /// MIDI note velocity - /// MIDI note duration - public NoteOnEvent(long absoluteTime, int channel, int noteNumber, - int velocity, int duration) - : base(absoluteTime, channel, MidiCommandCode.NoteOn, noteNumber, velocity) - { - this.OffEvent = new NoteEvent(absoluteTime, channel, MidiCommandCode.NoteOff, - noteNumber, 0); - NoteLength = duration; - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => new NoteOnEvent(AbsoluteTime, Channel, NoteNumber, Velocity, NoteLength); - - /// - /// The associated Note off event - /// - public NoteEvent OffEvent - { - get - { - return offEvent; - } - set - { - if (!MidiEvent.IsNoteOff(value)) - { - throw new ArgumentException("OffEvent must be a valid MIDI note off event"); - } - if (value.NoteNumber != this.NoteNumber) - { - throw new ArgumentException("Note Off Event must be for the same note number"); - } - if (value.Channel != this.Channel) - { - throw new ArgumentException("Note Off Event must be for the same channel"); - } - offEvent = value; - - } - } - - /// - /// Get or set the Note Number, updating the off event at the same time - /// - public override int NoteNumber - { - get - { - return base.NoteNumber; - } - set - { - base.NoteNumber = value; - if (OffEvent != null) - { - OffEvent.NoteNumber = NoteNumber; - } - } - } - - /// - /// Get or set the channel, updating the off event at the same time - /// - public override int Channel - { - get - { - return base.Channel; - } - set - { - base.Channel = value; - if (OffEvent != null) - { - OffEvent.Channel = Channel; - } - } - } - - /// - /// The duration of this note - /// - /// - /// There must be a note off event - /// - public int NoteLength - { - get - { - return (int)(offEvent.AbsoluteTime - this.AbsoluteTime); - } - set - { - if (value < 0) - { - throw new ArgumentException("NoteLength must be 0 or greater"); - } - offEvent.AbsoluteTime = this.AbsoluteTime + value; - } - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override string ToString() - { - if ((this.Velocity == 0) && (OffEvent == null)) - { - return String.Format("{0} (Note Off)", - base.ToString()); - } - return String.Format("{0} Len: {1}", - base.ToString(), - (this.OffEvent == null) ? "?" : this.NoteLength.ToString()); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/NoteOnEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/NoteOnEvent.cs.meta deleted file mode 100644 index f91df9c..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/NoteOnEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e0510595f6d2b8046b6a04824dfc0eb6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/PatchChangeEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/PatchChangeEvent.cs deleted file mode 100644 index 56956e2..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/PatchChangeEvent.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI patch change event - /// - public class PatchChangeEvent : MidiEvent - { - private byte patch; - - /// - /// Gets the default MIDI instrument names - /// - public static string GetPatchName(int patchNumber) - { - return patchNames[patchNumber]; - } - - // TODO: localize - private static readonly string[] patchNames = new string[] - { - "Acoustic Grand","Bright Acoustic","Electric Grand","Honky-Tonk","Electric Piano 1","Electric Piano 2","Harpsichord","Clav", - "Celesta","Glockenspiel","Music Box","Vibraphone","Marimba","Xylophone","Tubular Bells","Dulcimer", - "Drawbar Organ","Percussive Organ","Rock Organ","Church Organ","Reed Organ","Accoridan","Harmonica","Tango Accordian", - "Acoustic Guitar(nylon)","Acoustic Guitar(steel)","Electric Guitar(jazz)","Electric Guitar(clean)","Electric Guitar(muted)","Overdriven Guitar","Distortion Guitar","Guitar Harmonics", - "Acoustic Bass","Electric Bass(finger)","Electric Bass(pick)","Fretless Bass","Slap Bass 1","Slap Bass 2","Synth Bass 1","Synth Bass 2", - "Violin","Viola","Cello","Contrabass","Tremolo Strings","Pizzicato Strings","Orchestral Strings","Timpani", - "String Ensemble 1","String Ensemble 2","SynthStrings 1","SynthStrings 2","Choir Aahs","Voice Oohs","Synth Voice","Orchestra Hit", - "Trumpet","Trombone","Tuba","Muted Trumpet","French Horn","Brass Section","SynthBrass 1","SynthBrass 2", - "Soprano Sax","Alto Sax","Tenor Sax","Baritone Sax","Oboe","English Horn","Bassoon","Clarinet", - "Piccolo","Flute","Recorder","Pan Flute","Blown Bottle","Skakuhachi","Whistle","Ocarina", - "Lead 1 (square)","Lead 2 (sawtooth)","Lead 3 (calliope)","Lead 4 (chiff)","Lead 5 (charang)","Lead 6 (voice)","Lead 7 (fifths)","Lead 8 (bass+lead)", - "Pad 1 (new age)","Pad 2 (warm)","Pad 3 (polysynth)","Pad 4 (choir)","Pad 5 (bowed)","Pad 6 (metallic)","Pad 7 (halo)","Pad 8 (sweep)", - "FX 1 (rain)","FX 2 (soundtrack)","FX 3 (crystal)","FX 4 (atmosphere)","FX 5 (brightness)","FX 6 (goblins)","FX 7 (echoes)","FX 8 (sci-fi)", - "Sitar","Banjo","Shamisen","Koto","Kalimba","Bagpipe","Fiddle","Shanai", - "Tinkle Bell","Agogo","Steel Drums","Woodblock","Taiko Drum","Melodic Tom","Synth Drum","Reverse Cymbal", - "Guitar Fret Noise","Breath Noise","Seashore","Bird Tweet","Telephone Ring","Helicopter","Applause","Gunshot" - }; - - /// - /// Reads a new patch change event from a MIDI stream - /// - /// Binary reader for the MIDI stream - public PatchChangeEvent(BinaryReader br) - { - patch = br.ReadByte(); - if ((patch & 0x80) != 0) - { - // TODO: might be a follow-on - throw new FormatException("Invalid patch"); - } - } - - /// - /// Creates a new patch change event - /// - /// Time of the event - /// Channel number - /// Patch number - public PatchChangeEvent(long absoluteTime, int channel, int patchNumber) - : base(absoluteTime, channel, MidiCommandCode.PatchChange) - { - this.Patch = patchNumber; - } - - /// - /// The Patch Number - /// - public int Patch - { - get - { - return patch; - } - set - { - if (value < 0 || value > 127) - { - throw new ArgumentOutOfRangeException("value", "Patch number must be in the range 0-127"); - } - patch = (byte)value; - } - } - - /// - /// Describes this patch change event - /// - /// String describing the patch change event - public override string ToString() - { - return String.Format("{0} {1}", - base.ToString(), - GetPatchName(this.patch)); - } - - /// - /// Gets as a short message for sending with the midiOutShortMsg API - /// - /// short message - public override int GetAsShortMessage() - { - return base.GetAsShortMessage() + (this.patch << 8); - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write(patch); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/PatchChangeEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/PatchChangeEvent.cs.meta deleted file mode 100644 index f6672a5..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/PatchChangeEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a9278e27bd5814f44b2b6014fc1e0fea -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/PitchWheelChangeEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/PitchWheelChangeEvent.cs deleted file mode 100644 index 5790aa4..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/PitchWheelChangeEvent.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI pitch wheel change event - /// - public class PitchWheelChangeEvent : MidiEvent - { - private int pitch; - - /// - /// Reads a pitch wheel change event from a MIDI stream - /// - /// The MIDI stream to read from - public PitchWheelChangeEvent(BinaryReader br) - { - byte b1 = br.ReadByte(); - byte b2 = br.ReadByte(); - if((b1 & 0x80) != 0) - { - // TODO: might be a follow-on - throw new FormatException("Invalid pitchwheelchange byte 1"); - } - if((b2 & 0x80) != 0) - { - throw new FormatException("Invalid pitchwheelchange byte 2"); - } - - pitch = b1 + (b2 << 7); // 0x2000 is normal - } - - /// - /// Creates a new pitch wheel change event - /// - /// Absolute event time - /// Channel - /// Pitch wheel value - public PitchWheelChangeEvent(long absoluteTime, int channel, int pitchWheel) - : base(absoluteTime, channel, MidiCommandCode.PitchWheelChange) - { - Pitch = pitchWheel; - } - - /// - /// Describes this pitch wheel change event - /// - /// String describing this pitch wheel change event - public override string ToString() - { - return String.Format("{0} Pitch {1} ({2})", - base.ToString(), - this.pitch, - this.pitch - 0x2000); - } - - /// - /// Pitch Wheel Value 0 is minimum, 0x2000 (8192) is default, 0x3FFF (16383) is maximum - /// - public int Pitch - { - get - { - return pitch; - } - set - { - if (value < 0 || value >= 0x4000) - { - throw new ArgumentOutOfRangeException("value", "Pitch value must be in the range 0 - 0x3FFF"); - } - pitch = value; - } - } - - /// - /// Gets a short message - /// - /// Integer to sent as short message - public override int GetAsShortMessage() - { - return base.GetAsShortMessage() + ((pitch & 0x7f) << 8) + (((pitch >> 7) & 0x7f) << 16); - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write((byte)(pitch & 0x7f)); - writer.Write((byte)((pitch >> 7) & 0x7f)); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/PitchWheelChangeEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/PitchWheelChangeEvent.cs.meta deleted file mode 100644 index 79d6080..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/PitchWheelChangeEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 387d52d26f9d7af40b9099d1c8ef1201 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/RawMetaEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/RawMetaEvent.cs deleted file mode 100644 index fe8eac2..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/RawMetaEvent.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI meta event with raw data - /// - public class RawMetaEvent : MetaEvent - { - /// - /// Raw data contained in the meta event - /// - public byte[] Data { get; set; } - - /// - /// Creates a meta event with raw data - /// - public RawMetaEvent(MetaEventType metaEventType, long absoluteTime, byte[] data) : base(metaEventType, data?.Length ?? 0, absoluteTime) - { - Data = data; - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => new RawMetaEvent(MetaEventType, AbsoluteTime, (byte[])Data?.Clone()); - - /// - /// Describes this meta event - /// - public override string ToString() - { - var sb = new StringBuilder().Append(base.ToString()); - foreach (var b in Data) - sb.AppendFormat(" {0:X2}", b); - return sb.ToString(); - } - - /// - /// - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - if (Data == null) return; - writer.Write(Data, 0, Data.Length); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/RawMetaEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/RawMetaEvent.cs.meta deleted file mode 100644 index 7f66f09..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/RawMetaEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5b7361c219803404083be9192b2a5012 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/SequencerSpecificEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/SequencerSpecificEvent.cs deleted file mode 100644 index 76c3885..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/SequencerSpecificEvent.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a Sequencer Specific event - /// - public class SequencerSpecificEvent : MetaEvent - { - private byte[] data; - - /// - /// Reads a new sequencer specific event from a MIDI stream - /// - /// The MIDI stream - /// The data length - public SequencerSpecificEvent(BinaryReader br, int length) - { - this.data = br.ReadBytes(length); - } - - /// - /// Creates a new Sequencer Specific event - /// - /// The sequencer specific data - /// Absolute time of this event - public SequencerSpecificEvent(byte[] data, long absoluteTime) - : base(MetaEventType.SequencerSpecific, data.Length, absoluteTime) - { - this.data = data; - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => new SequencerSpecificEvent((byte[])data.Clone(), AbsoluteTime); - - /// - /// The contents of this sequencer specific - /// - public byte[] Data - { - get - { - return this.data; - } - set - { - this.data = value; - this.metaDataLength = this.data.Length; - } - } - - /// - /// Describes this MIDI text event - /// - /// A string describing this event - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append(base.ToString()); - sb.Append(" "); - foreach (var b in data) - { - sb.AppendFormat("{0:X2} ", b); - } - sb.Length--; - return sb.ToString(); - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write(data); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/SequencerSpecificEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/SequencerSpecificEvent.cs.meta deleted file mode 100644 index 0adf6ea..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/SequencerSpecificEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1e443e96d264b42439c36d423f535eae -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/SmpteOffsetEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/SmpteOffsetEvent.cs deleted file mode 100644 index 60934aa..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/SmpteOffsetEvent.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.IO; - -namespace NAudio.Midi -{ - class SmpteOffsetEvent : MetaEvent - { - private byte hours; - private byte minutes; - private byte seconds; - private byte frames; - private byte subFrames; // 100ths of a frame - - /// - /// Creates a new time signature event - /// - public SmpteOffsetEvent(byte hours, byte minutes, byte seconds, byte frames, byte subFrames) - { - this.hours = hours; - this.minutes = minutes; - this.seconds = seconds; - this.frames = frames; - this.subFrames = subFrames; - } - - /// - /// Reads a new time signature event from a MIDI stream - /// - /// The MIDI stream - /// The data length - public SmpteOffsetEvent(BinaryReader br,int length) - { - if(length != 5) - { - throw new FormatException(String.Format("Invalid SMPTE Offset length: Got {0}, expected 5",length)); - } - hours = br.ReadByte(); - minutes = br.ReadByte(); - seconds = br.ReadByte(); - frames = br.ReadByte(); - subFrames = br.ReadByte(); - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => (SmpteOffsetEvent)MemberwiseClone(); - - /// - /// Hours - /// - public int Hours - { - get { return hours; } - } - - /// - /// Minutes - /// - public int Minutes - { - get { return minutes; } - } - - /// - /// Seconds - /// - public int Seconds - { - get { return seconds; } - } - - /// - /// Frames - /// - public int Frames - { - get { return frames; } - } - - /// - /// SubFrames - /// - public int SubFrames - { - get { return subFrames; } - } - - - /// - /// Describes this time signature event - /// - /// A string describing this event - public override string ToString() - { - return String.Format("{0} {1}:{2}:{3}:{4}:{5}", - base.ToString(),hours,minutes,seconds,frames,subFrames); - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write(hours); - writer.Write(minutes); - writer.Write(seconds); - writer.Write(frames); - writer.Write(subFrames); - } - } -} - diff --git a/Assets/Scripts/Audio/NAudio/Midi/SmpteOffsetEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/SmpteOffsetEvent.cs.meta deleted file mode 100644 index 38a4d92..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/SmpteOffsetEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5135a923ed465eb40904df48db113d92 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/SysexEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/SysexEvent.cs deleted file mode 100644 index 3618cfa..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/SysexEvent.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.IO; -using System.Text; -using System.Collections.Generic; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI sysex message - /// - public class SysexEvent : MidiEvent - { - private byte[] data; - //private int length; - - /// - /// Reads a sysex message from a MIDI stream - /// - /// Stream of MIDI data - /// a new sysex message - public static SysexEvent ReadSysexEvent(BinaryReader br) - { - SysexEvent se = new SysexEvent(); - //se.length = ReadVarInt(br); - //se.data = br.ReadBytes(se.length); - - List sysexData = new List(); - bool loop = true; - while(loop) - { - byte b = br.ReadByte(); - if(b == 0xF7) - { - loop = false; - } - else - { - sysexData.Add(b); - } - } - - se.data = sysexData.ToArray(); - - return se; - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => new SysexEvent { data = (byte[])data?.Clone() }; - - /// - /// Describes this sysex message - /// - /// A string describing the sysex message - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - foreach (byte b in data) - { - sb.AppendFormat("{0:X2} ", b); - } - return String.Format("{0} Sysex: {1} bytes\r\n{2}",this.AbsoluteTime,data.Length,sb.ToString()); - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - //WriteVarInt(writer,length); - //writer.Write(data, 0, data.Length); - writer.Write(data, 0, data.Length); - writer.Write((byte)0xF7); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/SysexEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/SysexEvent.cs.meta deleted file mode 100644 index 78c4762..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/SysexEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e219acad5e18e944fb1f15d0a35ec7ad -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/TempoEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/TempoEvent.cs deleted file mode 100644 index 984eddf..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/TempoEvent.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI tempo event - /// - public class TempoEvent : MetaEvent - { - private int microsecondsPerQuarterNote; - - /// - /// Reads a new tempo event from a MIDI stream - /// - /// The MIDI stream - /// the data length - public TempoEvent(BinaryReader br,int length) - { - if(length != 3) - { - throw new FormatException("Invalid tempo length"); - } - microsecondsPerQuarterNote = (br.ReadByte() << 16) + (br.ReadByte() << 8) + br.ReadByte(); - } - - /// - /// Creates a new tempo event with specified settings - /// - /// Microseconds per quarter note - /// Absolute time - public TempoEvent(int microsecondsPerQuarterNote, long absoluteTime) - : base(MetaEventType.SetTempo,3,absoluteTime) - { - this.microsecondsPerQuarterNote = microsecondsPerQuarterNote; - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => (TempoEvent)MemberwiseClone(); - - /// - /// Describes this tempo event - /// - /// String describing the tempo event - public override string ToString() - { - return String.Format("{0} {2}bpm ({1})", - base.ToString(), - microsecondsPerQuarterNote, - (60000000 / microsecondsPerQuarterNote)); - } - - /// - /// Microseconds per quarter note - /// - public int MicrosecondsPerQuarterNote - { - get { return microsecondsPerQuarterNote; } - set { microsecondsPerQuarterNote = value; } - } - - /// - /// Tempo - /// - public double Tempo - { - get { return (60000000.0/microsecondsPerQuarterNote); } - set { microsecondsPerQuarterNote = (int) (60000000.0/value); } - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write((byte) ((microsecondsPerQuarterNote >> 16) & 0xFF)); - writer.Write((byte) ((microsecondsPerQuarterNote >> 8) & 0xFF)); - writer.Write((byte) (microsecondsPerQuarterNote & 0xFF)); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/TempoEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/TempoEvent.cs.meta deleted file mode 100644 index fcc5188..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/TempoEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7d1227c49bb83d148b733346f471b26d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/TextEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/TextEvent.cs deleted file mode 100644 index 0b1a188..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/TextEvent.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI text event - /// - public class TextEvent : MetaEvent - { - private byte[] data; - - /// - /// Reads a new text event from a MIDI stream - /// - /// The MIDI stream - /// The data length - public TextEvent(BinaryReader br,int length) - { - data = br.ReadBytes(length); - } - - /// - /// Creates a new TextEvent - /// - /// The text in this type - /// MetaEvent type (must be one that is - /// associated with text data) - /// Absolute time of this event - public TextEvent(string text, MetaEventType metaEventType, long absoluteTime) - : base(metaEventType, text.Length, absoluteTime) - { - Text = text; - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => (TextEvent)MemberwiseClone(); - - /// - /// The contents of this text event - /// - public string Text - { - get - { - Encoding byteEncoding = NAudio.Utils.ByteEncoding.Instance; - return byteEncoding.GetString(data); - } - set - { - Encoding byteEncoding = NAudio.Utils.ByteEncoding.Instance; - data = byteEncoding.GetBytes(value); - metaDataLength = data.Length; - } - } - - /// - /// The raw contents of this text event - /// - public byte[] Data - { - get - { - return data; - } - set - { - data = value; - metaDataLength = data.Length; - } - } - - /// - /// Describes this MIDI text event - /// - /// A string describing this event - public override string ToString() - { - return String.Format("{0} {1}",base.ToString(),Text); - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write(data); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/TextEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/TextEvent.cs.meta deleted file mode 100644 index 4ad36a6..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/TextEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7af3ad2bc7eaf4446a986273aa7e3599 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/TimeSignatureEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/TimeSignatureEvent.cs deleted file mode 100644 index 46503a0..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/TimeSignatureEvent.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI time signature event - /// - public class TimeSignatureEvent : MetaEvent - { - private byte numerator; - private byte denominator; - private byte ticksInMetronomeClick; - private byte no32ndNotesInQuarterNote; - - /// - /// Reads a new time signature event from a MIDI stream - /// - /// The MIDI stream - /// The data length - public TimeSignatureEvent(BinaryReader br,int length) - { - if(length != 4) - { - throw new FormatException(String.Format("Invalid time signature length: Got {0}, expected 4", length)); - } - numerator = br.ReadByte(); - denominator = br.ReadByte(); //2=quarter, 3=eigth etc - ticksInMetronomeClick = br.ReadByte(); - no32ndNotesInQuarterNote = br.ReadByte(); - } - - /// - /// Creates a new TimeSignatureEvent - /// - /// Time at which to create this event - /// Numerator - /// Denominator - /// Ticks in Metronome Click - /// No of 32nd Notes in Quarter Click - public TimeSignatureEvent(long absoluteTime, int numerator, int denominator, int ticksInMetronomeClick, int no32ndNotesInQuarterNote) - : - base(MetaEventType.TimeSignature, 4, absoluteTime) - { - this.numerator = (byte)numerator; - this.denominator = (byte)denominator; - this.ticksInMetronomeClick = (byte)ticksInMetronomeClick; - this.no32ndNotesInQuarterNote = (byte)no32ndNotesInQuarterNote; - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => (TimeSignatureEvent)MemberwiseClone(); - - /// - /// Numerator (number of beats in a bar) - /// - public int Numerator - { - get { return numerator; } - } - - /// - /// Denominator (Beat unit), - /// 1 means 2, 2 means 4 (crochet), 3 means 8 (quaver), 4 means 16 and 5 means 32 - /// - public int Denominator - { - get { return denominator; } - } - - /// - /// Ticks in a metronome click - /// - public int TicksInMetronomeClick - { - get { return ticksInMetronomeClick; } - } - - /// - /// Number of 32nd notes in a quarter note - /// - public int No32ndNotesInQuarterNote - { - get { return no32ndNotesInQuarterNote; } - } - - /// - /// The time signature - /// - public string TimeSignature - { - get - { - string den = String.Format("Unknown ({0})",denominator); - switch(denominator) - { - case 1: - den = "2"; - break; - case 2: - den = "4"; - break; - case 3: - den = "8"; - break; - case 4: - den = "16"; - break; - case 5: - den = "32"; - break; - } - return String.Format("{0}/{1}",numerator,den); - } - } - - /// - /// Describes this time signature event - /// - /// A string describing this event - public override string ToString() - { - return String.Format("{0} {1} TicksInClick:{2} 32ndsInQuarterNote:{3}", - base.ToString(),TimeSignature,ticksInMetronomeClick,no32ndNotesInQuarterNote); - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write(numerator); - writer.Write(denominator); - writer.Write(ticksInMetronomeClick); - writer.Write(no32ndNotesInQuarterNote); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Midi/TimeSignatureEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/TimeSignatureEvent.cs.meta deleted file mode 100644 index 0d64dd4..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/TimeSignatureEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0a4d1ac743fe84346b10f96572249f03 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Midi/TrackSequenceNumberEvent.cs b/Assets/Scripts/Audio/NAudio/Midi/TrackSequenceNumberEvent.cs deleted file mode 100644 index ac65760..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/TrackSequenceNumberEvent.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.IO; - -namespace NAudio.Midi -{ - /// - /// Represents a MIDI track sequence number event event - /// - public class TrackSequenceNumberEvent : MetaEvent - { - private ushort sequenceNumber; - - /// - /// Creates a new track sequence number event - /// - public TrackSequenceNumberEvent(ushort sequenceNumber) - { - this.sequenceNumber = sequenceNumber; - } - - /// - /// Reads a new track sequence number event from a MIDI stream - /// - /// The MIDI stream - /// the data length - public TrackSequenceNumberEvent(BinaryReader br, int length) - { - // TODO: there is a form of the TrackSequenceNumberEvent that - // has a length of zero - if(length != 2) - { - throw new FormatException("Invalid sequence number length"); - } - sequenceNumber = (ushort) ((br.ReadByte() << 8) + br.ReadByte()); - } - - /// - /// Creates a deep clone of this MIDI event. - /// - public override MidiEvent Clone() => (TrackSequenceNumberEvent)MemberwiseClone(); - - /// - /// Describes this event - /// - /// String describing the event - public override string ToString() - { - return String.Format("{0} {1}", base.ToString(), sequenceNumber); - } - - /// - /// Calls base class export first, then exports the data - /// specific to this event - /// MidiEvent.Export - /// - public override void Export(ref long absoluteTime, BinaryWriter writer) - { - base.Export(ref absoluteTime, writer); - writer.Write((byte)((sequenceNumber >> 8) & 0xFF)); - writer.Write((byte)(sequenceNumber & 0xFF)); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Midi/TrackSequenceNumberEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Midi/TrackSequenceNumberEvent.cs.meta deleted file mode 100644 index 2738b2c..0000000 --- a/Assets/Scripts/Audio/NAudio/Midi/TrackSequenceNumberEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c3b7b008e696119458a8b2352b824e45 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer.meta b/Assets/Scripts/Audio/NAudio/Mixer.meta deleted file mode 100644 index 8e59598..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b8d06dda07fe54f46a9e5209fe8ee09d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/BooleanMixerControl.cs b/Assets/Scripts/Audio/NAudio/Mixer/BooleanMixerControl.cs deleted file mode 100644 index 377015a..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/BooleanMixerControl.cs +++ /dev/null @@ -1,55 +0,0 @@ -// created on 10/12/2002 at 23:58 -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Mixer -{ - /// - /// Boolean mixer control - /// - public class BooleanMixerControl : MixerControl - { - private MixerInterop.MIXERCONTROLDETAILS_BOOLEAN boolDetails; - - internal BooleanMixerControl(MixerInterop.MIXERCONTROL mixerControl, IntPtr mixerHandle, MixerFlags mixerHandleType, int nChannels) - { - this.mixerControl = mixerControl; - this.mixerHandle = mixerHandle; - this.mixerHandleType = mixerHandleType; - this.nChannels = nChannels; - this.mixerControlDetails = new MixerInterop.MIXERCONTROLDETAILS(); - - GetControlDetails(); - - } - - /// - /// Gets the details for this control - /// - /// memory pointer - protected override void GetDetails(IntPtr pDetails) - { - boolDetails = (MixerInterop.MIXERCONTROLDETAILS_BOOLEAN) Marshal.PtrToStructure(pDetails,typeof(MixerInterop.MIXERCONTROLDETAILS_BOOLEAN)); - } - - /// - /// The current value of the control - /// - public bool Value - { - get - { - GetControlDetails(); // make sure we have the latest value - return (boolDetails.fValue == 1); - } - set - { - boolDetails.fValue = (value) ? 1 : 0; - mixerControlDetails.paDetails = Marshal.AllocHGlobal(Marshal.SizeOf(boolDetails)); - Marshal.StructureToPtr(boolDetails, mixerControlDetails.paDetails, false); - MmException.Try(MixerInterop.mixerSetControlDetails(mixerHandle, ref mixerControlDetails, MixerFlags.Value | mixerHandleType), "mixerSetControlDetails"); - Marshal.FreeHGlobal(mixerControlDetails.paDetails); - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/BooleanMixerControl.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/BooleanMixerControl.cs.meta deleted file mode 100644 index 35409e1..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/BooleanMixerControl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cbddae2c9dbca0f43afb4027911b1b07 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/CustomMixerControl.cs b/Assets/Scripts/Audio/NAudio/Mixer/CustomMixerControl.cs deleted file mode 100644 index bc9a308..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/CustomMixerControl.cs +++ /dev/null @@ -1,32 +0,0 @@ -// created on 13/12/2002 at 22:07 -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Mixer -{ - /// - /// Custom Mixer control - /// - public class CustomMixerControl : MixerControl - { - internal CustomMixerControl(MixerInterop.MIXERCONTROL mixerControl, IntPtr mixerHandle, MixerFlags mixerHandleType, int nChannels) - { - this.mixerControl = mixerControl; - this.mixerHandle = mixerHandle; - this.mixerHandleType = mixerHandleType; - this.nChannels = nChannels; - this.mixerControlDetails = new MixerInterop.MIXERCONTROLDETAILS(); - GetControlDetails(); - } - - /// - /// Get the data for this custom control - /// - /// pointer to memory to receive data - protected override void GetDetails(IntPtr pDetails) - { - } - - // TODO: provide a way of getting / setting data - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/CustomMixerControl.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/CustomMixerControl.cs.meta deleted file mode 100644 index c0bab8c..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/CustomMixerControl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c994a26d4972f854481c6ee147447510 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/ListTextMixerControl.cs b/Assets/Scripts/Audio/NAudio/Mixer/ListTextMixerControl.cs deleted file mode 100644 index 8dc8623..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/ListTextMixerControl.cs +++ /dev/null @@ -1,34 +0,0 @@ -// created on 13/12/2002 at 22:06 -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Mixer -{ - /// - /// List text mixer control - /// - public class ListTextMixerControl : MixerControl - { - internal ListTextMixerControl(MixerInterop.MIXERCONTROL mixerControl, IntPtr mixerHandle, MixerFlags mixerHandleType, int nChannels) - { - this.mixerControl = mixerControl; - this.mixerHandle = mixerHandle; - this.mixerHandleType = mixerHandleType; - this.nChannels = nChannels; - this.mixerControlDetails = new MixerInterop.MIXERCONTROLDETAILS(); - - GetControlDetails(); - - } - - /// - /// Get the details for this control - /// - /// Memory location to read to - protected override void GetDetails(IntPtr pDetails) - { - } - - // TODO: provide a way of getting / setting data - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/ListTextMixerControl.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/ListTextMixerControl.cs.meta deleted file mode 100644 index f25c75d..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/ListTextMixerControl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c6918c757ab24e9408200402f0cbd500 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/Mixer.cs b/Assets/Scripts/Audio/NAudio/Mixer/Mixer.cs deleted file mode 100644 index ee43b3b..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/Mixer.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Collections.Generic; -using NAudio.Wave; - -namespace NAudio.Mixer -{ - /// Represents a Windows mixer device - public class Mixer - { - private MixerInterop.MIXERCAPS caps; - private IntPtr mixerHandle; - private MixerFlags mixerHandleType; - - /// The number of mixer devices available - public static int NumberOfDevices - { - get - { - return MixerInterop.mixerGetNumDevs(); - } - } - - /// Connects to the specified mixer - /// The index of the mixer to use. - /// This should be between zero and NumberOfDevices - 1 - public Mixer(int mixerIndex) - { - if(mixerIndex < 0 || mixerIndex >= NumberOfDevices) - { - throw new ArgumentOutOfRangeException("mixerID"); - } - caps = new MixerInterop.MIXERCAPS(); - MmException.Try(MixerInterop.mixerGetDevCaps((IntPtr)mixerIndex,ref caps,Marshal.SizeOf(caps)),"mixerGetDevCaps"); - this.mixerHandle = (IntPtr)mixerIndex; - this.mixerHandleType = MixerFlags.Mixer; - - // TODO: optionally support really opening the mixer device - //MmException.Try(MixerInterop.mixerOpen(out mixerHandle, mixerIndex, IntPtr.Zero, IntPtr.Zero, 0), "mixerOpen"); - } - - /// The number of destinations this mixer supports - public int DestinationCount - { - get - { - return (int) caps.cDestinations; - } - } - - /// The name of this mixer device - public String Name - { - get - { - return caps.szPname; - } - } - - /// The manufacturer code for this mixer device - public Manufacturers Manufacturer - { - get - { - return (Manufacturers) caps.wMid; - } - } - - /// The product identifier code for this mixer device - public int ProductID - { - get - { - return caps.wPid; - } - } - - /// Retrieve the specified MixerDestination object - /// The ID of the destination to use. - /// Should be between 0 and DestinationCount - 1 - public MixerLine GetDestination(int destinationIndex) - { - if(destinationIndex < 0 || destinationIndex >= DestinationCount) - { - throw new ArgumentOutOfRangeException("destinationIndex"); - } - return new MixerLine(mixerHandle, destinationIndex, mixerHandleType); - } - - /// - /// A way to enumerate the destinations - /// - public IEnumerable Destinations - { - get - { - for (int destination = 0; destination < DestinationCount; destination++) - { - yield return GetDestination(destination); - } - } - } - - /// - /// A way to enumerate all available devices - /// - public static IEnumerable Mixers - { - get - { - for (int device = 0; device < Mixer.NumberOfDevices; device++) - { - yield return new Mixer(device); - } - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/Mixer.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/Mixer.cs.meta deleted file mode 100644 index 94cca45..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/Mixer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6bdc3b19281bb5d42a44915d4d9c693f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerControl.cs b/Assets/Scripts/Audio/NAudio/Mixer/MixerControl.cs deleted file mode 100644 index 758a762..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerControl.cs +++ /dev/null @@ -1,377 +0,0 @@ -// created on 10/12/2002 at 21:11 -using System; -using System.Runtime.InteropServices; -using System.Collections.Generic; - -namespace NAudio.Mixer -{ - /// - /// Represents a mixer control - /// - public abstract class MixerControl - { - internal MixerInterop.MIXERCONTROL mixerControl; - internal MixerInterop.MIXERCONTROLDETAILS mixerControlDetails; - - /// - /// Mixer Handle - /// - protected IntPtr mixerHandle; - - /// - /// Number of Channels - /// - protected int nChannels; - - /// - /// Mixer Handle Type - /// - protected MixerFlags mixerHandleType; - - /// - /// Gets all the mixer controls - /// - /// Mixer Handle - /// Mixer Line - /// Mixer Handle Type - /// - public static IList GetMixerControls(IntPtr mixerHandle, MixerLine mixerLine, - MixerFlags mixerHandleType) - { - var controls = new List(); - if (mixerLine.ControlsCount > 0) - { - int mixerControlSize = Marshal.SizeOf(typeof (MixerInterop.MIXERCONTROL)); - var mlc = new MixerInterop.MIXERLINECONTROLS(); - IntPtr pmc = Marshal.AllocHGlobal(mixerControlSize * mixerLine.ControlsCount); - mlc.cbStruct = Marshal.SizeOf(mlc); - mlc.dwLineID = mixerLine.LineId; - mlc.cControls = mixerLine.ControlsCount; - mlc.pamxctrl = pmc; - mlc.cbmxctrl = Marshal.SizeOf(typeof(MixerInterop.MIXERCONTROL)); - try - { - MmResult err = MixerInterop.mixerGetLineControls(mixerHandle, ref mlc, MixerFlags.All | mixerHandleType); - if (err != MmResult.NoError) - { - throw new MmException(err, "mixerGetLineControls"); - } - for (int i = 0; i < mlc.cControls; i++) - { - Int64 address = pmc.ToInt64() + mixerControlSize * i; - - var mc = (MixerInterop.MIXERCONTROL) - Marshal.PtrToStructure((IntPtr)address, typeof(MixerInterop.MIXERCONTROL)); - var mixerControl = GetMixerControl(mixerHandle, mixerLine.LineId, mc.dwControlID, mixerLine.Channels, - mixerHandleType); - - controls.Add(mixerControl); - } - } - finally - { - Marshal.FreeHGlobal(pmc); - } - - } - return controls; - } - - /// - /// Gets a specified Mixer Control - /// - /// Mixer Handle - /// Line ID - /// Control ID - /// Number of Channels - /// Flags to use (indicates the meaning of mixerHandle) - /// - public static MixerControl GetMixerControl(IntPtr mixerHandle, int nLineID, int controlId, int nChannels, - MixerFlags mixerFlags) - { - MixerInterop.MIXERLINECONTROLS mlc = new MixerInterop.MIXERLINECONTROLS(); - MixerInterop.MIXERCONTROL mc = new MixerInterop.MIXERCONTROL(); - - // set up the pointer to a structure - IntPtr pMixerControl = Marshal.AllocCoTaskMem(Marshal.SizeOf(mc)); - //Marshal.StructureToPtr(mc, pMixerControl, false); - - mlc.cbStruct = Marshal.SizeOf(mlc); - mlc.cControls = 1; - mlc.dwControlID = controlId; - mlc.cbmxctrl = Marshal.SizeOf(mc); - mlc.pamxctrl = pMixerControl; - mlc.dwLineID = nLineID; - MmResult err = MixerInterop.mixerGetLineControls(mixerHandle, ref mlc, MixerFlags.OneById | mixerFlags); - if (err != MmResult.NoError) - { - Marshal.FreeCoTaskMem(pMixerControl); - throw new MmException(err, "mixerGetLineControls"); - } - - // retrieve the structure from the pointer - mc = (MixerInterop.MIXERCONTROL) Marshal.PtrToStructure(mlc.pamxctrl, typeof (MixerInterop.MIXERCONTROL)); - Marshal.FreeCoTaskMem(pMixerControl); - - if (MixerControl.IsControlBoolean(mc.dwControlType)) - { - return new BooleanMixerControl(mc, mixerHandle, mixerFlags, nChannels); - } - else if (MixerControl.IsControlSigned(mc.dwControlType)) - { - return new SignedMixerControl(mc, mixerHandle, mixerFlags, nChannels); - } - else if (MixerControl.IsControlUnsigned(mc.dwControlType)) - { - return new UnsignedMixerControl(mc, mixerHandle, mixerFlags, nChannels); - } - else if (MixerControl.IsControlListText(mc.dwControlType)) - { - return new ListTextMixerControl(mc, mixerHandle, mixerFlags, nChannels); - } - else if (MixerControl.IsControlCustom(mc.dwControlType)) - { - return new CustomMixerControl(mc, mixerHandle, mixerFlags, nChannels); - } - else - { - throw new InvalidOperationException(String.Format("Unknown mixer control type {0}", mc.dwControlType)); - } - } - - /// - /// Gets the control details - /// - protected void GetControlDetails() - { - mixerControlDetails.cbStruct = Marshal.SizeOf(mixerControlDetails); - mixerControlDetails.dwControlID = mixerControl.dwControlID; - if (IsCustom) - { - mixerControlDetails.cChannels = 0; - } - else if ((mixerControl.fdwControl & MixerInterop.MIXERCONTROL_CONTROLF_UNIFORM) != 0) - { - mixerControlDetails.cChannels = 1; - } - else - { - mixerControlDetails.cChannels = nChannels; - } - - - if ((mixerControl.fdwControl & MixerInterop.MIXERCONTROL_CONTROLF_MULTIPLE) != 0) - { - mixerControlDetails.hwndOwner = (IntPtr) mixerControl.cMultipleItems; - } - else if (IsCustom) - { - mixerControlDetails.hwndOwner = IntPtr.Zero; // TODO: special cases - } - else - { - mixerControlDetails.hwndOwner = IntPtr.Zero; - } - - if (IsBoolean) - { - mixerControlDetails.cbDetails = Marshal.SizeOf(new MixerInterop.MIXERCONTROLDETAILS_BOOLEAN()); - } - else if (IsListText) - { - mixerControlDetails.cbDetails = Marshal.SizeOf(new MixerInterop.MIXERCONTROLDETAILS_LISTTEXT()); - } - else if (IsSigned) - { - mixerControlDetails.cbDetails = Marshal.SizeOf(new MixerInterop.MIXERCONTROLDETAILS_SIGNED()); - } - else if (IsUnsigned) - { - mixerControlDetails.cbDetails = Marshal.SizeOf(new MixerInterop.MIXERCONTROLDETAILS_UNSIGNED()); - } - else - { - // must be custom - mixerControlDetails.cbDetails = mixerControl.Metrics.customData; - } - var detailsSize = mixerControlDetails.cbDetails*mixerControlDetails.cChannels; - if ((mixerControl.fdwControl & MixerInterop.MIXERCONTROL_CONTROLF_MULTIPLE) != 0) - { - // fixing issue 16390 - calculating size correctly for multiple items - detailsSize *= (int) mixerControl.cMultipleItems; - } - IntPtr buffer = Marshal.AllocCoTaskMem(detailsSize); - // To copy stuff in: - // Marshal.StructureToPtr( theStruct, buffer, false ); - mixerControlDetails.paDetails = buffer; - MmResult err = MixerInterop.mixerGetControlDetails(mixerHandle, ref mixerControlDetails, - MixerFlags.Value | mixerHandleType); - // let the derived classes get the details before we free the handle - if (err == MmResult.NoError) - { - GetDetails(mixerControlDetails.paDetails); - } - Marshal.FreeCoTaskMem(buffer); - if (err != MmResult.NoError) - { - throw new MmException(err, "mixerGetControlDetails"); - } - } - - /// - /// Gets the control details - /// - /// - protected abstract void GetDetails(IntPtr pDetails); - - /// - /// Mixer control name - /// - public String Name - { - get { return mixerControl.szName; } - } - - /// - /// Mixer control type - /// - public MixerControlType ControlType - { - get { return mixerControl.dwControlType; } - } - - /// - /// Returns true if this is a boolean control - /// - /// Control type - private static bool IsControlBoolean(MixerControlType controlType) - { - switch (controlType) - { - case MixerControlType.BooleanMeter: - case MixerControlType.Boolean: - case MixerControlType.Button: - case MixerControlType.Loudness: - case MixerControlType.Mono: - case MixerControlType.Mute: - case MixerControlType.OnOff: - case MixerControlType.StereoEnhance: - case MixerControlType.Mixer: - case MixerControlType.MultipleSelect: - case MixerControlType.Mux: - case MixerControlType.SingleSelect: - return true; - default: - return false; - } - } - - /// - /// Is this a boolean control - /// - public bool IsBoolean - { - get { return MixerControl.IsControlBoolean(mixerControl.dwControlType); } - } - - /// - /// Determines whether a specified mixer control type is a list text control - /// - private static bool IsControlListText(MixerControlType controlType) - { - switch (controlType) - { - case MixerControlType.Equalizer: - case MixerControlType.Mixer: - case MixerControlType.MultipleSelect: - case MixerControlType.Mux: - case MixerControlType.SingleSelect: - return true; - default: - return false; - } - } - - /// - /// True if this is a list text control - /// - public bool IsListText - { - get { return MixerControl.IsControlListText(mixerControl.dwControlType); } - } - - private static bool IsControlSigned(MixerControlType controlType) - { - switch (controlType) - { - case MixerControlType.PeakMeter: - case MixerControlType.SignedMeter: - case MixerControlType.Signed: - case MixerControlType.Decibels: - case MixerControlType.Pan: - case MixerControlType.QSoundPan: - case MixerControlType.Slider: - return true; - default: - return false; - } - } - - /// - /// True if this is a signed control - /// - public bool IsSigned - { - get { return MixerControl.IsControlSigned(mixerControl.dwControlType); } - } - - private static bool IsControlUnsigned(MixerControlType controlType) - { - switch (controlType) - { - case MixerControlType.UnsignedMeter: - case MixerControlType.Unsigned: - case MixerControlType.Bass: - case MixerControlType.Equalizer: - case MixerControlType.Fader: - case MixerControlType.Treble: - case MixerControlType.Volume: - case MixerControlType.MicroTime: - case MixerControlType.MilliTime: - case MixerControlType.Percent: - return true; - default: - return false; - } - } - - /// - /// True if this is an unsigned control - /// - public bool IsUnsigned - { - get { return MixerControl.IsControlUnsigned(mixerControl.dwControlType); } - } - - private static bool IsControlCustom(MixerControlType controlType) - { - return (controlType == MixerControlType.Custom); - } - - /// - /// True if this is a custom control - /// - public bool IsCustom - { - get { return MixerControl.IsControlCustom(mixerControl.dwControlType); } - } - - /// - /// String representation for debug purposes - /// - public override string ToString() - { - return String.Format("{0} {1}", Name, ControlType); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerControl.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/MixerControl.cs.meta deleted file mode 100644 index 5d10e15..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerControl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 34763408ba018a249b6ae6086e2cc94c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerControlType.cs b/Assets/Scripts/Audio/NAudio/Mixer/MixerControlType.cs deleted file mode 100644 index 7673f49..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerControlType.cs +++ /dev/null @@ -1,111 +0,0 @@ -// created on 15/12/2002 at 02:55 -using System; - -namespace NAudio.Mixer -{ - [Flags] - internal enum MixerControlClass - { - Custom = 0x00000000, - Meter = 0x10000000, - Switch = 0x20000000, - Number = 0x30000000, - Slider = 0x40000000, - Fader = 0x50000000, - Time = 0x60000000, - List = 0x70000000, - Mask = Custom | Meter | Switch | Number | Slider | Fader | Time | List - } - - [Flags] - internal enum MixerControlSubclass - { - SwitchBoolean = 0x00000000, - SwitchButton = 0x01000000, - MeterPolled = 0x00000000, - TimeMicrosecs = 0x00000000, - TimeMillisecs = 0x01000000, - ListSingle = 0x00000000, - ListMultiple = 0x01000000, - Mask = 0x0F000000 - } - - [Flags] - internal enum MixerControlUnits - { - Custom = 0x00000000, - Boolean = 0x00010000, - Signed = 0x00020000, - Unsigned = 0x00030000, - Decibels = 0x00040000, // in 10ths - Percent = 0x00050000, // in 10ths - Mask = 0x00FF0000 - } - - /// - /// Mixer control types - /// - public enum MixerControlType - { - /// Custom - Custom = (MixerControlClass.Custom | MixerControlUnits.Custom), - /// Boolean meter - BooleanMeter = (MixerControlClass.Meter | MixerControlSubclass.MeterPolled | MixerControlUnits.Boolean), - /// Signed meter - SignedMeter = (MixerControlClass.Meter | MixerControlSubclass.MeterPolled | MixerControlUnits.Signed), - /// Peak meter - PeakMeter = (SignedMeter + 1), - /// Unsigned meter - UnsignedMeter = (MixerControlClass.Meter | MixerControlSubclass.MeterPolled | MixerControlUnits.Unsigned), - /// Boolean - Boolean = (MixerControlClass.Switch | MixerControlSubclass.SwitchBoolean | MixerControlUnits.Boolean), - /// On Off - OnOff = (Boolean + 1), - /// Mute - Mute = (Boolean + 2), - /// Mono - Mono = (Boolean + 3), - /// Loudness - Loudness = (Boolean + 4), - /// Stereo Enhance - StereoEnhance = (Boolean + 5), - /// Button - Button = (MixerControlClass.Switch | MixerControlSubclass.SwitchButton | MixerControlUnits.Boolean), - /// Decibels - Decibels = (MixerControlClass.Number | MixerControlUnits.Decibels), - /// Signed - Signed = (MixerControlClass.Number | MixerControlUnits.Signed), - /// Unsigned - Unsigned = (MixerControlClass.Number | MixerControlUnits.Unsigned), - /// Percent - Percent = (MixerControlClass.Number | MixerControlUnits.Percent), - /// Slider - Slider = (MixerControlClass.Slider | MixerControlUnits.Signed), - /// Pan - Pan = (Slider + 1), - /// Q-sound pan - QSoundPan = (Slider + 2), - /// Fader - Fader = (MixerControlClass.Fader | MixerControlUnits.Unsigned), - /// Volume - Volume = (Fader + 1), - /// Bass - Bass = (Fader + 2), - /// Treble - Treble = (Fader + 3), - /// Equaliser - Equalizer = (Fader + 4), - /// Single Select - SingleSelect = (MixerControlClass.List | MixerControlSubclass.ListSingle | MixerControlUnits.Boolean), - /// Mux - Mux = (SingleSelect + 1), - /// Multiple select - MultipleSelect = (MixerControlClass.List | MixerControlSubclass.ListMultiple | MixerControlUnits.Boolean), - /// Mixer - Mixer = (MultipleSelect + 1), - /// Micro time - MicroTime = (MixerControlClass.Time | MixerControlSubclass.TimeMicrosecs | MixerControlUnits.Unsigned), - /// Milli time - MilliTime = (MixerControlClass.Time | MixerControlSubclass.TimeMillisecs | MixerControlUnits.Unsigned), - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerControlType.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/MixerControlType.cs.meta deleted file mode 100644 index fbc84ed..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerControlType.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a14c466862ac4314d98912694d22ae85 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerFlags.cs b/Assets/Scripts/Audio/NAudio/Mixer/MixerFlags.cs deleted file mode 100644 index 5d19fa1..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerFlags.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Mixer -{ - /// - /// Mixer Interop Flags - /// - [Flags] - public enum MixerFlags - { - #region Objects - /// - /// MIXER_OBJECTF_HANDLE = 0x80000000; - /// - Handle = unchecked ( (int) 0x80000000 ), - /// - /// MIXER_OBJECTF_MIXER = 0x00000000; - /// - Mixer = 0, - /// - /// MIXER_OBJECTF_HMIXER - /// - MixerHandle = Mixer | Handle, - /// - /// MIXER_OBJECTF_WAVEOUT - /// - WaveOut = 0x10000000, - /// - /// MIXER_OBJECTF_HWAVEOUT - /// - WaveOutHandle = WaveOut | Handle, - /// - /// MIXER_OBJECTF_WAVEIN - /// - WaveIn = 0x20000000, - /// - /// MIXER_OBJECTF_HWAVEIN - /// - WaveInHandle = WaveIn | Handle, - /// - /// MIXER_OBJECTF_MIDIOUT - /// - MidiOut = 0x30000000, - /// - /// MIXER_OBJECTF_HMIDIOUT - /// - MidiOutHandle = MidiOut | Handle, - /// - /// MIXER_OBJECTF_MIDIIN - /// - MidiIn = 0x40000000, - /// - /// MIXER_OBJECTF_HMIDIIN - /// - MidiInHandle = MidiIn | Handle, - /// - /// MIXER_OBJECTF_AUX - /// - Aux = 0x50000000, - #endregion - - #region Get/Set control details - /// - /// MIXER_GETCONTROLDETAILSF_VALUE = 0x00000000; - /// MIXER_SETCONTROLDETAILSF_VALUE = 0x00000000; - /// - Value = 0, - /// - /// MIXER_GETCONTROLDETAILSF_LISTTEXT = 0x00000001; - /// MIXER_SETCONTROLDETAILSF_LISTTEXT = 0x00000001; - /// - ListText = 1, - /// - /// MIXER_GETCONTROLDETAILSF_QUERYMASK = 0x0000000F; - /// MIXER_SETCONTROLDETAILSF_QUERYMASK = 0x0000000F; - /// MIXER_GETLINECONTROLSF_QUERYMASK = 0x0000000F; - /// - QueryMask = 0xF, - #endregion - - #region get line controls - /// - /// MIXER_GETLINECONTROLSF_ALL = 0x00000000; - /// - All = 0, - /// - /// MIXER_GETLINECONTROLSF_ONEBYID = 0x00000001; - /// - OneById = 1, - /// - /// MIXER_GETLINECONTROLSF_ONEBYTYPE = 0x00000002; - /// - OneByType = 2, - #endregion - - /// - /// MIXER_GETLINEINFOF_DESTINATION = 0x00000000; - /// - GetLineInfoOfDestination = 0, - /// - /// MIXER_GETLINEINFOF_SOURCE = 0x00000001; - /// - GetLineInfoOfSource = 1, - /// - /// MIXER_GETLINEINFOF_LINEID = 0x00000002; - /// - GetLineInfoOfLineId = 2, - /// - /// MIXER_GETLINEINFOF_COMPONENTTYPE = 0x00000003; - /// - GetLineInfoOfComponentType = 3, - /// - /// MIXER_GETLINEINFOF_TARGETTYPE = 0x00000004; - /// - GetLineInfoOfTargetType = 4, - /// - /// MIXER_GETLINEINFOF_QUERYMASK = 0x0000000F; - /// - GetLineInfoOfQueryMask = 0xF, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/MixerFlags.cs.meta deleted file mode 100644 index c9a6dff..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4c6c2a87a0dfa9c4aaf08791e7abd178 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerInterop.cs b/Assets/Scripts/Audio/NAudio/Mixer/MixerInterop.cs deleted file mode 100644 index 0273e8d..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerInterop.cs +++ /dev/null @@ -1,267 +0,0 @@ -// created on 09/12/2002 at 21:03 -using System; -using System.Runtime.InteropServices; -using NAudio.Wave; - -// TODO: add function help from MSDN -// TODO: Create enums for flags parameters -namespace NAudio.Mixer -{ - class MixerInterop - { - public const UInt32 MIXERCONTROL_CONTROLF_UNIFORM = 0x00000001; - public const UInt32 MIXERCONTROL_CONTROLF_MULTIPLE = 0x00000002; - public const UInt32 MIXERCONTROL_CONTROLF_DISABLED = 0x80000000; - - public const Int32 MAXPNAMELEN = 32; - public const Int32 MIXER_SHORT_NAME_CHARS = 16; - public const Int32 MIXER_LONG_NAME_CHARS = 64; - - // http://msdn.microsoft.com/en-us/library/dd757304%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Ansi)] - public static extern Int32 mixerGetNumDevs(); - - // http://msdn.microsoft.com/en-us/library/dd757308%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Ansi)] - public static extern MmResult mixerOpen(out IntPtr hMixer, int uMxId, IntPtr dwCallback, IntPtr dwInstance, MixerFlags dwOpenFlags); - - // http://msdn.microsoft.com/en-us/library/dd757292%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Ansi)] - public static extern MmResult mixerClose(IntPtr hMixer); - - // http://msdn.microsoft.com/en-us/library/dd757299%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Ansi)] - public static extern MmResult mixerGetControlDetails(IntPtr hMixer, ref MIXERCONTROLDETAILS mixerControlDetails, MixerFlags dwDetailsFlags); - - // http://msdn.microsoft.com/en-us/library/dd757300%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Ansi)] - public static extern MmResult mixerGetDevCaps(IntPtr nMixerID, ref MIXERCAPS mixerCaps, Int32 mixerCapsSize); - - // http://msdn.microsoft.com/en-us/library/dd757301%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Ansi)] - public static extern MmResult mixerGetID(IntPtr hMixer, out Int32 mixerID, MixerFlags dwMixerIDFlags); - - // http://msdn.microsoft.com/en-us/library/dd757302%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Ansi)] - public static extern MmResult mixerGetLineControls(IntPtr hMixer, ref MIXERLINECONTROLS mixerLineControls, MixerFlags dwControlFlags); - - // http://msdn.microsoft.com/en-us/library/dd757303%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Ansi)] - public static extern MmResult mixerGetLineInfo(IntPtr hMixer, ref MIXERLINE mixerLine, MixerFlags dwInfoFlags); - - // http://msdn.microsoft.com/en-us/library/dd757307%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Ansi)] - public static extern MmResult mixerMessage(IntPtr hMixer, UInt32 nMessage, IntPtr dwParam1, IntPtr dwParam2); - - // http://msdn.microsoft.com/en-us/library/dd757309%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Ansi)] - public static extern MmResult mixerSetControlDetails(IntPtr hMixer, ref MIXERCONTROLDETAILS mixerControlDetails, MixerFlags dwDetailsFlags); - - // http://msdn.microsoft.com/en-us/library/dd757294%28VS.85%29.aspx - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)] - public struct MIXERCONTROLDETAILS - { - public Int32 cbStruct; // size of the MIXERCONTROLDETAILS structure - public Int32 dwControlID; - public Int32 cChannels; // Number of channels on which to get or set control properties - public IntPtr hwndOwner; // Union with DWORD cMultipleItems - public Int32 cbDetails; // Size of the paDetails Member - public IntPtr paDetails; // LPVOID - } - - // http://msdn.microsoft.com/en-us/library/dd757291%28VS.85%29.aspx - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)] - public struct MIXERCAPS - { - public UInt16 wMid; - public UInt16 wPid; - public UInt32 vDriverVersion; // MMVERSION - major high byte, minor low byte - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN)] - public String szPname; - public UInt32 fdwSupport; - public UInt32 cDestinations; - } - - // http://msdn.microsoft.com/en-us/library/dd757306%28VS.85%29.aspx - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)] - public struct MIXERLINECONTROLS - { - public Int32 cbStruct; // size of the MIXERLINECONTROLS structure - public Int32 dwLineID; // Line identifier for which controls are being queried - public Int32 dwControlID; // union with UInt32 dwControlType - public Int32 cControls; - public Int32 cbmxctrl; - public IntPtr pamxctrl; // see MSDN "Structs Sample" - } - - /// - /// Mixer Line Flags - /// - [Flags] - public enum MIXERLINE_LINEF - { - /// - /// Audio line is active. An active line indicates that a signal is probably passing - /// through the line. - /// - MIXERLINE_LINEF_ACTIVE = 1, - - /// - /// Audio line is disconnected. A disconnected line's associated controls can still be - /// modified, but the changes have no effect until the line is connected. - /// - MIXERLINE_LINEF_DISCONNECTED = 0x8000, - - /// - /// Audio line is an audio source line associated with a single audio destination line. - /// If this flag is not set, this line is an audio destination line associated with zero - /// or more audio source lines. - /// - MIXERLINE_LINEF_SOURCE = (unchecked((int)0x80000000)) - } - - // http://msdn.microsoft.com/en-us/library/dd757305%28VS.85%29.aspx - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)] - public struct MIXERLINE - { - public Int32 cbStruct; - public Int32 dwDestination; - public Int32 dwSource; - public Int32 dwLineID; - public MIXERLINE_LINEF fdwLine; - public IntPtr dwUser; - public MixerLineComponentType dwComponentType; - public Int32 cChannels; - public Int32 cConnections; - public Int32 cControls; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MIXER_SHORT_NAME_CHARS)] - public String szShortName; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MIXER_LONG_NAME_CHARS)] - public String szName; - // start of target struct 'Target' - public UInt32 dwType; - public UInt32 dwDeviceID; - public UInt16 wMid; - public UInt16 wPid; - public UInt32 vDriverVersion; // MMVERSION - major high byte, minor low byte - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN)] - public String szPname; - // end of target struct - } - - /// - /// BOUNDS structure - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)] - public struct Bounds - { - /// - /// dwMinimum / lMinimum / reserved 0 - /// - public int minimum; - /// - /// dwMaximum / lMaximum / reserved 1 - /// - public int maximum; - /// - /// reserved 2 - /// - public int reserved2; - /// - /// reserved 3 - /// - public int reserved3; - /// - /// reserved 4 - /// - public int reserved4; - /// - /// reserved 5 - /// - public int reserved5; - } - - /// - /// METRICS structure - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)] - public struct Metrics - { - /// - /// cSteps / reserved[0] - /// - public int step; - /// - /// cbCustomData / reserved[1], number of bytes for control details - /// - public int customData; - /// - /// reserved 2 - /// - public int reserved2; - /// - /// reserved 3 - /// - public int reserved3; - /// - /// reserved 4 - /// - public int reserved4; - /// - /// reserved 5 - /// - public int reserved5; - } - - /// - /// MIXERCONTROL struct - /// http://msdn.microsoft.com/en-us/library/dd757293%28VS.85%29.aspx - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)] - public struct MIXERCONTROL - { - public UInt32 cbStruct; - public Int32 dwControlID; - public MixerControlType dwControlType; - public UInt32 fdwControl; - public UInt32 cMultipleItems; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MIXER_SHORT_NAME_CHARS)] - public String szShortName; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MIXER_LONG_NAME_CHARS)] - public String szName; - public Bounds Bounds; - public Metrics Metrics; - } - - // http://msdn.microsoft.com/en-us/library/dd757295%28VS.85%29.aspx - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] - public struct MIXERCONTROLDETAILS_BOOLEAN - { - public Int32 fValue; - } - - // http://msdn.microsoft.com/en-us/library/dd757297%28VS.85%29.aspx - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] - public struct MIXERCONTROLDETAILS_SIGNED - { - public Int32 lValue; - } - - // http://msdn.microsoft.com/en-us/library/dd757296%28VS.85%29.aspx - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)] - public struct MIXERCONTROLDETAILS_LISTTEXT - { - public UInt32 dwParam1; - public UInt32 dwParam2; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MIXER_LONG_NAME_CHARS)] - public String szName; - } - - // http://msdn.microsoft.com/en-us/library/dd757298%28VS.85%29.aspx - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] - public struct MIXERCONTROLDETAILS_UNSIGNED - { - public UInt32 dwValue; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerInterop.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/MixerInterop.cs.meta deleted file mode 100644 index b21bae3..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerInterop.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 87ac23ac95bb1f5468d8c68a2e9aaaf4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerLine.cs b/Assets/Scripts/Audio/NAudio/Mixer/MixerLine.cs deleted file mode 100644 index 4a42e92..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerLine.cs +++ /dev/null @@ -1,288 +0,0 @@ -// created on 10/12/2002 at 20:37 -using System; -using System.Runtime.InteropServices; -using NAudio.Wave; -using System.Collections.Generic; - -namespace NAudio.Mixer -{ - /// - /// Represents a mixer line (source or destination) - /// - public class MixerLine - { - private MixerInterop.MIXERLINE mixerLine; - private IntPtr mixerHandle; - private MixerFlags mixerHandleType; - - /// - /// Creates a new mixer destination - /// - /// Mixer Handle - /// Destination Index - /// Mixer Handle Type - public MixerLine(IntPtr mixerHandle, int destinationIndex, MixerFlags mixerHandleType) - { - this.mixerHandle = mixerHandle; - this.mixerHandleType = mixerHandleType; - mixerLine = new MixerInterop.MIXERLINE(); - mixerLine.cbStruct = Marshal.SizeOf(mixerLine); - mixerLine.dwDestination = destinationIndex; - MmException.Try(MixerInterop.mixerGetLineInfo(mixerHandle, ref mixerLine, mixerHandleType | MixerFlags.GetLineInfoOfDestination), "mixerGetLineInfo"); - } - - /// - /// Creates a new Mixer Source For a Specified Source - /// - /// Mixer Handle - /// Destination Index - /// Source Index - /// Flag indicating the meaning of mixerHandle - public MixerLine(IntPtr mixerHandle, int destinationIndex, int sourceIndex, MixerFlags mixerHandleType) - { - this.mixerHandle = mixerHandle; - this.mixerHandleType = mixerHandleType; - mixerLine = new MixerInterop.MIXERLINE(); - mixerLine.cbStruct = Marshal.SizeOf(mixerLine); - mixerLine.dwDestination = destinationIndex; - mixerLine.dwSource = sourceIndex; - MmException.Try(MixerInterop.mixerGetLineInfo(mixerHandle, ref mixerLine, mixerHandleType | MixerFlags.GetLineInfoOfSource), "mixerGetLineInfo"); - } - - /// - /// Creates a new Mixer Source - /// - /// Wave In Device - public static int GetMixerIdForWaveIn(int waveInDevice) - { - int mixerId = -1; - MmException.Try(MixerInterop.mixerGetID((IntPtr)waveInDevice, out mixerId, MixerFlags.WaveIn), "mixerGetID"); - return mixerId; - } - - /// - /// Mixer Line Name - /// - public String Name - { - get - { - return mixerLine.szName; - } - } - - /// - /// Mixer Line short name - /// - public String ShortName - { - get - { - return mixerLine.szShortName; - } - } - - /// - /// The line ID - /// - public int LineId - { - get - { - return mixerLine.dwLineID; - } - } - - /// - /// Component Type - /// - public MixerLineComponentType ComponentType - { - get - { - return mixerLine.dwComponentType; - } - } - - /// - /// Mixer destination type description - /// - public String TypeDescription - { - get - { - switch (mixerLine.dwComponentType) - { - // destinations - case MixerLineComponentType.DestinationUndefined: - return "Undefined Destination"; - case MixerLineComponentType.DestinationDigital: - return "Digital Destination"; - case MixerLineComponentType.DestinationLine: - return "Line Level Destination"; - case MixerLineComponentType.DestinationMonitor: - return "Monitor Destination"; - case MixerLineComponentType.DestinationSpeakers: - return "Speakers Destination"; - case MixerLineComponentType.DestinationHeadphones: - return "Headphones Destination"; - case MixerLineComponentType.DestinationTelephone: - return "Telephone Destination"; - case MixerLineComponentType.DestinationWaveIn: - return "Wave Input Destination"; - case MixerLineComponentType.DestinationVoiceIn: - return "Voice Recognition Destination"; - // sources - case MixerLineComponentType.SourceUndefined: - return "Undefined Source"; - case MixerLineComponentType.SourceDigital: - return "Digital Source"; - case MixerLineComponentType.SourceLine: - return "Line Level Source"; - case MixerLineComponentType.SourceMicrophone: - return "Microphone Source"; - case MixerLineComponentType.SourceSynthesizer: - return "Synthesizer Source"; - case MixerLineComponentType.SourceCompactDisc: - return "Compact Disk Source"; - case MixerLineComponentType.SourceTelephone: - return "Telephone Source"; - case MixerLineComponentType.SourcePcSpeaker: - return "PC Speaker Source"; - case MixerLineComponentType.SourceWaveOut: - return "Wave Out Source"; - case MixerLineComponentType.SourceAuxiliary: - return "Auxiliary Source"; - case MixerLineComponentType.SourceAnalog: - return "Analog Source"; - default: - return "Invalid Component Type"; - } - } - } - - /// - /// Number of channels - /// - public int Channels - { - get - { - return mixerLine.cChannels; - } - } - - /// - /// Number of sources - /// - public int SourceCount - { - get - { - return mixerLine.cConnections; - } - } - - /// - /// Number of controls - /// - public int ControlsCount - { - get - { - return mixerLine.cControls; - } - } - - /// - /// Is this destination active - /// - public bool IsActive - { - get - { - return (mixerLine.fdwLine & MixerInterop.MIXERLINE_LINEF.MIXERLINE_LINEF_ACTIVE) != 0; - } - } - - /// - /// Is this destination disconnected - /// - public bool IsDisconnected - { - get - { - return (mixerLine.fdwLine & MixerInterop.MIXERLINE_LINEF.MIXERLINE_LINEF_DISCONNECTED) != 0; - } - } - - /// - /// Is this destination a source - /// - public bool IsSource - { - get - { - return (mixerLine.fdwLine & MixerInterop.MIXERLINE_LINEF.MIXERLINE_LINEF_SOURCE) != 0; - } - } - - /// - /// Gets the specified source - /// - public MixerLine GetSource(int sourceIndex) - { - if(sourceIndex < 0 || sourceIndex >= SourceCount) - { - throw new ArgumentOutOfRangeException("sourceIndex"); - } - return new MixerLine(mixerHandle, mixerLine.dwDestination, sourceIndex, this.mixerHandleType); - } - - /// - /// Enumerator for the controls on this Mixer Limne - /// - public IEnumerable Controls - { - get - { - return MixerControl.GetMixerControls(this.mixerHandle, this, this.mixerHandleType); - } - } - - /// - /// Enumerator for the sources on this Mixer Line - /// - public IEnumerable Sources - { - get - { - for (int source = 0; source < SourceCount; source++) - { - yield return GetSource(source); - } - } - } - - /// - /// The name of the target output device - /// - public string TargetName - { - get - { - return mixerLine.szPname; - } - } - - /// - /// Describes this Mixer Line (for diagnostic purposes) - /// - public override string ToString() - { - return String.Format("{0} {1} ({2} controls, ID={3})", - Name, TypeDescription, ControlsCount, mixerLine.dwLineID); - } - } -} - diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerLine.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/MixerLine.cs.meta deleted file mode 100644 index 46cdaac..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerLine.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b051aa10bc27238428b9a0feb706b337 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerLineComponentType.cs b/Assets/Scripts/Audio/NAudio/Mixer/MixerLineComponentType.cs deleted file mode 100644 index 3c7549a..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerLineComponentType.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Mixer -{ - /// - /// Mixer Line Component type enumeration - /// - public enum MixerLineComponentType - { - /// - /// Audio line is a destination that cannot be defined by one of the standard component types. A mixer device is required to use this component type for line component types that have not been defined by Microsoft Corporation. - /// MIXERLINE_COMPONENTTYPE_DST_UNDEFINED - /// - DestinationUndefined = 0, - /// - /// Audio line is a digital destination (for example, digital input to a DAT or CD audio device). - /// MIXERLINE_COMPONENTTYPE_DST_DIGITAL - /// - DestinationDigital = 1, - /// - /// Audio line is a line level destination (for example, line level input from a CD audio device) that will be the final recording source for the analog-to-digital converter (ADC). Because most audio cards for personal computers provide some sort of gain for the recording audio source line, the mixer device will use the MIXERLINE_COMPONENTTYPE_DST_WAVEIN type. - /// MIXERLINE_COMPONENTTYPE_DST_LINE - /// - DestinationLine = 2, - /// - /// Audio line is a destination used for a monitor. - /// MIXERLINE_COMPONENTTYPE_DST_MONITOR - /// - DestinationMonitor = 3, - /// - /// Audio line is an adjustable (gain and/or attenuation) destination intended to drive speakers. This is the typical component type for the audio output of audio cards for personal computers. - /// MIXERLINE_COMPONENTTYPE_DST_SPEAKERS - /// - DestinationSpeakers = 4, - /// - /// Audio line is an adjustable (gain and/or attenuation) destination intended to drive headphones. Most audio cards use the same audio destination line for speakers and headphones, in which case the mixer device simply uses the MIXERLINE_COMPONENTTYPE_DST_SPEAKERS type. - /// MIXERLINE_COMPONENTTYPE_DST_HEADPHONES - /// - DestinationHeadphones = 5, - /// - /// Audio line is a destination that will be routed to a telephone line. - /// MIXERLINE_COMPONENTTYPE_DST_TELEPHONE - /// - DestinationTelephone = 6, - /// - /// Audio line is a destination that will be the final recording source for the waveform-audio input (ADC). This line typically provides some sort of gain or attenuation. This is the typical component type for the recording line of most audio cards for personal computers. - /// MIXERLINE_COMPONENTTYPE_DST_WAVEIN - /// - DestinationWaveIn = 7, - /// - /// Audio line is a destination that will be the final recording source for voice input. This component type is exactly like MIXERLINE_COMPONENTTYPE_DST_WAVEIN but is intended specifically for settings used during voice recording/recognition. Support for this line is optional for a mixer device. Many mixer devices provide only MIXERLINE_COMPONENTTYPE_DST_WAVEIN. - /// MIXERLINE_COMPONENTTYPE_DST_VOICEIN - /// - DestinationVoiceIn = 8, - /// - /// Audio line is a source that cannot be defined by one of the standard component types. A mixer device is required to use this component type for line component types that have not been defined by Microsoft Corporation. - /// MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED - /// - SourceUndefined = 0x1000, - /// - /// Audio line is a digital source (for example, digital output from a DAT or audio CD). - /// MIXERLINE_COMPONENTTYPE_SRC_DIGITAL - /// - SourceDigital = 0x1001, - /// - /// Audio line is a line-level source (for example, line-level input from an external stereo) that can be used as an optional recording source. Because most audio cards for personal computers provide some sort of gain for the recording source line, the mixer device will use the MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY type. - /// MIXERLINE_COMPONENTTYPE_SRC_LINE - /// - SourceLine = 0x1002, - /// - /// Audio line is a microphone recording source. Most audio cards for personal computers provide at least two types of recording sources: an auxiliary audio line and microphone input. A microphone audio line typically provides some sort of gain. Audio cards that use a single input for use with a microphone or auxiliary audio line should use the MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE component type. - /// MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE - /// - SourceMicrophone = 0x1003, - /// - /// Audio line is a source originating from the output of an internal synthesizer. Most audio cards for personal computers provide some sort of MIDI synthesizer (for example, an Adlib®-compatible or OPL/3 FM synthesizer). - /// MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER - /// - SourceSynthesizer = 0x1004, - /// - /// Audio line is a source originating from the output of an internal audio CD. This component type is provided for audio cards that provide an audio source line intended to be connected to an audio CD (or CD-ROM playing an audio CD). - /// MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC - /// - SourceCompactDisc = 0x1005, - /// - /// Audio line is a source originating from an incoming telephone line. - /// MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE - /// - SourceTelephone = 0x1006, - /// - /// Audio line is a source originating from personal computer speaker. Several audio cards for personal computers provide the ability to mix what would typically be played on the internal speaker with the output of an audio card. Some audio cards support the ability to use this output as a recording source. - /// MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER - /// - SourcePcSpeaker = 0x1007, - /// - /// Audio line is a source originating from the waveform-audio output digital-to-analog converter (DAC). Most audio cards for personal computers provide this component type as a source to the MIXERLINE_COMPONENTTYPE_DST_SPEAKERS destination. Some cards also allow this source to be routed to the MIXERLINE_COMPONENTTYPE_DST_WAVEIN destination. - /// MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT - /// - SourceWaveOut = 0x1008, - /// - /// Audio line is a source originating from the auxiliary audio line. This line type is intended as a source with gain or attenuation that can be routed to the MIXERLINE_COMPONENTTYPE_DST_SPEAKERS destination and/or recorded from the MIXERLINE_COMPONENTTYPE_DST_WAVEIN destination. - /// MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY - /// - SourceAuxiliary = 0x1009, - /// - /// Audio line is an analog source (for example, analog output from a video-cassette tape). - /// MIXERLINE_COMPONENTTYPE_SRC_ANALOG - /// - SourceAnalog = 0x100A, - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/MixerLineComponentType.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/MixerLineComponentType.cs.meta deleted file mode 100644 index 3fb4c31..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/MixerLineComponentType.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ec247b3d0435736408ab2abbaaa46e1f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/SignedMixerControl.cs b/Assets/Scripts/Audio/NAudio/Mixer/SignedMixerControl.cs deleted file mode 100644 index 0ed5ddd..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/SignedMixerControl.cs +++ /dev/null @@ -1,99 +0,0 @@ -// created on 13/12/2002 at 22:01 -using System; -using System.Runtime.InteropServices; -using NAudio.Wave; - -namespace NAudio.Mixer -{ - /// - /// Represents a signed mixer control - /// - public class SignedMixerControl : MixerControl - { - private MixerInterop.MIXERCONTROLDETAILS_SIGNED signedDetails; - - internal SignedMixerControl(MixerInterop.MIXERCONTROL mixerControl, IntPtr mixerHandle, MixerFlags mixerHandleType, int nChannels) - { - this.mixerControl = mixerControl; - this.mixerHandle = mixerHandle; - this.mixerHandleType = mixerHandleType; - this.nChannels = nChannels; - this.mixerControlDetails = new MixerInterop.MIXERCONTROLDETAILS(); - GetControlDetails(); - } - - /// - /// Gets details for this contrl - /// - protected override void GetDetails(IntPtr pDetails) - { - signedDetails = (MixerInterop.MIXERCONTROLDETAILS_SIGNED) Marshal.PtrToStructure(mixerControlDetails.paDetails,typeof(MixerInterop.MIXERCONTROLDETAILS_SIGNED)); - } - - /// - /// The value of the control - /// - public int Value - { - get - { - GetControlDetails(); - return signedDetails.lValue; - } - set - { - signedDetails.lValue = value; - mixerControlDetails.paDetails = Marshal.AllocHGlobal(Marshal.SizeOf(signedDetails)); - Marshal.StructureToPtr(signedDetails, mixerControlDetails.paDetails, false); - MmException.Try(MixerInterop.mixerSetControlDetails(mixerHandle, ref mixerControlDetails, MixerFlags.Value | mixerHandleType), "mixerSetControlDetails"); - Marshal.FreeHGlobal(mixerControlDetails.paDetails); - } - } - - /// - /// Minimum value for this control - /// - public int MinValue - { - get - { - return mixerControl.Bounds.minimum; - } - } - - /// - /// Maximum value for this control - /// - public int MaxValue - { - get - { - return mixerControl.Bounds.maximum; - } - } - - /// - /// Value of the control represented as a percentage - /// - public double Percent - { - get - { - return 100.0 * (Value - MinValue) / (double)(MaxValue - MinValue); - } - set - { - Value = (int)(MinValue + (value / 100.0) * (MaxValue - MinValue)); - } - } - - /// - /// String Representation for debugging purposes - /// - /// - public override string ToString() - { - return String.Format("{0} {1}%", base.ToString(), Percent); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/SignedMixerControl.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/SignedMixerControl.cs.meta deleted file mode 100644 index 9b25ee2..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/SignedMixerControl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aedeac8e700729b4292362779193082f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Mixer/UnsignedMixerControl.cs b/Assets/Scripts/Audio/NAudio/Mixer/UnsignedMixerControl.cs deleted file mode 100644 index 425521e..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/UnsignedMixerControl.cs +++ /dev/null @@ -1,108 +0,0 @@ -// created on 13/12/2002 at 22:04 -using System; -using System.Runtime.InteropServices; -using NAudio.Wave; - -namespace NAudio.Mixer -{ - /// - /// Represents an unsigned mixer control - /// - public class UnsignedMixerControl : MixerControl - { - private MixerInterop.MIXERCONTROLDETAILS_UNSIGNED[] unsignedDetails; - - internal UnsignedMixerControl(MixerInterop.MIXERCONTROL mixerControl,IntPtr mixerHandle, MixerFlags mixerHandleType, int nChannels) - { - this.mixerControl = mixerControl; - this.mixerHandle = mixerHandle; - this.mixerHandleType = mixerHandleType; - this.nChannels = nChannels; - this.mixerControlDetails = new MixerInterop.MIXERCONTROLDETAILS(); - GetControlDetails(); - } - - /// - /// Gets the details for this control - /// - protected override void GetDetails(IntPtr pDetails) - { - unsignedDetails = new MixerInterop.MIXERCONTROLDETAILS_UNSIGNED[nChannels]; - for (int channel = 0; channel < nChannels; channel++) - { - unsignedDetails[channel] = (MixerInterop.MIXERCONTROLDETAILS_UNSIGNED)Marshal.PtrToStructure(mixerControlDetails.paDetails, typeof(MixerInterop.MIXERCONTROLDETAILS_UNSIGNED)); - } - } - - /// - /// The control value - /// - public uint Value - { - get - { - GetControlDetails(); - return unsignedDetails[0].dwValue; - } - set - { - int structSize = Marshal.SizeOf(unsignedDetails[0]); - - mixerControlDetails.paDetails = Marshal.AllocHGlobal(structSize * nChannels); - for (int channel = 0; channel < nChannels; channel++) - { - unsignedDetails[channel].dwValue = value; - long pointer = mixerControlDetails.paDetails.ToInt64() + (structSize * channel); - Marshal.StructureToPtr(unsignedDetails[channel], (IntPtr)pointer, false); - } - MmException.Try(MixerInterop.mixerSetControlDetails(mixerHandle, ref mixerControlDetails, MixerFlags.Value | mixerHandleType), "mixerSetControlDetails"); - Marshal.FreeHGlobal(mixerControlDetails.paDetails); - } - } - - /// - /// The control's minimum value - /// - public UInt32 MinValue - { - get - { - return (uint) mixerControl.Bounds.minimum; - } - } - - /// - /// The control's maximum value - /// - public UInt32 MaxValue - { - get - { - return (uint) mixerControl.Bounds.maximum; - } - } - - /// - /// Value of the control represented as a percentage - /// - public double Percent - { - get - { - return 100.0 * (Value - MinValue) / (double)(MaxValue - MinValue); - } - set - { - Value = (uint)(MinValue + (value / 100.0) * (MaxValue - MinValue)); - } - } - - /// - /// String Representation for debugging purposes - /// - public override string ToString() - { - return String.Format("{0} {1}%", base.ToString(), Percent); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Mixer/UnsignedMixerControl.cs.meta b/Assets/Scripts/Audio/NAudio/Mixer/UnsignedMixerControl.cs.meta deleted file mode 100644 index 9f0363d..0000000 --- a/Assets/Scripts/Audio/NAudio/Mixer/UnsignedMixerControl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 46379bcf10ae51847ba90690fad2b2b1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Properties.meta b/Assets/Scripts/Audio/NAudio/Properties.meta deleted file mode 100644 index e33ba09..0000000 --- a/Assets/Scripts/Audio/NAudio/Properties.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f1653cab8d1493049a6eb7d0b252b5b6 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Properties/AssemblyInfo.cs b/Assets/Scripts/Audio/NAudio/Properties/AssemblyInfo.cs deleted file mode 100644 index 63cc4c6..0000000 --- a/Assets/Scripts/Audio/NAudio/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NAudio")] -[assembly: AssemblyDescription("NAudio .NET Audio Library")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Mark Heath")] -[assembly: AssemblyProduct("NAudio")] -[assembly: AssemblyCopyright("© 2001-2017 Mark Heath")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: InternalsVisibleTo("NAudioTests")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e82fa7f0-f952-4d93-b7b0-392bbf53b2a4")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.8.4.0")] -[assembly: AssemblyFileVersion("1.8.4.0")] diff --git a/Assets/Scripts/Audio/NAudio/Properties/AssemblyInfo.cs.meta b/Assets/Scripts/Audio/NAudio/Properties/AssemblyInfo.cs.meta deleted file mode 100644 index 282e5f9..0000000 --- a/Assets/Scripts/Audio/NAudio/Properties/AssemblyInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 108338a31ba7d85428ac6d77e3475d92 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils.meta b/Assets/Scripts/Audio/NAudio/Utils.meta deleted file mode 100644 index c2758bc..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 25e76c1cba5aa5f4083cb28141d4e88e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/BufferHelpers.cs b/Assets/Scripts/Audio/NAudio/Utils/BufferHelpers.cs deleted file mode 100644 index 9b7463b..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/BufferHelpers.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace NAudio.Utils -{ - /// - /// Helper methods for working with audio buffers - /// - public static class BufferHelpers - { - /// - /// Ensures the buffer is big enough - /// - /// - /// - /// - public static byte[] Ensure(byte[] buffer, int bytesRequired) - { - if (buffer == null || buffer.Length < bytesRequired) - { - buffer = new byte[bytesRequired]; - } - return buffer; - } - - /// - /// Ensures the buffer is big enough - /// - /// - /// - /// - public static float[] Ensure(float[] buffer, int samplesRequired) - { - if (buffer == null || buffer.Length < samplesRequired) - { - buffer = new float[samplesRequired]; - } - return buffer; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/BufferHelpers.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/BufferHelpers.cs.meta deleted file mode 100644 index f0fce63..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/BufferHelpers.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2341f019e10efe24caaebcf69149fe3a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/ByteArrayExtensions.cs b/Assets/Scripts/Audio/NAudio/Utils/ByteArrayExtensions.cs deleted file mode 100644 index 13b937b..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/ByteArrayExtensions.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Text; - -namespace NAudio.Utils -{ - /// - /// these will become extension methods once we move to .NET 3.5 - /// - public static class ByteArrayExtensions - { - /// - /// Checks if the buffer passed in is entirely full of nulls - /// - public static bool IsEntirelyNull(byte[] buffer) - { - foreach (byte b in buffer) - if (b != 0) - return false; - return true; - } - - /// - /// Converts to a string containing the buffer described in hex - /// - public static string DescribeAsHex(byte[] buffer, string separator, int bytesPerLine) - { - StringBuilder sb = new StringBuilder(); - int n = 0; - foreach (byte b in buffer) - { - sb.AppendFormat("{0:X2}{1}", b, separator); - if (++n % bytesPerLine == 0) - sb.Append("\r\n"); - } - sb.Append("\r\n"); - return sb.ToString(); - } - - /// - /// Decodes the buffer using the specified encoding, stopping at the first null - /// - public static string DecodeAsString(byte[] buffer, int offset, int length, Encoding encoding) - { - for (int n = 0; n < length; n++) - { - if (buffer[offset + n] == 0) - length = n; - } - return encoding.GetString(buffer, offset, length); - } - - /// - /// Concatenates the given arrays into a single array. - /// - /// The arrays to concatenate - /// The concatenated resulting array. - public static byte[] Concat(params byte[][] byteArrays) - { - int size = 0; - foreach (byte[] btArray in byteArrays) - { - size += btArray.Length; - } - - if (size <= 0) - { - return new byte[0]; - } - - byte[] result = new byte[size]; - int idx = 0; - foreach (byte[] btArray in byteArrays) - { - Array.Copy(btArray, 0, result, idx, btArray.Length); - idx += btArray.Length; - } - - return result; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/ByteArrayExtensions.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/ByteArrayExtensions.cs.meta deleted file mode 100644 index 4759295..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/ByteArrayExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6881ff6ef64740b40ba783fa38d68c65 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/ByteEncoding.cs b/Assets/Scripts/Audio/NAudio/Utils/ByteEncoding.cs deleted file mode 100644 index 48fc54a..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/ByteEncoding.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Text; - -namespace NAudio.Utils -{ - /// - /// An encoding for use with file types that have one byte per character - /// - public class ByteEncoding : Encoding - { - private ByteEncoding() - { - } - - /// - /// The one and only instance of this class - /// - public static readonly ByteEncoding Instance = new ByteEncoding(); - - /// - /// - /// - public override int GetByteCount(char[] chars, int index, int count) - { - return count; - } - - /// - /// - /// - public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) - { - for (int n = 0; n < charCount; n++) - { - bytes[byteIndex + n] = (byte)chars[charIndex + n]; - } - return charCount; - } - - /// - /// - /// - public override int GetCharCount(byte[] bytes, int index, int count) - { - for (int n = 0; n < count; n++) - { - if (bytes[index + n] == 0) - return n; - } - return count; - } - - /// - /// - /// - public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) - { - for (int n = 0; n < byteCount; n++) - { - var b = bytes[byteIndex + n]; - if (b == 0) - { - return n; - } - chars[charIndex + n] = (char)b; - } - return byteCount; - } - - /// - /// - /// - public override int GetMaxCharCount(int byteCount) - { - return byteCount; - } - - /// - /// - /// - public override int GetMaxByteCount(int charCount) - { - return charCount; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/ByteEncoding.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/ByteEncoding.cs.meta deleted file mode 100644 index 671cee8..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/ByteEncoding.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 55a33ddeac87c3e49b6f2e9f126f84ba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/ChunkIdentifier.cs b/Assets/Scripts/Audio/NAudio/Utils/ChunkIdentifier.cs deleted file mode 100644 index e0042cb..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/ChunkIdentifier.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Linq; -using System.Text; - -namespace NAudio.Utils -{ - /// - /// Chunk Identifier helpers - /// - public class ChunkIdentifier - { - /// - /// Chunk identifier to Int32 (replaces mmioStringToFOURCC) - /// - /// four character chunk identifier - /// Chunk identifier as int 32 - public static int ChunkIdentifierToInt32(string s) - { - if (s.Length != 4) throw new ArgumentException("Must be a four character string"); - var bytes = Encoding.UTF8.GetBytes(s); - if (bytes.Length != 4) throw new ArgumentException("Must encode to exactly four bytes"); - return BitConverter.ToInt32(bytes, 0); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/ChunkIdentifier.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/ChunkIdentifier.cs.meta deleted file mode 100644 index d4d0e65..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/ChunkIdentifier.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2f1ac25a7d26d014a9fa98faad4f65f8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/CircularBuffer.cs b/Assets/Scripts/Audio/NAudio/Utils/CircularBuffer.cs deleted file mode 100644 index a4ba73e..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/CircularBuffer.cs +++ /dev/null @@ -1,157 +0,0 @@ -using System; -using System.Diagnostics; - -namespace NAudio.Utils -{ - /// - /// A very basic circular buffer implementation - /// - public class CircularBuffer - { - private readonly byte[] buffer; - private readonly object lockObject; - private int writePosition; - private int readPosition; - private int byteCount; - - /// - /// Create a new circular buffer - /// - /// Max buffer size in bytes - public CircularBuffer(int size) - { - buffer = new byte[size]; - lockObject = new object(); - } - - /// - /// Write data to the buffer - /// - /// Data to write - /// Offset into data - /// Number of bytes to write - /// number of bytes written - public int Write(byte[] data, int offset, int count) - { - lock (lockObject) - { - var bytesWritten = 0; - if (count > buffer.Length - byteCount) - { - count = buffer.Length - byteCount; - } - // write to end - int writeToEnd = Math.Min(buffer.Length - writePosition, count); - Array.Copy(data, offset, buffer, writePosition, writeToEnd); - writePosition += writeToEnd; - writePosition %= buffer.Length; - bytesWritten += writeToEnd; - if (bytesWritten < count) - { - Debug.Assert(writePosition == 0); - // must have wrapped round. Write to start - Array.Copy(data, offset + bytesWritten, buffer, writePosition, count - bytesWritten); - writePosition += (count - bytesWritten); - bytesWritten = count; - } - byteCount += bytesWritten; - return bytesWritten; - } - } - - /// - /// Read from the buffer - /// - /// Buffer to read into - /// Offset into read buffer - /// Bytes to read - /// Number of bytes actually read - public int Read(byte[] data, int offset, int count) - { - lock (lockObject) - { - if (count > byteCount) - { - count = byteCount; - } - int bytesRead = 0; - int readToEnd = Math.Min(buffer.Length - readPosition, count); - Array.Copy(buffer, readPosition, data, offset, readToEnd); - bytesRead += readToEnd; - readPosition += readToEnd; - readPosition %= buffer.Length; - - if (bytesRead < count) - { - // must have wrapped round. Read from start - Debug.Assert(readPosition == 0); - Array.Copy(buffer, readPosition, data, offset + bytesRead, count - bytesRead); - readPosition += (count - bytesRead); - bytesRead = count; - } - - byteCount -= bytesRead; - Debug.Assert(byteCount >= 0); - return bytesRead; - } - } - - /// - /// Maximum length of this circular buffer - /// - public int MaxLength => buffer.Length; - - /// - /// Number of bytes currently stored in the circular buffer - /// - public int Count - { - get - { - lock (lockObject) - { - return byteCount; - } - } - } - - /// - /// Resets the buffer - /// - public void Reset() - { - lock (lockObject) - { - ResetInner(); - } - } - - private void ResetInner() - { - byteCount = 0; - readPosition = 0; - writePosition = 0; - } - - /// - /// Advances the buffer, discarding bytes - /// - /// Bytes to advance - public void Advance(int count) - { - lock (lockObject) - { - if (count >= byteCount) - { - ResetInner(); - } - else - { - byteCount -= count; - readPosition += count; - readPosition %= MaxLength; - } - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/CircularBuffer.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/CircularBuffer.cs.meta deleted file mode 100644 index 3bebcdc..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/CircularBuffer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f532edf197b41f34290cb12c39cf5164 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/Decibels.cs b/Assets/Scripts/Audio/NAudio/Utils/Decibels.cs deleted file mode 100644 index 0e68d40..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/Decibels.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; - -namespace NAudio.Utils -{ - /// - /// A util class for conversions - /// - public class Decibels - { - // 20 / ln( 10 ) - private const double LOG_2_DB = 8.6858896380650365530225783783321; - - // ln( 10 ) / 20 - private const double DB_2_LOG = 0.11512925464970228420089957273422; - - /// - /// linear to dB conversion - /// - /// linear value - /// decibel value - public static double LinearToDecibels(double lin) - { - return Math.Log(lin) * LOG_2_DB; - } - - /// - /// dB to linear conversion - /// - /// decibel value - /// linear value - public static double DecibelsToLinear(double dB) - { - return Math.Exp(dB * DB_2_LOG); - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/Decibels.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/Decibels.cs.meta deleted file mode 100644 index 81b8b18..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/Decibels.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 800fab25b56697d4b87632e056e77988 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionAttribute.cs b/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionAttribute.cs deleted file mode 100644 index 6330368..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionAttribute.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; - -namespace NAudio.Utils -{ - /// - /// Allows us to add descriptions to interop members - /// - [AttributeUsage(AttributeTargets.Field)] - public class FieldDescriptionAttribute : Attribute - { - /// - /// The description - /// - public string Description { get; } - - /// - /// Field description - /// - public FieldDescriptionAttribute(string description) - { - Description = description; - } - - /// - /// String representation - /// - /// - public override string ToString() - { - return Description; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionAttribute.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionAttribute.cs.meta deleted file mode 100644 index 05c052c..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c6ed5761eaab7d745b98bae10be27891 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionHelper.cs b/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionHelper.cs deleted file mode 100644 index 3766f73..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionHelper.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Reflection; - -namespace NAudio.Utils -{ - /// - /// Helper to get descriptions - /// - public static class FieldDescriptionHelper - { - /// - /// Describes the Guid by looking for a FieldDescription attribute on the specified class - /// - public static string Describe(Type t, Guid guid) - { - // when we go to .NET 3.5, use LINQ for this - foreach (var f in t -#if NETFX_CORE - .GetRuntimeFields()) -#else - .GetFields(BindingFlags.Static | BindingFlags.Public)) -#endif - { - if (f.IsPublic && f.IsStatic && f.FieldType == typeof (Guid) && (Guid) f.GetValue(null) == guid) - { - foreach (var a in f.GetCustomAttributes(false)) - { - var d = a as FieldDescriptionAttribute; - if (d != null) - { - return d.Description; - } - } - // no attribute, return the name - return f.Name; - } - } - return guid.ToString(); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionHelper.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionHelper.cs.meta deleted file mode 100644 index e7396b1..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/FieldDescriptionHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d48d1f29fa53b754bba79c833afc340a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/HResult.cs b/Assets/Scripts/Audio/NAudio/Utils/HResult.cs deleted file mode 100644 index d07f8c9..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/HResult.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Utils -{ - /// - /// HResult - /// - public static class HResult - { - /// - /// S_OK - /// - public const int S_OK = 0; - /// - /// S_FALSE - /// - public const int S_FALSE = 1; - /// - /// E_INVALIDARG (from winerror.h) - /// - public const int E_INVALIDARG = unchecked((int)0x80000003); - /// - /// MAKE_HRESULT macro - /// - public static int MAKE_HRESULT(int sev, int fac, int code) - { - return (int) (((uint)sev) << 31 | ((uint)fac) << 16 | ((uint)code)); - } - - const int FACILITY_AAF = 18; - const int FACILITY_ACS = 20; - const int FACILITY_BACKGROUNDCOPY = 32; - const int FACILITY_CERT = 11; - const int FACILITY_COMPLUS = 17; - const int FACILITY_CONFIGURATION = 33; - const int FACILITY_CONTROL = 10; - const int FACILITY_DISPATCH = 2; - const int FACILITY_DPLAY = 21; - const int FACILITY_HTTP = 25; - const int FACILITY_INTERNET = 12; - const int FACILITY_ITF = 4; - const int FACILITY_MEDIASERVER = 13; - const int FACILITY_MSMQ = 14; - const int FACILITY_NULL = 0; - const int FACILITY_RPC = 1; - const int FACILITY_SCARD = 16; - const int FACILITY_SECURITY = 9; - const int FACILITY_SETUPAPI = 15; - const int FACILITY_SSPI = 9; - const int FACILITY_STORAGE = 3; - const int FACILITY_SXS = 23; - const int FACILITY_UMI = 22; - const int FACILITY_URT = 19; - const int FACILITY_WIN32 = 7; - const int FACILITY_WINDOWS = 8; - const int FACILITY_WINDOWS_CE = 24; - - /// - /// Helper to deal with the fact that in Win Store apps, - /// the HResult property name has changed - /// - /// COM Exception - /// The HResult - public static int GetHResult(this COMException exception) - { -#if NETFX_CORE - return exception.HResult; -#else - return exception.ErrorCode; -#endif - } - } - -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/HResult.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/HResult.cs.meta deleted file mode 100644 index 4bb4b64..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/HResult.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5c4fd94409cfcea4eb6d4548a17b2d94 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/IEEE.cs b/Assets/Scripts/Audio/NAudio/Utils/IEEE.cs deleted file mode 100644 index f683275..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/IEEE.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; - - -namespace NAudio.Utils -{ - /// - /// Methods for converting between IEEE 80-bit extended double precision - /// and standard C# double precision. - /// - public static class IEEE - { - #region Helper Methods - private static double UnsignedToFloat(ulong u) - { - return (((double)((long)(u - 2147483647L - 1))) + 2147483648.0); - } - - private static double ldexp(double x, int exp) - { - return x * Math.Pow(2, exp); - } - - private static double frexp(double x, out int exp) - { - exp = (int)Math.Floor(Math.Log(x) / Math.Log(2)) + 1; - return 1 - (Math.Pow(2, exp) - x) / Math.Pow(2, exp); - } - - private static ulong FloatToUnsigned(double f) - { - return ((ulong)(((long)(f - 2147483648.0)) + 2147483647L) + 1); - } - #endregion - - #region ConvertToIeeeExtended - /// - /// Converts a C# double precision number to an 80-bit - /// IEEE extended double precision number (occupying 10 bytes). - /// - /// The double precision number to convert to IEEE extended. - /// An array of 10 bytes containing the IEEE extended number. - public static byte[] ConvertToIeeeExtended(double num) - { - int sign; - int expon; - double fMant, fsMant; - ulong hiMant, loMant; - - if (num < 0) - { - sign = 0x8000; - num *= -1; - } - else - { - sign = 0; - } - - if (num == 0) - { - expon = 0; hiMant = 0; loMant = 0; - } - else - { - fMant = frexp(num, out expon); - if ((expon > 16384) || !(fMant < 1)) - { // Infinity or NaN - expon = sign | 0x7FFF; hiMant = 0; loMant = 0; // infinity - } - else - { // Finite - expon += 16382; - if (expon < 0) - { // denormalized - fMant = ldexp(fMant, expon); - expon = 0; - } - expon |= sign; - fMant = ldexp(fMant, 32); - fsMant = Math.Floor(fMant); - hiMant = FloatToUnsigned(fsMant); - fMant = ldexp(fMant - fsMant, 32); - fsMant = Math.Floor(fMant); - loMant = FloatToUnsigned(fsMant); - } - } - - byte[] bytes = new byte[10]; - - bytes[0] = (byte)(expon >> 8); - bytes[1] = (byte)(expon); - bytes[2] = (byte)(hiMant >> 24); - bytes[3] = (byte)(hiMant >> 16); - bytes[4] = (byte)(hiMant >> 8); - bytes[5] = (byte)(hiMant); - bytes[6] = (byte)(loMant >> 24); - bytes[7] = (byte)(loMant >> 16); - bytes[8] = (byte)(loMant >> 8); - bytes[9] = (byte)(loMant); - - return bytes; - } - #endregion - - #region ConvertFromIeeeExtended - /// - /// Converts an IEEE 80-bit extended precision number to a - /// C# double precision number. - /// - /// The 80-bit IEEE extended number (as an array of 10 bytes). - /// A C# double precision number that is a close representation of the IEEE extended number. - public static double ConvertFromIeeeExtended(byte[] bytes) - { - if (bytes.Length != 10) throw new Exception("Incorrect length for IEEE extended."); - double f; - int expon; - uint hiMant, loMant; - - expon = ((bytes[0] & 0x7F) << 8) | bytes[1]; - hiMant = (uint)((bytes[2] << 24) | (bytes[3] << 16) | (bytes[4] << 8) | bytes[5]); - loMant = (uint)((bytes[6] << 24) | (bytes[7] << 16) | (bytes[8] << 8) | bytes[9]); - - if (expon == 0 && hiMant == 0 && loMant == 0) - { - f = 0; - } - else - { - if (expon == 0x7FFF) /* Infinity or NaN */ - { - f = double.NaN; - } - else - { - expon -= 16383; - f = ldexp(UnsignedToFloat(hiMant), expon -= 31); - f += ldexp(UnsignedToFloat(loMant), expon -= 32); - } - } - - if ((bytes[0] & 0x80) == 0x80) return -f; - else return f; - } - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/IEEE.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/IEEE.cs.meta deleted file mode 100644 index 7b532d5..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/IEEE.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2aa62c96bb3681e47a611de06a4c8c4f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/IgnoreDisposeStream.cs b/Assets/Scripts/Audio/NAudio/Utils/IgnoreDisposeStream.cs deleted file mode 100644 index 591a31d..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/IgnoreDisposeStream.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.IO; - -namespace NAudio.Utils -{ - /// - /// Pass-through stream that ignores Dispose - /// Useful for dealing with MemoryStreams that you want to re-use - /// - public class IgnoreDisposeStream : Stream - { - /// - /// The source stream all other methods fall through to - /// - public Stream SourceStream { get; private set; } - - /// - /// If true the Dispose will be ignored, if false, will pass through to the SourceStream - /// Set to true by default - /// - public bool IgnoreDispose { get; set; } - - /// - /// Creates a new IgnoreDisposeStream - /// - /// The source stream - public IgnoreDisposeStream(Stream sourceStream) - { - SourceStream = sourceStream; - IgnoreDispose = true; - } - - /// - /// Can Read - /// - public override bool CanRead => SourceStream.CanRead; - - /// - /// Can Seek - /// - public override bool CanSeek => SourceStream.CanSeek; - - /// - /// Can write to the underlying stream - /// - public override bool CanWrite => SourceStream.CanWrite; - - /// - /// Flushes the underlying stream - /// - public override void Flush() - { - SourceStream.Flush(); - } - - /// - /// Gets the length of the underlying stream - /// - public override long Length => SourceStream.Length; - - /// - /// Gets or sets the position of the underlying stream - /// - public override long Position - { - get - { - return SourceStream.Position; - } - set - { - SourceStream.Position = value; - } - } - - /// - /// Reads from the underlying stream - /// - public override int Read(byte[] buffer, int offset, int count) - { - return SourceStream.Read(buffer, offset, count); - } - - /// - /// Seeks on the underlying stream - /// - public override long Seek(long offset, SeekOrigin origin) - { - return SourceStream.Seek(offset, origin); - } - - /// - /// Sets the length of the underlying stream - /// - public override void SetLength(long value) - { - SourceStream.SetLength(value); - } - - /// - /// Writes to the underlying stream - /// - public override void Write(byte[] buffer, int offset, int count) - { - SourceStream.Write(buffer, offset, count); - } - - /// - /// Dispose - by default (IgnoreDispose = true) will do nothing, - /// leaving the underlying stream undisposed - /// - protected override void Dispose(bool disposing) - { - if (!IgnoreDispose) - { - SourceStream.Dispose(); - SourceStream = null; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/IgnoreDisposeStream.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/IgnoreDisposeStream.cs.meta deleted file mode 100644 index 43997ed..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/IgnoreDisposeStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3f43a2f91a6b79049840dbee0d526115 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/MarshalHelpers.cs b/Assets/Scripts/Audio/NAudio/Utils/MarshalHelpers.cs deleted file mode 100644 index f21e36d..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/MarshalHelpers.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Utils -{ - /// - /// Support for Marshal Methods in both UWP and .NET 3.5 - /// - public static class MarshalHelpers - { - /// - /// SizeOf a structure - /// - public static int SizeOf() - { - return Marshal.SizeOf(typeof (T)); - } - - /// - /// Offset of a field in a structure - /// - public static IntPtr OffsetOf(string fieldName) - { - return Marshal.OffsetOf(typeof(T), fieldName); - } - - /// - /// Pointer to Structure - /// - public static T PtrToStructure(IntPtr pointer) - { - return (T)Marshal.PtrToStructure(pointer, typeof(T)); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/MarshalHelpers.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/MarshalHelpers.cs.meta deleted file mode 100644 index 3ebefdc..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/MarshalHelpers.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 678811a4e54d26a40919735206e0db1c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/MergeSort.cs b/Assets/Scripts/Audio/NAudio/Utils/MergeSort.cs deleted file mode 100644 index 3af8dfe..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/MergeSort.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NAudio.Utils -{ - class MergeSort - { - /// - /// In-place and stable implementation of MergeSort - /// - static void Sort(IList list, int lowIndex, int highIndex, IComparer comparer) - { - if (lowIndex >= highIndex) - { - return; - } - - - int midIndex = (lowIndex + highIndex) / 2; - - - // Partition the list into two lists and Sort them recursively - Sort(list, lowIndex, midIndex, comparer); - Sort(list, midIndex + 1, highIndex, comparer); - - // Merge the two sorted lists - int endLow = midIndex; - int startHigh = midIndex + 1; - - - while ((lowIndex <= endLow) && (startHigh <= highIndex)) - { - // MRH, if use < 0 sort is not stable - if (comparer.Compare(list[lowIndex], list[startHigh]) <= 0) - { - lowIndex++; - } - else - { - // list[lowIndex] > list[startHigh] - // The next element comes from the second list, - // move the list[start_hi] element into the next - // position and shuffle all the other elements up. - T t = list[startHigh]; - - for (int k = startHigh - 1; k >= lowIndex; k--) - { - list[k + 1] = list[k]; - } - - list[lowIndex] = t; - lowIndex++; - endLow++; - startHigh++; - } - } - } - - /// - /// MergeSort a list of comparable items - /// - public static void Sort(IList list) where T : IComparable - { - Sort(list, 0, list.Count - 1, Comparer.Default); - } - - /// - /// MergeSort a list - /// - public static void Sort(IList list, IComparer comparer) - { - Sort(list, 0, list.Count - 1, comparer); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/MergeSort.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/MergeSort.cs.meta deleted file mode 100644 index dcc3529..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/MergeSort.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 60ffbf0d6431bcd41b69ba5eeb46047e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/NativeMethods.cs b/Assets/Scripts/Audio/NAudio/Utils/NativeMethods.cs deleted file mode 100644 index 26f6f83..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/NativeMethods.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Utils -{ - /// - /// General purpose native methods for internal NAudio use - /// - class NativeMethods - { -#if !NETFX_CORE - [DllImport("kernel32.dll")] - public static extern IntPtr LoadLibrary(string dllToLoad); -#endif - - [DllImport("kernel32.dll")] - public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName); - - [DllImport("kernel32.dll")] - public static extern bool FreeLibrary(IntPtr hModule); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/NativeMethods.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/NativeMethods.cs.meta deleted file mode 100644 index fa60db2..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/NativeMethods.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1f7565be822c89743839806e6d9e0c2b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/ProgressLog.resx b/Assets/Scripts/Audio/NAudio/Utils/ProgressLog.resx deleted file mode 100644 index 19dc0dd..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/ProgressLog.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Utils/ProgressLog.resx.meta b/Assets/Scripts/Audio/NAudio/Utils/ProgressLog.resx.meta deleted file mode 100644 index 00c97f5..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/ProgressLog.resx.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 502cf8e99ef5881489efa0c7fd39c189 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Utils/WavePositionExtensions.cs b/Assets/Scripts/Audio/NAudio/Utils/WavePositionExtensions.cs deleted file mode 100644 index c9eb92a..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/WavePositionExtensions.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using NAudio.Wave; - -namespace NAudio.Utils -{ - /// - /// WavePosition extension methods - /// - public static class WavePositionExtensions - { - /// - /// Get Position as timespan - /// - public static TimeSpan GetPositionTimeSpan(this IWavePosition @this) - { - var pos = @this.GetPosition() / (@this.OutputWaveFormat.Channels * @this.OutputWaveFormat.BitsPerSample / 8); - return TimeSpan.FromMilliseconds(pos * 1000.0 / @this.OutputWaveFormat.SampleRate); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Utils/WavePositionExtensions.cs.meta b/Assets/Scripts/Audio/NAudio/Utils/WavePositionExtensions.cs.meta deleted file mode 100644 index 9006849..0000000 --- a/Assets/Scripts/Audio/NAudio/Utils/WavePositionExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4179902ba4ae34c4a9c674ba58aee3e5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave.meta b/Assets/Scripts/Audio/NAudio/Wave.meta deleted file mode 100644 index a5ba40a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4a5f5c6df79a0eb41b66756a095c73e0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression.meta deleted file mode 100644 index 65b261d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 44144d1b105863e4ab0d1a121b916482 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriver.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriver.cs deleted file mode 100644 index eb04bf5..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriver.cs +++ /dev/null @@ -1,355 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; -using NAudio.Utils; - -namespace NAudio.Wave.Compression -{ - /// - /// Represents an installed ACM Driver - /// - public class AcmDriver : IDisposable - { - private static List drivers; - private AcmDriverDetails details; - private IntPtr driverId; - private IntPtr driverHandle; - private List formatTags; - private List tempFormatsList; // used by enumerator - private IntPtr localDllHandle; - - /// - /// Helper function to determine whether a particular codec is installed - /// - /// The short name of the function - /// Whether the codec is installed - public static bool IsCodecInstalled(string shortName) - { - foreach (AcmDriver driver in EnumerateAcmDrivers()) - { - if (driver.ShortName == shortName) - { - return true; - } - } - return false; - } - - /// - /// Attempts to add a new ACM driver from a file - /// - /// Full path of the .acm or dll file containing the driver - /// Handle to the driver - public static AcmDriver AddLocalDriver(string driverFile) - { - IntPtr handle = NativeMethods.LoadLibrary(driverFile); - if (handle == IntPtr.Zero) - { - throw new ArgumentException("Failed to load driver file"); - } - var driverProc = NativeMethods.GetProcAddress(handle, "DriverProc"); - if (driverProc == IntPtr.Zero) - { - NativeMethods.FreeLibrary(handle); - throw new ArgumentException("Failed to discover DriverProc"); - } - IntPtr driverHandle; - var result = AcmInterop.acmDriverAdd(out driverHandle, - handle, driverProc, 0, AcmDriverAddFlags.Function); - if (result != MmResult.NoError) - { - NativeMethods.FreeLibrary(handle); - throw new MmException(result, "acmDriverAdd"); - } - var driver = new AcmDriver(driverHandle); - // long name seems to be missing when we use acmDriverAdd - if (string.IsNullOrEmpty(driver.details.longName)) - { - driver.details.longName = "Local driver: " + Path.GetFileName(driverFile); - driver.localDllHandle = handle; - } - return driver; - } - - /// - /// Removes a driver previously added using AddLocalDriver - /// - /// Local driver to remove - public static void RemoveLocalDriver(AcmDriver localDriver) - { - if (localDriver.localDllHandle == IntPtr.Zero) - { - throw new ArgumentException("Please pass in the AcmDriver returned by the AddLocalDriver method"); - } - var removeResult = AcmInterop.acmDriverRemove(localDriver.driverId, 0); // gets stored as a driver Id - NativeMethods.FreeLibrary(localDriver.localDllHandle); - MmException.Try(removeResult, "acmDriverRemove"); - } - - /// - /// Show Format Choose Dialog - /// - /// Owner window handle, can be null - /// Window title - /// Enumeration flags. None to get everything - /// Enumeration format. Only needed with certain enumeration flags - /// The selected format - /// Textual description of the selected format - /// Textual description of the selected format tag - /// True if a format was selected - public static bool ShowFormatChooseDialog( - IntPtr ownerWindowHandle, - string windowTitle, - AcmFormatEnumFlags enumFlags, - WaveFormat enumFormat, - out WaveFormat selectedFormat, - out string selectedFormatDescription, - out string selectedFormatTagDescription) - { - AcmFormatChoose formatChoose = new AcmFormatChoose(); - formatChoose.structureSize = Marshal.SizeOf(formatChoose); - formatChoose.styleFlags = AcmFormatChooseStyleFlags.None; - formatChoose.ownerWindowHandle = ownerWindowHandle; - int maxFormatSize = 200; // guess - formatChoose.selectedWaveFormatPointer = Marshal.AllocHGlobal(maxFormatSize); - formatChoose.selectedWaveFormatByteSize = maxFormatSize; - formatChoose.title = windowTitle; - formatChoose.name = null; - formatChoose.formatEnumFlags = enumFlags;//AcmFormatEnumFlags.None; - formatChoose.waveFormatEnumPointer = IntPtr.Zero; - if (enumFormat != null) - { - IntPtr enumPointer = Marshal.AllocHGlobal(Marshal.SizeOf(enumFormat)); - Marshal.StructureToPtr(enumFormat,enumPointer,false); - formatChoose.waveFormatEnumPointer = enumPointer; - } - formatChoose.instanceHandle = IntPtr.Zero; - formatChoose.templateName = null; - - MmResult result = AcmInterop.acmFormatChoose(ref formatChoose); - selectedFormat = null; - selectedFormatDescription = null; - selectedFormatTagDescription = null; - if (result == MmResult.NoError) - { - selectedFormat = WaveFormat.MarshalFromPtr(formatChoose.selectedWaveFormatPointer); - selectedFormatDescription = formatChoose.formatDescription; - selectedFormatTagDescription = formatChoose.formatTagDescription; - } - - Marshal.FreeHGlobal(formatChoose.waveFormatEnumPointer); - Marshal.FreeHGlobal(formatChoose.selectedWaveFormatPointer); - if(result != MmResult.AcmCancelled && result != MmResult.NoError) - { - throw new MmException(result, "acmFormatChoose"); - } - return result == MmResult.NoError; - - } - - /// - /// Gets the maximum size needed to store a WaveFormat for ACM interop functions - /// - public int MaxFormatSize - { - get - { - int maxFormatSize; - MmException.Try(AcmInterop.acmMetrics(driverHandle, AcmMetrics.MaxSizeFormat, out maxFormatSize), "acmMetrics"); - return maxFormatSize; - } - } - - /// - /// Finds a Driver by its short name - /// - /// Short Name - /// The driver, or null if not found - public static AcmDriver FindByShortName(string shortName) - { - foreach (AcmDriver driver in AcmDriver.EnumerateAcmDrivers()) - { - if (driver.ShortName == shortName) - { - return driver; - } - } - return null; - } - - /// - /// Gets a list of the ACM Drivers installed - /// - public static IEnumerable EnumerateAcmDrivers() - { - drivers = new List(); - MmException.Try(AcmInterop.acmDriverEnum(new AcmInterop.AcmDriverEnumCallback(DriverEnumCallback), IntPtr.Zero, 0), "acmDriverEnum"); - return drivers; - } - - /// - /// The callback for acmDriverEnum - /// - private static bool DriverEnumCallback(IntPtr hAcmDriver, IntPtr dwInstance, AcmDriverDetailsSupportFlags flags) - { - drivers.Add(new AcmDriver(hAcmDriver)); - return true; - } - - /// - /// Creates a new ACM Driver object - /// - /// Driver handle - private AcmDriver(IntPtr hAcmDriver) - { - driverId = hAcmDriver; - details = new AcmDriverDetails(); - details.structureSize = Marshal.SizeOf(details); - MmException.Try(AcmInterop.acmDriverDetails(hAcmDriver, ref details, 0), "acmDriverDetails"); - } - - /// - /// The short name of this driver - /// - public string ShortName - { - get - { - return details.shortName; - } - } - - /// - /// The full name of this driver - /// - public string LongName - { - get - { - return details.longName; - } - } - - /// - /// The driver ID - /// - public IntPtr DriverId - { - get - { - return driverId; - } - } - - /// - /// ToString - /// - public override string ToString() - { - return LongName; - } - - /// - /// The list of FormatTags for this ACM Driver - /// - public IEnumerable FormatTags - { - get - { - if (formatTags == null) - { - if (driverHandle == IntPtr.Zero) - { - throw new InvalidOperationException("Driver must be opened first"); - } - formatTags = new List(); - AcmFormatTagDetails formatTagDetails = new AcmFormatTagDetails(); - formatTagDetails.structureSize = Marshal.SizeOf(formatTagDetails); - MmException.Try(AcmInterop.acmFormatTagEnum(this.driverHandle, ref formatTagDetails, AcmFormatTagEnumCallback, IntPtr.Zero, 0), "acmFormatTagEnum"); - } - return formatTags; - } - } - - - /// - /// Gets all the supported formats for a given format tag - /// - /// Format tag - /// Supported formats - public IEnumerable GetFormats(AcmFormatTag formatTag) - { - if (driverHandle == IntPtr.Zero) - { - throw new InvalidOperationException("Driver must be opened first"); - } - tempFormatsList = new List(); - var formatDetails = new AcmFormatDetails(); - formatDetails.structSize = Marshal.SizeOf(formatDetails); - // need to make sure we have enough space for a waveFormat. formatTag.FormatSize isn't reliable, - // and some codecs MaxFormatSize isn't either - formatDetails.waveFormatByteSize = 1024; - formatDetails.waveFormatPointer = Marshal.AllocHGlobal(formatDetails.waveFormatByteSize); - formatDetails.formatTag = (int)formatTag.FormatTag; // (int)WaveFormatEncoding.Unknown - var result = AcmInterop.acmFormatEnum(driverHandle, - ref formatDetails, AcmFormatEnumCallback, IntPtr.Zero, - AcmFormatEnumFlags.None); - Marshal.FreeHGlobal(formatDetails.waveFormatPointer); - MmException.Try(result,"acmFormatEnum"); - return tempFormatsList; - } - - /// - /// Opens this driver - /// - public void Open() - { - if (driverHandle == IntPtr.Zero) - { - MmException.Try(AcmInterop.acmDriverOpen(out driverHandle, DriverId, 0), "acmDriverOpen"); - } - } - - /// - /// Closes this driver - /// - public void Close() - { - if(driverHandle != IntPtr.Zero) - { - MmException.Try(AcmInterop.acmDriverClose(driverHandle, 0),"acmDriverClose"); - driverHandle = IntPtr.Zero; - } - } - - private bool AcmFormatTagEnumCallback(IntPtr hAcmDriverId, ref AcmFormatTagDetails formatTagDetails, IntPtr dwInstance, AcmDriverDetailsSupportFlags flags) - { - formatTags.Add(new AcmFormatTag(formatTagDetails)); - return true; - } - - private bool AcmFormatEnumCallback(IntPtr hAcmDriverId, ref AcmFormatDetails formatDetails, IntPtr dwInstance, AcmDriverDetailsSupportFlags flags) - { - tempFormatsList.Add(new AcmFormat(formatDetails)); - return true; - } - - #region IDisposable Members - - /// - /// Dispose - /// - public void Dispose() - { - if (driverHandle != IntPtr.Zero) - { - Close(); - GC.SuppressFinalize(this); - } - } - - #endregion - } - -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriver.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriver.cs.meta deleted file mode 100644 index 288e313..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriver.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b27e189f9487e254eba601c5a229b693 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverAddFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverAddFlags.cs deleted file mode 100644 index 9a00a44..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverAddFlags.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave.Compression -{ - /// - /// Flags for use with acmDriverAdd - /// - enum AcmDriverAddFlags - { - // also ACM_DRIVERADDF_TYPEMASK = 0x00000007; - - /// - /// ACM_DRIVERADDF_LOCAL - /// - Local = 0, - /// - /// ACM_DRIVERADDF_GLOBAL - /// - Global = 8, - /// - /// ACM_DRIVERADDF_FUNCTION - /// - Function = 3, - /// - /// ACM_DRIVERADDF_NOTIFYHWND - /// - NotifyWindowHandle = 4, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverAddFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverAddFlags.cs.meta deleted file mode 100644 index 0c9a8af..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverAddFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7c765ad7c86a0f94e913f0f3a401ae4a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetails.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetails.cs deleted file mode 100644 index f6f32c1..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetails.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.Compression -{ - /// - /// Interop structure for ACM driver details (ACMDRIVERDETAILS) - /// http://msdn.microsoft.com/en-us/library/dd742889%28VS.85%29.aspx - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack=2)] - struct AcmDriverDetails - { - /// - /// DWORD cbStruct - /// - public int structureSize; - /// - /// FOURCC fccType - /// - public UInt32 fccType; - /// - /// FOURCC fccComp - /// - public UInt32 fccComp; - /// - /// WORD wMid; - /// - public UInt16 manufacturerId; - /// - /// WORD wPid - /// - public UInt16 productId; - /// - /// DWORD vdwACM - /// - public UInt32 acmVersion; - /// - /// DWORD vdwDriver - /// - public UInt32 driverVersion; - /// - /// DWORD fdwSupport; - /// - public AcmDriverDetailsSupportFlags supportFlags; - /// - /// DWORD cFormatTags - /// - public int formatTagsCount; - /// - /// DWORD cFilterTags - /// - public int filterTagsCount; - /// - /// HICON hicon - /// - public IntPtr hicon; - /// - /// TCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]; - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = ShortNameChars)] - public string shortName; - /// - /// TCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]; - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = LongNameChars)] - public string longName; - /// - /// TCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]; - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = CopyrightChars)] - public string copyright; - /// - /// TCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]; - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = LicensingChars)] - public string licensing; - /// - /// TCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]; - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = FeaturesChars)] - public string features; - - /// - /// ACMDRIVERDETAILS_SHORTNAME_CHARS - /// - private const int ShortNameChars = 32; - /// - /// ACMDRIVERDETAILS_LONGNAME_CHARS - /// - private const int LongNameChars = 128; - /// - /// ACMDRIVERDETAILS_COPYRIGHT_CHARS - /// - private const int CopyrightChars = 80; - /// - /// ACMDRIVERDETAILS_LICENSING_CHARS - /// - private const int LicensingChars = 128; - /// - /// ACMDRIVERDETAILS_FEATURES_CHARS - /// - private const int FeaturesChars = 512; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetails.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetails.cs.meta deleted file mode 100644 index 63f2c45..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetails.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 38cba6e5109e264409e18ccc2d44f322 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetailsSupportFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetailsSupportFlags.cs deleted file mode 100644 index 991e391..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetailsSupportFlags.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; - -namespace NAudio.Wave.Compression -{ - /// - /// Flags indicating what support a particular ACM driver has - /// - [Flags] - public enum AcmDriverDetailsSupportFlags - { - /// ACMDRIVERDETAILS_SUPPORTF_CODEC - Codec - Codec = 0x00000001, - /// ACMDRIVERDETAILS_SUPPORTF_CONVERTER - Converter - Converter = 0x00000002, - /// ACMDRIVERDETAILS_SUPPORTF_FILTER - Filter - Filter = 0x00000004, - /// ACMDRIVERDETAILS_SUPPORTF_HARDWARE - Hardware - Hardware = 0x00000008, - /// ACMDRIVERDETAILS_SUPPORTF_ASYNC - Async - Async = 0x00000010, - /// ACMDRIVERDETAILS_SUPPORTF_LOCAL - Local - Local = 0x40000000, - /// ACMDRIVERDETAILS_SUPPORTF_DISABLED - Disabled - Disabled = unchecked((int)0x80000000), - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetailsSupportFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetailsSupportFlags.cs.meta deleted file mode 100644 index d659cce..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverDetailsSupportFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1daf4548b2f072c46b283d2048f9ca3e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverEnumFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverEnumFlags.cs deleted file mode 100644 index 87d26d8..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverEnumFlags.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave.Compression -{ - [Flags] - enum AcmDriverEnumFlags - { - /// - /// ACM_DRIVERENUMF_NOLOCAL, Only global drivers should be included in the enumeration - /// - NoLocal = 0x40000000, - /// - /// ACM_DRIVERENUMF_DISABLED, Disabled ACM drivers should be included in the enumeration - /// - Disabled = unchecked((int)0x80000000), - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverEnumFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverEnumFlags.cs.meta deleted file mode 100644 index 3201e19..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmDriverEnumFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 11b8c09b55c53eb48a604073c7a0b243 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormat.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormat.cs deleted file mode 100644 index a4e4474..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormat.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.Compression -{ - /// - /// ACM Format - /// - public class AcmFormat - { - private readonly AcmFormatDetails formatDetails; - private readonly WaveFormat waveFormat; - - internal AcmFormat(AcmFormatDetails formatDetails) - { - this.formatDetails = formatDetails; - waveFormat = WaveFormat.MarshalFromPtr(formatDetails.waveFormatPointer); - } - - /// - /// Format Index - /// - public int FormatIndex - { - get { return formatDetails.formatIndex; } - } - - /// - /// Format Tag - /// - public WaveFormatEncoding FormatTag - { - get { return (WaveFormatEncoding)formatDetails.formatTag; } - } - - /// - /// Support Flags - /// - public AcmDriverDetailsSupportFlags SupportFlags - { - get { return formatDetails.supportFlags; } - } - - /// - /// WaveFormat - /// - public WaveFormat WaveFormat - { - get - { - return waveFormat; - } - } - - /// - /// WaveFormat Size - /// - public int WaveFormatByteSize - { - get { return formatDetails.waveFormatByteSize; } - } - - /// - /// Format Description - /// - public string FormatDescription - { - get { return formatDetails.formatDescription; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormat.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormat.cs.meta deleted file mode 100644 index 4cef4cd..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6edf4213f217bda48aa9b82a1dd88533 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChoose.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChoose.cs deleted file mode 100644 index d47cdd5..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChoose.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.Compression -{ - /// - /// ACMFORMATCHOOSE - /// http://msdn.microsoft.com/en-us/library/dd742911%28VS.85%29.aspx - /// - [StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Auto)] - struct AcmFormatChoose - { - /// - /// DWORD cbStruct; - /// - public int structureSize; - /// - /// DWORD fdwStyle; - /// - public AcmFormatChooseStyleFlags styleFlags; - /// - /// HWND hwndOwner; - /// - public IntPtr ownerWindowHandle; - /// - /// LPWAVEFORMATEX pwfx; - /// - public IntPtr selectedWaveFormatPointer; - /// - /// DWORD cbwfx; - /// - public int selectedWaveFormatByteSize; - /// - /// LPCTSTR pszTitle; - /// - [MarshalAs(UnmanagedType.LPTStr)] - public string title; - /// - /// TCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]; - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst=AcmFormatTagDetails.FormatTagDescriptionChars)] - public string formatTagDescription; - /// - /// TCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = AcmFormatDetails.FormatDescriptionChars)] - public string formatDescription; - /// - /// LPTSTR pszName; - /// n.b. can be written into - /// - [MarshalAs(UnmanagedType.LPTStr)] - public string name; - /// - /// DWORD cchName - /// Should be at least 128 unless name is zero - /// - public int nameByteSize; - /// - /// DWORD fdwEnum; - /// - public AcmFormatEnumFlags formatEnumFlags; - /// - /// LPWAVEFORMATEX pwfxEnum; - /// - public IntPtr waveFormatEnumPointer; - /// - /// HINSTANCE hInstance; - /// - public IntPtr instanceHandle; - /// - /// LPCTSTR pszTemplateName; - /// - [MarshalAs(UnmanagedType.LPTStr)] - public string templateName; - /// - /// LPARAM lCustData; - /// - public IntPtr customData; - /// - /// ACMFORMATCHOOSEHOOKPROC pfnHook; - /// - public AcmInterop.AcmFormatChooseHookProc windowCallbackFunction; - - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChoose.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChoose.cs.meta deleted file mode 100644 index 8c08497..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChoose.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 23c74eb950aa6e247976f491044c5a8a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChooseStyleFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChooseStyleFlags.cs deleted file mode 100644 index 638356c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChooseStyleFlags.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave.Compression -{ - [Flags] - enum AcmFormatChooseStyleFlags - { - /// - /// None - /// - None = 0, - /// - /// ACMFORMATCHOOSE_STYLEF_SHOWHELP - /// - ShowHelp = 0x00000004, - /// - /// ACMFORMATCHOOSE_STYLEF_ENABLEHOOK - /// - EnableHook = 0x00000008, - /// - /// ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE - /// - EnableTemplate = 0x00000010, - /// - /// ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE - /// - EnableTemplateHandle = 0x00000020, - /// - /// ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT - /// - InitToWfxStruct = 0x00000040, - /// - /// ACMFORMATCHOOSE_STYLEF_CONTEXTHELP - /// - ContextHelp = 0x00000080 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChooseStyleFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChooseStyleFlags.cs.meta deleted file mode 100644 index d1653f7..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatChooseStyleFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bc98d85834af4ab4da4e527ebea92d4b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatDetails.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatDetails.cs deleted file mode 100644 index c77b1d4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatDetails.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.Compression -{ - /// - /// ACMFORMATDETAILS - /// http://msdn.microsoft.com/en-us/library/dd742913%28VS.85%29.aspx - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack=4)] - struct AcmFormatDetails - { - /// - /// DWORD cbStruct; - /// - public int structSize; - /// - /// DWORD dwFormatIndex; - /// - public int formatIndex; - /// - /// DWORD dwFormatTag; - /// - public int formatTag; - /// - /// DWORD fdwSupport; - /// - public AcmDriverDetailsSupportFlags supportFlags; - /// - /// LPWAVEFORMATEX pwfx; - /// - public IntPtr waveFormatPointer; - /// - /// DWORD cbwfx; - /// - public int waveFormatByteSize; - /// - /// TCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = FormatDescriptionChars)] - public string formatDescription; - - /// - /// ACMFORMATDETAILS_FORMAT_CHARS - /// - public const int FormatDescriptionChars = 128; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatDetails.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatDetails.cs.meta deleted file mode 100644 index e2d0c97..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatDetails.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6449e4d3b2456364daa2a0e0daf35dcd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatEnumFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatEnumFlags.cs deleted file mode 100644 index acfae7a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatEnumFlags.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave.Compression -{ - /// - /// Format Enumeration Flags - /// - [Flags] - public enum AcmFormatEnumFlags - { - /// - /// None - /// - None = 0, - /// - /// ACM_FORMATENUMF_CONVERT - /// The WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will only enumerate destination formats that can be converted from the given pwfx format. - /// - Convert = 0x00100000, - /// - /// ACM_FORMATENUMF_HARDWARE - /// The enumerator should only enumerate formats that are supported as native input or output formats on one or more of the installed waveform-audio devices. This flag provides a way for an application to choose only formats native to an installed waveform-audio device. This flag must be used with one or both of the ACM_FORMATENUMF_INPUT and ACM_FORMATENUMF_OUTPUT flags. Specifying both ACM_FORMATENUMF_INPUT and ACM_FORMATENUMF_OUTPUT will enumerate only formats that can be opened for input or output. This is true regardless of whether this flag is specified. - /// - Hardware = 0x00400000, - /// - /// ACM_FORMATENUMF_INPUT - /// Enumerator should enumerate only formats that are supported for input (recording). - /// - Input = 0x00800000, - /// - /// ACM_FORMATENUMF_NCHANNELS - /// The nChannels member of the WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will enumerate only a format that conforms to this attribute. - /// - Channels = 0x00020000, - /// - /// ACM_FORMATENUMF_NSAMPLESPERSEC - /// The nSamplesPerSec member of the WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will enumerate only a format that conforms to this attribute. - /// - SamplesPerSecond = 0x00040000, - /// - /// ACM_FORMATENUMF_OUTPUT - /// Enumerator should enumerate only formats that are supported for output (playback). - /// - Output = 0x01000000, - /// - /// ACM_FORMATENUMF_SUGGEST - /// The WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will enumerate all suggested destination formats for the given pwfx format. This mechanism can be used instead of the acmFormatSuggest function to allow an application to choose the best suggested format for conversion. The dwFormatIndex member will always be set to zero on return. - /// - Suggest = 0x00200000, - /// - /// ACM_FORMATENUMF_WBITSPERSAMPLE - /// The wBitsPerSample member of the WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will enumerate only a format that conforms to this attribute. - /// - BitsPerSample = 0x00080000, - /// - /// ACM_FORMATENUMF_WFORMATTAG - /// The wFormatTag member of the WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will enumerate only a format that conforms to this attribute. The dwFormatTag member of the ACMFORMATDETAILS structure must be equal to the wFormatTag member. - /// - FormatTag = 0x00010000, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatEnumFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatEnumFlags.cs.meta deleted file mode 100644 index 8cad893..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatEnumFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 80c682d79298bf647ba622b043f289d4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatSuggestFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatSuggestFlags.cs deleted file mode 100644 index 7f7cbbf..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatSuggestFlags.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave.Compression -{ - [Flags] - enum AcmFormatSuggestFlags - { - /// - /// ACM_FORMATSUGGESTF_WFORMATTAG - /// - FormatTag = 0x00010000, - /// - /// ACM_FORMATSUGGESTF_NCHANNELS - /// - Channels = 0x00020000, - /// - /// ACM_FORMATSUGGESTF_NSAMPLESPERSEC - /// - SamplesPerSecond = 0x00040000, - /// - /// ACM_FORMATSUGGESTF_WBITSPERSAMPLE - /// - BitsPerSample = 0x00080000, - /// - /// ACM_FORMATSUGGESTF_TYPEMASK - /// - TypeMask = 0x00FF0000, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatSuggestFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatSuggestFlags.cs.meta deleted file mode 100644 index af723ae..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatSuggestFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e44cacb0644994f4baef4d503af7f1be -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTag.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTag.cs deleted file mode 100644 index 566a80a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTag.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave.Compression -{ - /// - /// ACM Format Tag - /// - public class AcmFormatTag - { - private AcmFormatTagDetails formatTagDetails; - - internal AcmFormatTag(AcmFormatTagDetails formatTagDetails) - { - this.formatTagDetails = formatTagDetails; - } - - /// - /// Format Tag Index - /// - public int FormatTagIndex - { - get { return formatTagDetails.formatTagIndex; } - } - - /// - /// Format Tag - /// - public WaveFormatEncoding FormatTag - { - get { return (WaveFormatEncoding)formatTagDetails.formatTag; } - } - - /// - /// Format Size - /// - public int FormatSize - { - get { return formatTagDetails.formatSize; } - } - - /// - /// Support Flags - /// - public AcmDriverDetailsSupportFlags SupportFlags - { - get { return formatTagDetails.supportFlags; } - } - - /// - /// Standard Formats Count - /// - public int StandardFormatsCount - { - get { return formatTagDetails.standardFormatsCount; } - } - - /// - /// Format Description - /// - public string FormatDescription - { - get { return formatTagDetails.formatDescription; } - } - - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTag.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTag.cs.meta deleted file mode 100644 index 93b82b2..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTag.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 07f376bd8de561c49895bf1ce94e892e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTagDetails.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTagDetails.cs deleted file mode 100644 index e107869..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTagDetails.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.Compression -{ - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] - struct AcmFormatTagDetails - { - /// - /// DWORD cbStruct; - /// - public int structureSize; - /// - /// DWORD dwFormatTagIndex; - /// - public int formatTagIndex; - /// - /// DWORD dwFormatTag; - /// - public int formatTag; - /// - /// DWORD cbFormatSize; - /// - public int formatSize; - /// - /// DWORD fdwSupport; - /// - public AcmDriverDetailsSupportFlags supportFlags; - /// - /// DWORD cStandardFormats; - /// - public int standardFormatsCount; - /// - /// TCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]; - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = FormatTagDescriptionChars)] - public string formatDescription; - - - - /// - /// ACMFORMATTAGDETAILS_FORMATTAG_CHARS - /// - public const int FormatTagDescriptionChars = 48; - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTagDetails.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTagDetails.cs.meta deleted file mode 100644 index c07558d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmFormatTagDetails.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6ba63b2b0e600fc46881d7fba9769013 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmInterop.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmInterop.cs deleted file mode 100644 index c24ae25..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmInterop.cs +++ /dev/null @@ -1,187 +0,0 @@ -using System; -using System.Collections; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.Compression -{ - /// - /// Interop definitions for Windows ACM (Audio Compression Manager) API - /// - class AcmInterop - { - // http://msdn.microsoft.com/en-us/library/dd742891%28VS.85%29.aspx - public delegate bool AcmDriverEnumCallback(IntPtr hAcmDriverId, IntPtr instance, AcmDriverDetailsSupportFlags flags); - - public delegate bool AcmFormatEnumCallback(IntPtr hAcmDriverId, ref AcmFormatDetails formatDetails, IntPtr dwInstance, AcmDriverDetailsSupportFlags flags); - - public delegate bool AcmFormatTagEnumCallback(IntPtr hAcmDriverId, ref AcmFormatTagDetails formatTagDetails, IntPtr dwInstance, AcmDriverDetailsSupportFlags flags); - - /// - /// http://msdn.microsoft.com/en-us/library/dd742910%28VS.85%29.aspx - /// UINT ACMFORMATCHOOSEHOOKPROC acmFormatChooseHookProc( - /// HWND hwnd, - /// UINT uMsg, - /// WPARAM wParam, - /// LPARAM lParam - /// - public delegate bool AcmFormatChooseHookProc(IntPtr windowHandle, int message, IntPtr wParam, IntPtr lParam); - - // not done: - // acmDriverAdd - // acmDriverID - // acmDriverMessage - // acmDriverRemove - // acmFilterChoose - // acmFilterChooseHookProc - // acmFilterDetails - // acmFilterEnum -acmFilterEnumCallback - // acmFilterTagDetails - // acmFilterTagEnum - // acmFormatDetails - // acmFormatTagDetails - // acmGetVersion - // acmStreamMessage - - // http://msdn.microsoft.com/en-us/library/windows/desktop/dd742885%28v=vs.85%29.aspx - // MMRESULT acmDriverAdd( - // LPHACMDRIVERID phadid, - // HINSTANCE hinstModule, - // LPARAM lParam, - // DWORD dwPriority, - // DWORD fdwAdd) - [DllImport("msacm32.dll")] - public static extern MmResult acmDriverAdd(out IntPtr driverHandle, - IntPtr driverModule, - IntPtr driverFunctionAddress, - int priority, - AcmDriverAddFlags flags); - - // http://msdn.microsoft.com/en-us/library/windows/desktop/dd742897%28v=vs.85%29.aspx - [DllImport("msacm32.dll")] - public static extern MmResult acmDriverRemove(IntPtr driverHandle, - int removeFlags); - - // http://msdn.microsoft.com/en-us/library/dd742886%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmDriverClose(IntPtr hAcmDriver, int closeFlags); - - // http://msdn.microsoft.com/en-us/library/dd742890%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmDriverEnum(AcmDriverEnumCallback fnCallback, IntPtr dwInstance, AcmDriverEnumFlags flags); - - // http://msdn.microsoft.com/en-us/library/dd742887%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmDriverDetails(IntPtr hAcmDriver, ref AcmDriverDetails driverDetails, int reserved); - - // http://msdn.microsoft.com/en-us/library/dd742894%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmDriverOpen(out IntPtr pAcmDriver, IntPtr hAcmDriverId, int openFlags); - - // http://msdn.microsoft.com/en-us/library/dd742909%28VS.85%29.aspx - [DllImport("Msacm32.dll", EntryPoint = "acmFormatChooseW")] - public static extern MmResult acmFormatChoose(ref AcmFormatChoose formatChoose); - - // http://msdn.microsoft.com/en-us/library/dd742914%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmFormatEnum(IntPtr hAcmDriver, ref AcmFormatDetails formatDetails, AcmFormatEnumCallback callback, IntPtr instance, AcmFormatEnumFlags flags); - - /// - /// http://msdn.microsoft.com/en-us/library/dd742916%28VS.85%29.aspx - /// MMRESULT acmFormatSuggest( - /// HACMDRIVER had, - /// LPWAVEFORMATEX pwfxSrc, - /// LPWAVEFORMATEX pwfxDst, - /// DWORD cbwfxDst, - /// DWORD fdwSuggest); - /// - [DllImport("Msacm32.dll")] - public static extern MmResult acmFormatSuggest( - IntPtr hAcmDriver, - [In, MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "NAudio.Wave.WaveFormatCustomMarshaler")] - WaveFormat sourceFormat, - [In, Out, MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "NAudio.Wave.WaveFormatCustomMarshaler")] - WaveFormat destFormat, - int sizeDestFormat, - AcmFormatSuggestFlags suggestFlags); - - [DllImport("Msacm32.dll",EntryPoint="acmFormatSuggest")] - public static extern MmResult acmFormatSuggest2( - IntPtr hAcmDriver, - IntPtr sourceFormatPointer, - IntPtr destFormatPointer, - int sizeDestFormat, - AcmFormatSuggestFlags suggestFlags); - - // http://msdn.microsoft.com/en-us/library/dd742919%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmFormatTagEnum(IntPtr hAcmDriver, ref AcmFormatTagDetails formatTagDetails, AcmFormatTagEnumCallback callback, IntPtr instance, int reserved); - - // http://msdn.microsoft.com/en-us/library/dd742922%28VS.85%29.aspx - // this version of the prototype is for metrics that output a single integer - [DllImport("Msacm32.dll")] - public static extern MmResult acmMetrics(IntPtr hAcmObject, AcmMetrics metric, out int output); - - /// - /// http://msdn.microsoft.com/en-us/library/dd742928%28VS.85%29.aspx - /// MMRESULT acmStreamOpen( - /// LPHACMSTREAM phas, - /// HACMDRIVER had, - /// LPWAVEFORMATEX pwfxSrc, - /// LPWAVEFORMATEX pwfxDst, - /// LPWAVEFILTER pwfltr, - /// DWORD_PTR dwCallback, - /// DWORD_PTR dwInstance, - /// DWORD fdwOpen - /// - [DllImport("Msacm32.dll")] - public static extern MmResult acmStreamOpen( - out IntPtr hAcmStream, - IntPtr hAcmDriver, - [In, MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "NAudio.Wave.WaveFormatCustomMarshaler")] - WaveFormat sourceFormat, - [In, MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "NAudio.Wave.WaveFormatCustomMarshaler")] - WaveFormat destFormat, - [In] WaveFilter waveFilter, - IntPtr callback, - IntPtr instance, - AcmStreamOpenFlags openFlags); - - /// - /// A version with pointers for troubleshooting - /// - [DllImport("Msacm32.dll",EntryPoint="acmStreamOpen")] - public static extern MmResult acmStreamOpen2( - out IntPtr hAcmStream, - IntPtr hAcmDriver, - IntPtr sourceFormatPointer, - IntPtr destFormatPointer, - [In] WaveFilter waveFilter, - IntPtr callback, - IntPtr instance, - AcmStreamOpenFlags openFlags); - - // http://msdn.microsoft.com/en-us/library/dd742923%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmStreamClose(IntPtr hAcmStream, int closeFlags); - - // http://msdn.microsoft.com/en-us/library/dd742924%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmStreamConvert(IntPtr hAcmStream, [In, Out] AcmStreamHeaderStruct streamHeader, AcmStreamConvertFlags streamConvertFlags); - - // http://msdn.microsoft.com/en-us/library/dd742929%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmStreamPrepareHeader(IntPtr hAcmStream, [In, Out] AcmStreamHeaderStruct streamHeader, int prepareFlags); - - // http://msdn.microsoft.com/en-us/library/dd742929%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmStreamReset(IntPtr hAcmStream, int resetFlags); - - // http://msdn.microsoft.com/en-us/library/dd742931%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmStreamSize(IntPtr hAcmStream, int inputBufferSize, out int outputBufferSize, AcmStreamSizeFlags flags); - - // http://msdn.microsoft.com/en-us/library/dd742932%28VS.85%29.aspx - [DllImport("Msacm32.dll")] - public static extern MmResult acmStreamUnprepareHeader(IntPtr hAcmStream, [In, Out] AcmStreamHeaderStruct streamHeader, int flags); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmInterop.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmInterop.cs.meta deleted file mode 100644 index 98fda92..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmInterop.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 408266e0fb9a4b84baa3c9e17c1f7dba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmMetrics.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmMetrics.cs deleted file mode 100644 index ecd3010..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmMetrics.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - enum AcmMetrics - { - /// ACM_METRIC_COUNT_DRIVERS - CountDrivers = 1, - /// ACM_METRIC_COUNT_CODECS - CountCodecs = 2, - /// ACM_METRIC_COUNT_CONVERTERS - CountConverters = 3, - /// ACM_METRIC_COUNT_FILTERS - CountFilters = 4, - /// ACM_METRIC_COUNT_DISABLED - CountDisabled = 5, - /// ACM_METRIC_COUNT_HARDWARE - CountHardware = 6, - /// ACM_METRIC_COUNT_LOCAL_DRIVERS - CountLocalDrivers = 20, - /// ACM_METRIC_COUNT_LOCAL_CODECS - CountLocalCodecs = 21, - /// ACM_METRIC_COUNT_LOCAL_CONVERTERS - CountLocalConverters = 22, - /// ACM_METRIC_COUNT_LOCAL_FILTERS - CountLocalFilters = 23, - /// ACM_METRIC_COUNT_LOCAL_DISABLED - CountLocalDisabled = 24, - /// ACM_METRIC_HARDWARE_WAVE_INPUT - HardwareWaveInput = 30, - /// ACM_METRIC_HARDWARE_WAVE_OUTPUT - HardwareWaveOutput = 31, - /// ACM_METRIC_MAX_SIZE_FORMAT - MaxSizeFormat = 50, - /// ACM_METRIC_MAX_SIZE_FILTER - MaxSizeFilter = 51, - /// ACM_METRIC_DRIVER_SUPPORT - DriverSupport = 100, - /// ACM_METRIC_DRIVER_PRIORITY - DriverPriority = 101, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmMetrics.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmMetrics.cs.meta deleted file mode 100644 index ab2e8b8..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmMetrics.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9b76c14e4996a674c8a10b83a3de4e56 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStream.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStream.cs deleted file mode 100644 index eac0ab1..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStream.cs +++ /dev/null @@ -1,237 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.Compression -{ - /// - /// AcmStream encapsulates an Audio Compression Manager Stream - /// used to convert audio from one format to another - /// - public class AcmStream : IDisposable - { - private IntPtr streamHandle; - private IntPtr driverHandle; - private AcmStreamHeader streamHeader; - private readonly WaveFormat sourceFormat; - - /// - /// Creates a new ACM stream to convert one format to another. Note that - /// not all conversions can be done in one step - /// - /// The source audio format - /// The destination audio format - public AcmStream(WaveFormat sourceFormat, WaveFormat destFormat) - { - try - { - streamHandle = IntPtr.Zero; - this.sourceFormat = sourceFormat; - int sourceBufferSize = Math.Max(65536, sourceFormat.AverageBytesPerSecond); - sourceBufferSize -= (sourceBufferSize % sourceFormat.BlockAlign); - MmException.Try(AcmInterop.acmStreamOpen(out streamHandle, IntPtr.Zero, sourceFormat, destFormat, null, IntPtr.Zero, IntPtr.Zero, AcmStreamOpenFlags.NonRealTime), "acmStreamOpen"); - - int destBufferSize = SourceToDest(sourceBufferSize); - streamHeader = new AcmStreamHeader(streamHandle, sourceBufferSize, destBufferSize); - driverHandle = IntPtr.Zero; - } - catch - { - // suppress the finalise and clean up resources - Dispose(); - throw; - } - } - - /// - /// Creates a new ACM stream to convert one format to another, using a - /// specified driver identified and wave filter - /// - /// the driver identifier - /// the source format - /// the wave filter - public AcmStream(IntPtr driverId, WaveFormat sourceFormat, WaveFilter waveFilter) - { - int sourceBufferSize = Math.Max(16384, sourceFormat.AverageBytesPerSecond); - this.sourceFormat = sourceFormat; - sourceBufferSize -= (sourceBufferSize % sourceFormat.BlockAlign); - MmException.Try(AcmInterop.acmDriverOpen(out driverHandle, driverId, 0), "acmDriverOpen"); - MmException.Try(AcmInterop.acmStreamOpen(out streamHandle, driverHandle, - sourceFormat, sourceFormat, waveFilter, IntPtr.Zero, IntPtr.Zero, AcmStreamOpenFlags.NonRealTime), "acmStreamOpen"); - streamHeader = new AcmStreamHeader(streamHandle, sourceBufferSize, SourceToDest(sourceBufferSize)); - } - - - /// - /// Returns the number of output bytes for a given number of input bytes - /// - /// Number of input bytes - /// Number of output bytes - public int SourceToDest(int source) - { - if (source == 0) // zero is an invalid parameter to acmStreamSize - return 0; - int convertedBytes; - var mmResult = AcmInterop.acmStreamSize(streamHandle, source, out convertedBytes, AcmStreamSizeFlags.Source); - MmException.Try(mmResult, "acmStreamSize"); - return convertedBytes; - } - - /// - /// Returns the number of source bytes for a given number of destination bytes - /// - /// Number of destination bytes - /// Number of source bytes - public int DestToSource(int dest) - { - if (dest == 0) // zero is an invalid parameter to acmStreamSize - return 0; - int convertedBytes; - MmException.Try(AcmInterop.acmStreamSize(streamHandle, dest, out convertedBytes, AcmStreamSizeFlags.Destination), "acmStreamSize"); - return convertedBytes; - } - - /// - /// Suggests an appropriate PCM format that the compressed format can be converted - /// to in one step - /// - /// The compressed format - /// The PCM format - public static WaveFormat SuggestPcmFormat(WaveFormat compressedFormat) - { - // create a PCM format - WaveFormat suggestedFormat = new WaveFormat(compressedFormat.SampleRate, 16, compressedFormat.Channels); - MmException.Try(AcmInterop.acmFormatSuggest(IntPtr.Zero, compressedFormat, suggestedFormat, Marshal.SizeOf(suggestedFormat), AcmFormatSuggestFlags.FormatTag), "acmFormatSuggest"); - - /*IntPtr suggestedFormatPointer = WaveFormat.MarshalToPtr(suggestedFormat); - IntPtr compressedFormatPointer = WaveFormat.MarshalToPtr(compressedFormat); - MmResult result = AcmInterop.acmFormatSuggest2(IntPtr.Zero, compressedFormatPointer, suggestedFormatPointer, Marshal.SizeOf(suggestedFormat), AcmFormatSuggestFlags.FormatTag); - suggestedFormat = WaveFormat.MarshalFromPtr(suggestedFormatPointer); - Marshal.FreeHGlobal(suggestedFormatPointer); - Marshal.FreeHGlobal(compressedFormatPointer); - MmException.Try(result, "acmFormatSuggest");*/ - - - return suggestedFormat; - } - - /// - /// Returns the Source Buffer. Fill this with data prior to calling convert - /// - public byte[] SourceBuffer => streamHeader.SourceBuffer; - - /// - /// Returns the Destination buffer. This will contain the converted data - /// after a successful call to Convert - /// - public byte[] DestBuffer => streamHeader.DestBuffer; - - /// - /// Report that we have repositioned in the source stream - /// - public void Reposition() - { - streamHeader.Reposition(); - } - - /// - /// Converts the contents of the SourceBuffer into the DestinationBuffer - /// - /// The number of bytes in the SourceBuffer - /// that need to be converted - /// The number of source bytes actually converted - /// The number of converted bytes in the DestinationBuffer - public int Convert(int bytesToConvert, out int sourceBytesConverted) - { - if (bytesToConvert % sourceFormat.BlockAlign != 0) - { - System.Diagnostics.Debug.WriteLine(String.Format("Not a whole number of blocks: {0} ({1})", bytesToConvert, sourceFormat.BlockAlign)); - bytesToConvert -= (bytesToConvert % sourceFormat.BlockAlign); - } - - return streamHeader.Convert(bytesToConvert, out sourceBytesConverted); - } - - /// - /// Converts the contents of the SourceBuffer into the DestinationBuffer - /// - /// The number of bytes in the SourceBuffer - /// that need to be converted - /// The number of converted bytes in the DestinationBuffer - [Obsolete("Call the version returning sourceBytesConverted instead")] - public int Convert(int bytesToConvert) - { - int sourceBytesConverted; - int destBytes = Convert(bytesToConvert, out sourceBytesConverted); - if (sourceBytesConverted != bytesToConvert) - { - throw new MmException(MmResult.NotSupported, "AcmStreamHeader.Convert didn't convert everything"); - } - return destBytes; - } - - /* Relevant only for async conversion streams - public void Reset() - { - MmException.Try(AcmInterop.acmStreamReset(streamHandle,0),"acmStreamReset"); - } - */ - - #region IDisposable Members - - /// - /// Frees resources associated with this ACM Stream - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Frees resources associated with this ACM Stream - /// - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - // Free other state (managed objects). - if (streamHeader != null) - { - streamHeader.Dispose(); - streamHeader = null; - } - } - - // Free your own state (unmanaged objects). - - if (streamHandle != IntPtr.Zero) - { - MmResult result = AcmInterop.acmStreamClose(streamHandle, 0); - streamHandle = IntPtr.Zero; - if (result != MmResult.NoError) - { - throw new MmException(result, "acmStreamClose"); - } - - } - // Set large fields to null. - if (driverHandle != IntPtr.Zero) - { - AcmInterop.acmDriverClose(driverHandle, 0); - driverHandle = IntPtr.Zero; - } - } - - /// - /// Frees resources associated with this ACM Stream - /// - ~AcmStream() - { - // Simply call Dispose(false). - System.Diagnostics.Debug.Assert(false, "AcmStream Dispose was not called"); - Dispose(false); - } - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStream.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStream.cs.meta deleted file mode 100644 index f4d4e2e..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e48bb2590ede1e04d9d7023b61ea25f8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamConvertFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamConvertFlags.cs deleted file mode 100644 index bfa6bab..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamConvertFlags.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - [Flags] - enum AcmStreamConvertFlags - { - /// - /// ACM_STREAMCONVERTF_BLOCKALIGN - /// - BlockAlign = 0x00000004, - /// - /// ACM_STREAMCONVERTF_START - /// - Start = 0x00000010, - /// - /// ACM_STREAMCONVERTF_END - /// - End = 0x00000020, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamConvertFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamConvertFlags.cs.meta deleted file mode 100644 index b61478f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamConvertFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1d2ff230262920e4c8f868501971a4e0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeader.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeader.cs deleted file mode 100644 index bbde505..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeader.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.Compression -{ - class AcmStreamHeader : IDisposable - { - private AcmStreamHeaderStruct streamHeader; - private byte[] sourceBuffer; - private GCHandle hSourceBuffer; - private byte[] destBuffer; - private GCHandle hDestBuffer; - private IntPtr streamHandle; - private bool firstTime; - - public AcmStreamHeader(IntPtr streamHandle, int sourceBufferLength, int destBufferLength) - { - streamHeader = new AcmStreamHeaderStruct(); - sourceBuffer = new byte[sourceBufferLength]; - hSourceBuffer = GCHandle.Alloc(sourceBuffer, GCHandleType.Pinned); - - destBuffer = new byte[destBufferLength]; - hDestBuffer = GCHandle.Alloc(destBuffer, GCHandleType.Pinned); - - this.streamHandle = streamHandle; - firstTime = true; - //Prepare(); - } - - private void Prepare() - { - streamHeader.cbStruct = Marshal.SizeOf(streamHeader); - streamHeader.sourceBufferLength = sourceBuffer.Length; - streamHeader.sourceBufferPointer = hSourceBuffer.AddrOfPinnedObject(); - streamHeader.destBufferLength = destBuffer.Length; - streamHeader.destBufferPointer = hDestBuffer.AddrOfPinnedObject(); - MmException.Try(AcmInterop.acmStreamPrepareHeader(streamHandle, streamHeader, 0), "acmStreamPrepareHeader"); - } - - private void Unprepare() - { - streamHeader.sourceBufferLength = sourceBuffer.Length; - streamHeader.sourceBufferPointer = hSourceBuffer.AddrOfPinnedObject(); - streamHeader.destBufferLength = destBuffer.Length; - streamHeader.destBufferPointer = hDestBuffer.AddrOfPinnedObject(); - - MmResult result = AcmInterop.acmStreamUnprepareHeader(streamHandle, streamHeader, 0); - if (result != MmResult.NoError) - { - //if (result == MmResult.AcmHeaderUnprepared) - throw new MmException(result, "acmStreamUnprepareHeader"); - } - } - - public void Reposition() - { - firstTime = true; - } - - public int Convert(int bytesToConvert, out int sourceBytesConverted) - { - Prepare(); - try - { - streamHeader.sourceBufferLength = bytesToConvert; - streamHeader.sourceBufferLengthUsed = bytesToConvert; - AcmStreamConvertFlags flags = firstTime ? (AcmStreamConvertFlags.Start | AcmStreamConvertFlags.BlockAlign) : AcmStreamConvertFlags.BlockAlign; - MmException.Try(AcmInterop.acmStreamConvert(streamHandle, streamHeader, flags), "acmStreamConvert"); - firstTime = false; - System.Diagnostics.Debug.Assert(streamHeader.destBufferLength == destBuffer.Length, "Codecs should not change dest buffer length"); - sourceBytesConverted = streamHeader.sourceBufferLengthUsed; - } - finally - { - Unprepare(); - } - - return streamHeader.destBufferLengthUsed; - } - - public byte[] SourceBuffer - { - get - { - return sourceBuffer; - } - } - - public byte[] DestBuffer - { - get - { - return destBuffer; - } - } - - #region IDisposable Members - - bool disposed = false; - - public void Dispose() - { - GC.SuppressFinalize(this); - Dispose(true); - } - - protected virtual void Dispose(bool disposing) - { - if (!disposed) - { - //Unprepare(); - sourceBuffer = null; - destBuffer = null; - hSourceBuffer.Free(); - hDestBuffer.Free(); - } - disposed = true; - } - - ~AcmStreamHeader() - { - System.Diagnostics.Debug.Assert(false, "AcmStreamHeader dispose was not called"); - Dispose(false); - } - #endregion - } - -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeader.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeader.cs.meta deleted file mode 100644 index bc656fa..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 261fe8295a476084fb3bfd509210ebbf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStatusFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStatusFlags.cs deleted file mode 100644 index c63b8a6..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStatusFlags.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave.Compression -{ - [Flags] - enum AcmStreamHeaderStatusFlags - { - /// - /// ACMSTREAMHEADER_STATUSF_DONE - /// - Done = 0x00010000, - /// - /// ACMSTREAMHEADER_STATUSF_PREPARED - /// - Prepared = 0x00020000, - /// - /// ACMSTREAMHEADER_STATUSF_INQUEUE - /// - InQueue = 0x00100000, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStatusFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStatusFlags.cs.meta deleted file mode 100644 index 57520e1..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStatusFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 41679d6153312f34e8a904a3b0689923 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStruct.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStruct.cs deleted file mode 100644 index 619dcc6..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStruct.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.Compression -{ - /// - /// Interop structure for ACM stream headers. - /// ACMSTREAMHEADER - /// http://msdn.microsoft.com/en-us/library/dd742926%28VS.85%29.aspx - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Size = 128)] // explicit size to make it work for x64 - class AcmStreamHeaderStruct - { - public int cbStruct; - public AcmStreamHeaderStatusFlags fdwStatus = 0; - public IntPtr userData; - public IntPtr sourceBufferPointer; - public int sourceBufferLength; - public int sourceBufferLengthUsed; - public IntPtr sourceUserData; - public IntPtr destBufferPointer; - public int destBufferLength; - public int destBufferLengthUsed = 0; - public IntPtr destUserData; - - // 10 reserved values follow this, we don't need to declare them - // since we have set the struct size explicitly and don't - // need to access them in client code (thanks Brian) - /*public int reserved0; - public int reserved1; - public int reserved2; - public int reserved3; - public int reserved4; - public int reserved5; - public int reserved6; - public int reserved7; - public int reserved8; - public int reserved9;*/ - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStruct.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStruct.cs.meta deleted file mode 100644 index 4e51e07..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamHeaderStruct.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 91549b63de92ae04c90fd6e2370107c5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamOpenFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamOpenFlags.cs deleted file mode 100644 index 55b75ed..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamOpenFlags.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave.Compression -{ - [Flags] - enum AcmStreamOpenFlags - { - /// - /// ACM_STREAMOPENF_QUERY, ACM will be queried to determine whether it supports the given conversion. A conversion stream will not be opened, and no handle will be returned in the phas parameter. - /// - Query = 0x00000001, - /// - /// ACM_STREAMOPENF_ASYNC, Stream conversion should be performed asynchronously. If this flag is specified, the application can use a callback function to be notified when the conversion stream is opened and closed and after each buffer is converted. In addition to using a callback function, an application can examine the fdwStatus member of the ACMSTREAMHEADER structure for the ACMSTREAMHEADER_STATUSF_DONE flag. - /// - Async = 0x00000002, - /// - /// ACM_STREAMOPENF_NONREALTIME, ACM will not consider time constraints when converting the data. By default, the driver will attempt to convert the data in real time. For some formats, specifying this flag might improve the audio quality or other characteristics. - /// - NonRealTime = 0x00000004, - /// - /// CALLBACK_TYPEMASK, callback type mask - /// - CallbackTypeMask = 0x00070000, - /// - /// CALLBACK_NULL, no callback - /// - CallbackNull = 0x00000000, - /// - /// CALLBACK_WINDOW, dwCallback is a HWND - /// - CallbackWindow = 0x00010000, - /// - /// CALLBACK_TASK, dwCallback is a HTASK - /// - CallbackTask = 0x00020000, - /// - /// CALLBACK_FUNCTION, dwCallback is a FARPROC - /// - CallbackFunction = 0x00030000, - /// - /// CALLBACK_THREAD, thread ID replaces 16 bit task - /// - CallbackThread = CallbackTask, - /// - /// CALLBACK_EVENT, dwCallback is an EVENT Handle - /// - CallbackEvent = 0x00050000, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamOpenFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamOpenFlags.cs.meta deleted file mode 100644 index 6d277b0..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamOpenFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 473e4de9c2c745d48a960b22ee77555e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamSizeFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamSizeFlags.cs deleted file mode 100644 index 8647bdc..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamSizeFlags.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave.Compression -{ - enum AcmStreamSizeFlags - { - /// - /// ACM_STREAMSIZEF_SOURCE - /// - Source = 0x00000000, - /// - /// ACM_STREAMSIZEF_DESTINATION - /// - Destination = 0x00000001 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamSizeFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamSizeFlags.cs.meta deleted file mode 100644 index dba47bf..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/AcmStreamSizeFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a09865d63cc568b4495b39f7d56795f9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/WaveFilter.cs b/Assets/Scripts/Audio/NAudio/Wave/Compression/WaveFilter.cs deleted file mode 100644 index ae27610..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/WaveFilter.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.Compression -{ - /// - /// Summary description for WaveFilter. - /// - [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] - public class WaveFilter - { - /// - /// cbStruct - /// - public int StructureSize = Marshal.SizeOf(typeof(WaveFilter)); - /// - /// dwFilterTag - /// - public int FilterTag = 0; - /// - /// fdwFilter - /// - public int Filter = 0; - /// - /// reserved - /// - [MarshalAs(UnmanagedType.ByValArray, SizeConst=5)] - public int []Reserved = null; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/Compression/WaveFilter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/Compression/WaveFilter.cs.meta deleted file mode 100644 index 07103c1..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/Compression/WaveFilter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 579eb20739ebc904b8a9fd283aa00833 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop.meta deleted file mode 100644 index 9f89790..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b623dcb2358bca343b3dd8a3cc8b95ec -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/Manufacturers.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/Manufacturers.cs deleted file mode 100644 index 7a74660..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/Manufacturers.cs +++ /dev/null @@ -1,376 +0,0 @@ -using System; - -namespace NAudio -{ - /// - /// Manufacturer codes from mmreg.h - /// - public enum Manufacturers - { - /// Microsoft Corporation - Microsoft = 1, - /// Creative Labs, Inc - Creative = 2, - /// Media Vision, Inc. - Mediavision = 3, - /// Fujitsu Corp. - Fujitsu = 4, - /// Artisoft, Inc. - Artisoft = 20, - /// Turtle Beach, Inc. - TurtleBeach = 21, - /// IBM Corporation - Ibm = 22, - /// Vocaltec LTD. - Vocaltec = 23, - /// Roland - Roland = 24, - /// DSP Solutions, Inc. - DspSolutions = 25, - /// NEC - Nec = 26, - /// ATI - Ati = 27, - /// Wang Laboratories, Inc - Wanglabs = 28, - /// Tandy Corporation - Tandy = 29, - /// Voyetra - Voyetra = 30, - /// Antex Electronics Corporation - Antex = 31, - /// ICL Personal Systems - IclPS = 32, - /// Intel Corporation - Intel = 33, - /// Advanced Gravis - Gravis = 34, - /// Video Associates Labs, Inc. - Val = 35, - /// InterActive Inc - Interactive = 36, - /// Yamaha Corporation of America - Yamaha = 37, - /// Everex Systems, Inc - Everex = 38, - /// Echo Speech Corporation - Echo = 39, - /// Sierra Semiconductor Corp - Sierra = 40, - /// Computer Aided Technologies - Cat = 41, - /// APPS Software International - Apps = 42, - /// DSP Group, Inc - DspGroup = 43, - /// microEngineering Labs - Melabs = 44, - /// Computer Friends, Inc. - ComputerFriends = 45, - /// ESS Technology - Ess = 46, - /// Audio, Inc. - Audiofile = 47, - /// Motorola, Inc. - Motorola = 48, - /// Canopus, co., Ltd. - Canopus = 49, - /// Seiko Epson Corporation - Epson = 50, - /// Truevision - Truevision = 51, - /// Aztech Labs, Inc. - Aztech = 52, - /// Videologic - Videologic = 53, - /// SCALACS - Scalacs = 54, - /// Korg Inc. - Korg = 55, - /// Audio Processing Technology - Apt = 56, - /// Integrated Circuit Systems, Inc. - Ics = 57, - /// Iterated Systems, Inc. - Iteratedsys = 58, - /// Metheus - Metheus = 59, - /// Logitech, Inc. - Logitech = 60, - /// Winnov, Inc. - Winnov = 61, - /// NCR Corporation - Ncr = 62, - /// EXAN - Exan = 63, - /// AST Research Inc. - Ast = 64, - /// Willow Pond Corporation - Willowpond = 65, - /// Sonic Foundry - Sonicfoundry = 66, - /// Vitec Multimedia - Vitec = 67, - /// MOSCOM Corporation - Moscom = 68, - /// Silicon Soft, Inc. - Siliconsoft = 69, - /// Supermac - Supermac = 73, - /// Audio Processing Technology - Audiopt = 74, - /// Speech Compression - Speechcomp = 76, - /// Ahead, Inc. - Ahead = 77, - /// Dolby Laboratories - Dolby = 78, - /// OKI - Oki = 79, - /// AuraVision Corporation - Auravision = 80, - /// Ing C. Olivetti & C., S.p.A. - Olivetti = 81, - /// I/O Magic Corporation - Iomagic = 82, - /// Matsushita Electric Industrial Co., LTD. - Matsushita = 83, - /// Control Resources Limited - Controlres = 84, - /// Xebec Multimedia Solutions Limited - Xebec = 85, - /// New Media Corporation - Newmedia = 86, - /// Natural MicroSystems - Nms = 87, - /// Lyrrus Inc. - Lyrrus = 88, - /// Compusic - Compusic = 89, - /// OPTi Computers Inc. - Opti = 90, - /// Adlib Accessories Inc. - Adlacc = 91, - /// Compaq Computer Corp. - Compaq = 92, - /// Dialogic Corporation - Dialogic = 93, - /// InSoft, Inc. - Insoft = 94, - /// M.P. Technologies, Inc. - Mptus = 95, - /// Weitek - Weitek = 96, - /// Lernout & Hauspie - LernoutAndHauspie = 97, - /// Quanta Computer Inc. - Qciar = 98, - /// Apple Computer, Inc. - Apple = 99, - /// Digital Equipment Corporation - Digital = 100, - /// Mark of the Unicorn - Motu = 101, - /// Workbit Corporation - Workbit = 102, - /// Ositech Communications Inc. - Ositech = 103, - /// miro Computer Products AG - Miro = 104, - /// Cirrus Logic - Cirruslogic = 105, - /// ISOLUTION B.V. - Isolution = 106, - /// Horizons Technology, Inc - Horizons = 107, - /// Computer Concepts Ltd - Concepts = 108, - /// Voice Technologies Group, Inc. - Vtg = 109, - /// Radius - Radius = 110, - /// Rockwell International - Rockwell = 111, - /// Co. XYZ for testing - Xyz = 112, - /// Opcode Systems - Opcode = 113, - /// Voxware Inc - Voxware = 114, - /// Northern Telecom Limited - NorthernTelecom = 115, - /// APICOM - Apicom = 116, - /// Grande Software - Grande = 117, - /// ADDX - Addx = 118, - /// Wildcat Canyon Software - Wildcat = 119, - /// Rhetorex Inc - Rhetorex = 120, - /// Brooktree Corporation - Brooktree = 121, - /// ENSONIQ Corporation - Ensoniq = 125, - /// FAST Multimedia AG - Fast = 126, - /// NVidia Corporation - Nvidia = 127, - /// OKSORI Co., Ltd. - Oksori = 128, - /// DiAcoustics, Inc. - Diacoustics = 129, - /// Gulbransen, Inc. - Gulbransen = 130, - /// Kay Elemetrics, Inc. - KayElemetrics = 131, - /// Crystal Semiconductor Corporation - Crystal = 132, - /// Splash Studios - SplashStudios = 133, - /// Quarterdeck Corporation - Quarterdeck = 134, - /// TDK Corporation - Tdk = 135, - /// Digital Audio Labs, Inc. - DigitalAudioLabs = 136, - /// Seer Systems, Inc. - Seersys = 137, - /// PictureTel Corporation - Picturetel = 138, - /// AT&T Microelectronics - AttMicroelectronics = 139, - /// Osprey Technologies, Inc. - Osprey = 140, - /// Mediatrix Peripherals - Mediatrix = 141, - /// SounDesignS M.C.S. Ltd. - Soundesigns = 142, - /// A.L. Digital Ltd. - Aldigital = 143, - /// Spectrum Signal Processing, Inc. - SpectrumSignalProcessing = 144, - /// Electronic Courseware Systems, Inc. - Ecs = 145, - /// AMD - Amd = 146, - /// Core Dynamics - Coredynamics = 147, - /// CANAM Computers - Canam = 148, - /// Softsound, Ltd. - Softsound = 149, - /// Norris Communications, Inc. - Norris = 150, - /// Danka Data Devices - Ddd = 151, - /// EuPhonics - Euphonics = 152, - /// Precept Software, Inc. - Precept = 153, - /// Crystal Net Corporation - CrystalNet = 154, - /// Chromatic Research, Inc - Chromatic = 155, - /// Voice Information Systems, Inc - Voiceinfo = 156, - /// Vienna Systems - Viennasys = 157, - /// Connectix Corporation - Connectix = 158, - /// Gadget Labs LLC - Gadgetlabs = 159, - /// Frontier Design Group LLC - Frontier = 160, - /// Viona Development GmbH - Viona = 161, - /// Casio Computer Co., LTD - Casio = 162, - /// Diamond Multimedia - Diamondmm = 163, - /// S3 - S3 = 164, - /// Fraunhofer - FraunhoferIis = 172, - - /* - public static String GetName(int manufacturerId) { - switch(manufacturerId) { - case Gravis: return "Advanced Gravis Computer Technology, Ltd."; - case Antex: return "Antex Electronics Corporation"; - case Apps: return "APPS Software"; - case Artisoft: return "Artisoft, Inc."; - case Ast: return "AST Research, Inc."; - case Ati: return "ATI Technologies, Inc."; - case Audiofile: return "Audio, Inc."; - case Apt: return "Audio Processing Technology"; - case Audiopt: return "Audio Processing Technology"; - case Auravision: return "Auravision Corporation"; - case Aztech: return "Aztech Labs, Inc."; - case Canopus: return "Canopus, Co., Ltd."; - case Compusic: return "Compusic"; - case Cat: return "Computer Aided Technology, Inc."; - case ComputerFriends: return "Computer Friends, Inc."; - case Controlres: return "Control Resources Corporation"; - case Creative: return "Creative Labs, Inc."; - case Dialogic: return "Dialogic Corporation"; - case Dolby: return "Dolby Laboratories, Inc."; - case DspGroup: return "DSP Group, Inc."; - case DspSolutions: return "DSP Solutions, Inc."; - case Echo: return "Echo Speech Corporation"; - case Ess: return "ESS Technology, Inc."; - case Everex: return "Everex Systems, Inc."; - case Exan: return "EXAN, Ltd."; - case Fujitsu: return "Fujitsu, Ltd."; - case Iomagic: return "I/O Magic Corporation"; - case IclPS: return "ICL Personal Systems"; - case Olivetti: return "Ing. C. Olivetti & C., S.p.A."; - case Ics: return "Integrated Circuit Systems, Inc."; - case Intel: return "Intel Corporation"; - case Interactive: return "InterActive, Inc."; - case Ibm: return "International Business Machines"; - case Iteratedsys: return "Iterated Systems, Inc."; - case Logitech: return "Logitech, Inc."; - case Lyrrus: return "Lyrrus, Inc."; - case Matsushita: return "Matsushita Electric Corporation of America"; - case Mediavision: return "Media Vision, Inc."; - case Metheus: return "Metheus Corporation"; - case Melabs: return "microEngineering Labs"; - case Microsoft: return "Microsoft Corporation"; - case Moscom: return "MOSCOM Corporation"; - case Motorola: return "Motorola, Inc."; - case Nms: return "Natural MicroSystems Corporation"; - case Ncr: return "NCR Corporation"; - case Nec: return "NEC Corporation"; - case Newmedia: return "New Media Corporation"; - case Oki: return "OKI"; - case Opti: return "OPTi, Inc."; - case Roland: return "Roland Corporation"; - case Scalacs: return "SCALACS"; - case Epson: return "Seiko Epson Corporation, Inc."; - case Sierra: return "Sierra Semiconductor Corporation"; - case Siliconsoft: return "Silicon Software, Inc."; - case Sonicfoundry: return "Sonic Foundry"; - case Speechcomp: return "Speech Compression"; - case Supermac: return "Supermac Technology, Inc."; - case Tandy: return "Tandy Corporation"; - case Korg: return "Toshihiko Okuhura, Korg, Inc."; - case Truevision: return "Truevision, Inc."; - case TurtleBeach: return "Turtle Beach Systems"; - case Val: return "Video Associates Labs, Inc."; - case Videologic: return "VideoLogic, Inc."; - case Vitec: return "Visual Information Technologies, Inc."; - case Vocaltec: return "VocalTec, Inc."; - case Voyetra: return "Voyetra Technologies"; - case Wanglabs: return "Wang Laboratories"; - case Willowpond: return "Willow Pond Corporation"; - case Winnov: return "Winnov, LP"; - case Xebec: return "Xebec Multimedia Solutions Limited"; - case Yamaha: return "Yamaha Corporation of America"; - default: return String.Format("Unknown Manufacturer ({0})",manufacturerId); - } - } - **/ - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/Manufacturers.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/Manufacturers.cs.meta deleted file mode 100644 index 255380d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/Manufacturers.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f57b59750873d6043919bf60d94b92cd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmException.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmException.cs deleted file mode 100644 index 651d0e4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmException.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; - -namespace NAudio -{ - /// - /// Summary description for MmException. - /// - public class MmException : Exception - { - private MmResult result; - private string function; - - /// - /// Creates a new MmException - /// - /// The result returned by the Windows API call - /// The name of the Windows API that failed - public MmException(MmResult result, string function) - : base(MmException.ErrorMessage(result, function)) - { - this.result = result; - this.function = function; - } - - - private static string ErrorMessage(MmResult result, string function) - { - return String.Format("{0} calling {1}", result, function); - } - - /// - /// Helper function to automatically raise an exception on failure - /// - /// The result of the API call - /// The API function name - public static void Try(MmResult result, string function) - { - if (result != MmResult.NoError) - throw new MmException(result, function); - } - - /// - /// Returns the Windows API result - /// - public MmResult Result - { - get - { - return result; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmException.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmException.cs.meta deleted file mode 100644 index 4e5fe09..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmException.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 10dcef64a2b5b254aa3dd2fdf6e2a2aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmResult.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmResult.cs deleted file mode 100644 index 2b4c788..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmResult.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; - -namespace NAudio -{ - /// - /// Windows multimedia error codes from mmsystem.h. - /// - public enum MmResult - { - /// no error, MMSYSERR_NOERROR - NoError = 0, - /// unspecified error, MMSYSERR_ERROR - UnspecifiedError = 1, - /// device ID out of range, MMSYSERR_BADDEVICEID - BadDeviceId = 2, - /// driver failed enable, MMSYSERR_NOTENABLED - NotEnabled = 3, - /// device already allocated, MMSYSERR_ALLOCATED - AlreadyAllocated = 4, - /// device handle is invalid, MMSYSERR_INVALHANDLE - InvalidHandle = 5, - /// no device driver present, MMSYSERR_NODRIVER - NoDriver = 6, - /// memory allocation error, MMSYSERR_NOMEM - MemoryAllocationError = 7, - /// function isn't supported, MMSYSERR_NOTSUPPORTED - NotSupported = 8, - /// error value out of range, MMSYSERR_BADERRNUM - BadErrorNumber = 9, - /// invalid flag passed, MMSYSERR_INVALFLAG - InvalidFlag = 10, - /// invalid parameter passed, MMSYSERR_INVALPARAM - InvalidParameter = 11, - /// handle being used simultaneously on another thread (eg callback),MMSYSERR_HANDLEBUSY - HandleBusy = 12, - /// specified alias not found, MMSYSERR_INVALIDALIAS - InvalidAlias = 13, - /// bad registry database, MMSYSERR_BADDB - BadRegistryDatabase = 14, - /// registry key not found, MMSYSERR_KEYNOTFOUND - RegistryKeyNotFound = 15, - /// registry read error, MMSYSERR_READERROR - RegistryReadError = 16, - /// registry write error, MMSYSERR_WRITEERROR - RegistryWriteError = 17, - /// registry delete error, MMSYSERR_DELETEERROR - RegistryDeleteError = 18, - /// registry value not found, MMSYSERR_VALNOTFOUND - RegistryValueNotFound = 19, - /// driver does not call DriverCallback, MMSYSERR_NODRIVERCB - NoDriverCallback = 20, - /// more data to be returned, MMSYSERR_MOREDATA - MoreData = 21, - - /// unsupported wave format, WAVERR_BADFORMAT - WaveBadFormat = 32, - /// still something playing, WAVERR_STILLPLAYING - WaveStillPlaying = 33, - /// header not prepared, WAVERR_UNPREPARED - WaveHeaderUnprepared = 34, - /// device is synchronous, WAVERR_SYNC - WaveSync = 35, - - // ACM error codes, found in msacm.h - - /// Conversion not possible (ACMERR_NOTPOSSIBLE) - AcmNotPossible = 512, - /// Busy (ACMERR_BUSY) - AcmBusy = 513, - /// Header Unprepared (ACMERR_UNPREPARED) - AcmHeaderUnprepared = 514, - /// Cancelled (ACMERR_CANCELED) - AcmCancelled = 515, - - // Mixer error codes, found in mmresult.h - - /// invalid line (MIXERR_INVALLINE) - MixerInvalidLine = 1024, - /// invalid control (MIXERR_INVALCONTROL) - MixerInvalidControl = 1025, - /// invalid value (MIXERR_INVALVALUE) - MixerInvalidValue = 1026, - } - -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmResult.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmResult.cs.meta deleted file mode 100644 index 14a3891..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmResult.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a3dc03c6094857b41b3775fa9dc5a080 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmTime.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmTime.cs deleted file mode 100644 index 363987f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmTime.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.Wave -{ - // http://msdn.microsoft.com/en-us/library/dd757347(v=VS.85).aspx - [StructLayout(LayoutKind.Explicit)] - struct MmTime - { - public const int TIME_MS = 0x0001; - public const int TIME_SAMPLES = 0x0002; - public const int TIME_BYTES = 0x0004; - - [FieldOffset(0)] - public UInt32 wType; - [FieldOffset(4)] - public UInt32 ms; - [FieldOffset(4)] - public UInt32 sample; - [FieldOffset(4)] - public UInt32 cb; - [FieldOffset(4)] - public UInt32 ticks; - [FieldOffset(4)] - public Byte smpteHour; - [FieldOffset(5)] - public Byte smpteMin; - [FieldOffset(6)] - public Byte smpteSec; - [FieldOffset(7)] - public Byte smpteFrame; - [FieldOffset(8)] - public Byte smpteFps; - [FieldOffset(9)] - public Byte smpteDummy; - [FieldOffset(10)] - public Byte smptePad0; - [FieldOffset(11)] - public Byte smptePad1; - [FieldOffset(4)] - public UInt32 midiSongPtrPos; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmTime.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmTime.cs.meta deleted file mode 100644 index 66cbd0d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/MmTime.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b37a5862f37fd8d4590a68249cb51289 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackInfo.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackInfo.cs deleted file mode 100644 index 2f583ee..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackInfo.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Wave Callback Info - /// - public class WaveCallbackInfo - { - /// - /// Callback Strategy - /// - public WaveCallbackStrategy Strategy { get; private set; } - /// - /// Window Handle (if applicable) - /// - public IntPtr Handle { get; private set; } - - - /// - /// Sets up a new WaveCallbackInfo for function callbacks - /// - public static WaveCallbackInfo FunctionCallback() - { - return new WaveCallbackInfo(WaveCallbackStrategy.FunctionCallback, IntPtr.Zero); - } - - /// - /// Sets up a new WaveCallbackInfo to use a New Window - /// IMPORTANT: only use this on the GUI thread - /// - public static WaveCallbackInfo NewWindow() - { - return new WaveCallbackInfo(WaveCallbackStrategy.NewWindow, IntPtr.Zero); - } - - /// - /// Sets up a new WaveCallbackInfo to use an existing window - /// IMPORTANT: only use this on the GUI thread - /// - public static WaveCallbackInfo ExistingWindow(IntPtr handle) - { - if (handle == IntPtr.Zero) - { - throw new ArgumentException("Handle cannot be zero"); - } - return new WaveCallbackInfo(WaveCallbackStrategy.ExistingWindow, handle); - } - - private WaveCallbackInfo(WaveCallbackStrategy strategy, IntPtr handle) - { - this.Strategy = strategy; - this.Handle = handle; - } - - internal void Connect(WaveInterop.WaveCallback callback) - { - - } - - internal MmResult WaveOutOpen(out IntPtr waveOutHandle, int deviceNumber, WaveFormat waveFormat, WaveInterop.WaveCallback callback) - { - MmResult result; - if (Strategy == WaveCallbackStrategy.FunctionCallback) - { - result = WaveInterop.waveOutOpen(out waveOutHandle, (IntPtr)deviceNumber, waveFormat, callback, IntPtr.Zero, WaveInterop.WaveInOutOpenFlags.CallbackFunction); - } - else - { - result = WaveInterop.waveOutOpenWindow(out waveOutHandle, (IntPtr)deviceNumber, waveFormat, this.Handle, IntPtr.Zero, WaveInterop.WaveInOutOpenFlags.CallbackWindow); - } - return result; - } - - internal MmResult WaveInOpen(out IntPtr waveInHandle, int deviceNumber, WaveFormat waveFormat, WaveInterop.WaveCallback callback) - { - MmResult result; - if (Strategy == WaveCallbackStrategy.FunctionCallback) - { - result = WaveInterop.waveInOpen(out waveInHandle, (IntPtr)deviceNumber, waveFormat, callback, IntPtr.Zero, WaveInterop.WaveInOutOpenFlags.CallbackFunction); - } - else - { - result = WaveInterop.waveInOpenWindow(out waveInHandle, (IntPtr)deviceNumber, waveFormat, this.Handle, IntPtr.Zero, WaveInterop.WaveInOutOpenFlags.CallbackWindow); - } - return result; - } - - internal void Disconnect() - { - - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackInfo.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackInfo.cs.meta deleted file mode 100644 index ca88506..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9e4a74a865447fe49812887ed78478db -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackStrategy.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackStrategy.cs deleted file mode 100644 index df8889a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackStrategy.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Wave Callback Strategy - /// - public enum WaveCallbackStrategy - { - /// - /// Use a function - /// - FunctionCallback, - /// - /// Create a new window (should only be done if on GUI thread) - /// - NewWindow, - /// - /// Use an existing window handle - /// - ExistingWindow, - /// - /// Use an event handle - /// - Event, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackStrategy.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackStrategy.cs.meta deleted file mode 100644 index b307145..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveCallbackStrategy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a09269ec171e1584b908948cd28f3b6f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeader.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeader.cs deleted file mode 100644 index 5c3e075..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeader.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave -{ - /// - /// WaveHeader interop structure (WAVEHDR) - /// http://msdn.microsoft.com/en-us/library/dd743837%28VS.85%29.aspx - /// - [StructLayout(LayoutKind.Sequential)] - class WaveHeader - { - /// pointer to locked data buffer (lpData) - public IntPtr dataBuffer; - /// length of data buffer (dwBufferLength) - public int bufferLength; - /// used for input only (dwBytesRecorded) - public int bytesRecorded; - /// for client's use (dwUser) - public IntPtr userData; - /// assorted flags (dwFlags) - public WaveHeaderFlags flags; - /// loop control counter (dwLoops) - public int loops; - /// PWaveHdr, reserved for driver (lpNext) - public IntPtr next; - /// reserved for driver - public IntPtr reserved; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeader.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeader.cs.meta deleted file mode 100644 index c0d1987..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e79b335ad0883d8448abd72115446ef4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeaderFlags.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeaderFlags.cs deleted file mode 100644 index 0b1280d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeaderFlags.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Wave Header Flags enumeration - /// - [Flags] - public enum WaveHeaderFlags - { - /// - /// WHDR_BEGINLOOP - /// This buffer is the first buffer in a loop. This flag is used only with output buffers. - /// - BeginLoop = 0x00000004, - /// - /// WHDR_DONE - /// Set by the device driver to indicate that it is finished with the buffer and is returning it to the application. - /// - Done = 0x00000001, - /// - /// WHDR_ENDLOOP - /// This buffer is the last buffer in a loop. This flag is used only with output buffers. - /// - EndLoop = 0x00000008, - /// - /// WHDR_INQUEUE - /// Set by Windows to indicate that the buffer is queued for playback. - /// - InQueue = 0x00000010, - /// - /// WHDR_PREPARED - /// Set by Windows to indicate that the buffer has been prepared with the waveInPrepareHeader or waveOutPrepareHeader function. - /// - Prepared = 0x00000002 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeaderFlags.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeaderFlags.cs.meta deleted file mode 100644 index 8435350..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveHeaderFlags.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f628707965b98f940b70e7e1e1fbd6e1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInCapabilities.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInCapabilities.cs deleted file mode 100644 index 56dbff7..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInCapabilities.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using Microsoft.Win32; - -namespace NAudio.Wave -{ - /// - /// WaveInCapabilities structure (based on WAVEINCAPS2 from mmsystem.h) - /// http://msdn.microsoft.com/en-us/library/ms713726(VS.85).aspx - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - public struct WaveInCapabilities - { - /// - /// wMid - /// - private short manufacturerId; - /// - /// wPid - /// - private short productId; - /// - /// vDriverVersion - /// - private int driverVersion; - /// - /// Product Name (szPname) - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxProductNameLength)] - private string productName; - /// - /// Supported formats (bit flags) dwFormats - /// - private SupportedWaveFormat supportedFormats; - /// - /// Supported channels (1 for mono 2 for stereo) (wChannels) - /// Seems to be set to -1 on a lot of devices - /// - private short channels; - /// - /// wReserved1 - /// - private short reserved; - - // extra WAVEINCAPS2 members - private Guid manufacturerGuid; - private Guid productGuid; - private Guid nameGuid; - - private const int MaxProductNameLength = 32; - - /// - /// Number of channels supported - /// - public int Channels - { - get - { - return channels; - } - } - - /// - /// The product name - /// - public string ProductName - { - get - { - return productName; - } - } - - /// - /// The device name Guid (if provided) - /// - public Guid NameGuid { get { return nameGuid; } } - /// - /// The product name Guid (if provided) - /// - public Guid ProductGuid { get { return productGuid; } } - /// - /// The manufacturer guid (if provided) - /// - public Guid ManufacturerGuid { get { return manufacturerGuid; } } - - /// - /// Checks to see if a given SupportedWaveFormat is supported - /// - /// The SupportedWaveFormat - /// true if supported - public bool SupportsWaveFormat(SupportedWaveFormat waveFormat) - { - return (supportedFormats & waveFormat) == waveFormat; - } - - } - - internal static class WaveCapabilitiesHelpers - { - public static readonly Guid MicrosoftDefaultManufacturerId = new Guid("d5a47fa8-6d98-11d1-a21a-00a0c9223196"); - public static readonly Guid DefaultWaveOutGuid = new Guid("E36DC310-6D9A-11D1-A21A-00A0C9223196"); - public static readonly Guid DefaultWaveInGuid = new Guid("E36DC311-6D9A-11D1-A21A-00A0C9223196"); - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInCapabilities.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInCapabilities.cs.meta deleted file mode 100644 index c25f487..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInCapabilities.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8da8a77093edea149b1ef5ceabafd6ad -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInEventArgs.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInEventArgs.cs deleted file mode 100644 index 3c2d51f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInEventArgs.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Event Args for WaveInStream event - /// - public class WaveInEventArgs : EventArgs - { - private byte[] buffer; - private int bytes; - - /// - /// Creates new WaveInEventArgs - /// - public WaveInEventArgs(byte[] buffer, int bytes) - { - this.buffer = buffer; - this.bytes = bytes; - } - - /// - /// Buffer containing recorded data. Note that it might not be completely - /// full. - /// - public byte[] Buffer - { - get { return buffer; } - } - - /// - /// The number of recorded bytes in Buffer. - /// - public int BytesRecorded - { - get { return bytes; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInEventArgs.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInEventArgs.cs.meta deleted file mode 100644 index e7cf8fd..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInEventArgs.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 20a297154f726d24e863ed83dcbc60a0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInterop.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInterop.cs deleted file mode 100644 index e5803ac..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInterop.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave -{ - /// - /// MME Wave function interop - /// - class WaveInterop - { - [Flags] - public enum WaveInOutOpenFlags - { - /// - /// CALLBACK_NULL - /// No callback - /// - CallbackNull = 0, - /// - /// CALLBACK_FUNCTION - /// dwCallback is a FARPROC - /// - CallbackFunction = 0x30000, - /// - /// CALLBACK_EVENT - /// dwCallback is an EVENT handle - /// - CallbackEvent = 0x50000, - /// - /// CALLBACK_WINDOW - /// dwCallback is a HWND - /// - CallbackWindow = 0x10000, - /// - /// CALLBACK_THREAD - /// callback is a thread ID - /// - CallbackThread = 0x20000, - /* - WAVE_FORMAT_QUERY = 1, - WAVE_MAPPED = 4, - WAVE_FORMAT_DIRECT = 8*/ - } - - //public const int TIME_MS = 0x0001; // time in milliseconds - //public const int TIME_SAMPLES = 0x0002; // number of wave samples - //public const int TIME_BYTES = 0x0004; // current byte offset - - public enum WaveMessage - { - /// - /// WIM_OPEN - /// - WaveInOpen = 0x3BE, - /// - /// WIM_CLOSE - /// - WaveInClose = 0x3BF, - /// - /// WIM_DATA - /// - WaveInData = 0x3C0, - - /// - /// WOM_CLOSE - /// - WaveOutClose = 0x3BC, - /// - /// WOM_DONE - /// - WaveOutDone = 0x3BD, - /// - /// WOM_OPEN - /// - WaveOutOpen = 0x3BB - } - - // use the userdata as a reference - // WaveOutProc http://msdn.microsoft.com/en-us/library/dd743869%28VS.85%29.aspx - // WaveInProc http://msdn.microsoft.com/en-us/library/dd743849%28VS.85%29.aspx - public delegate void WaveCallback(IntPtr hWaveOut, WaveMessage message, IntPtr dwInstance, WaveHeader wavhdr, IntPtr dwReserved); - - [DllImport("winmm.dll")] - public static extern Int32 mmioStringToFOURCC([MarshalAs(UnmanagedType.LPStr)] String s, int flags); - - [DllImport("winmm.dll")] - public static extern Int32 waveOutGetNumDevs(); - [DllImport("winmm.dll")] - public static extern MmResult waveOutPrepareHeader(IntPtr hWaveOut, WaveHeader lpWaveOutHdr, int uSize); - [DllImport("winmm.dll")] - public static extern MmResult waveOutUnprepareHeader(IntPtr hWaveOut, WaveHeader lpWaveOutHdr, int uSize); - [DllImport("winmm.dll")] - public static extern MmResult waveOutWrite(IntPtr hWaveOut, WaveHeader lpWaveOutHdr, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd743866%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult waveOutOpen(out IntPtr hWaveOut, IntPtr uDeviceID, WaveFormat lpFormat, WaveCallback dwCallback, IntPtr dwInstance, WaveInOutOpenFlags dwFlags); - [DllImport("winmm.dll", EntryPoint = "waveOutOpen")] - public static extern MmResult waveOutOpenWindow(out IntPtr hWaveOut, IntPtr uDeviceID, WaveFormat lpFormat, IntPtr callbackWindowHandle, IntPtr dwInstance, WaveInOutOpenFlags dwFlags); - - [DllImport("winmm.dll")] - public static extern MmResult waveOutReset(IntPtr hWaveOut); - [DllImport("winmm.dll")] - public static extern MmResult waveOutClose(IntPtr hWaveOut); - [DllImport("winmm.dll")] - public static extern MmResult waveOutPause(IntPtr hWaveOut); - [DllImport("winmm.dll")] - public static extern MmResult waveOutRestart(IntPtr hWaveOut); - - // http://msdn.microsoft.com/en-us/library/dd743863%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult waveOutGetPosition(IntPtr hWaveOut, out MmTime mmTime, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd743874%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult waveOutSetVolume(IntPtr hWaveOut, int dwVolume); - - [DllImport("winmm.dll")] - public static extern MmResult waveOutGetVolume(IntPtr hWaveOut, out int dwVolume); - - // http://msdn.microsoft.com/en-us/library/dd743857%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Auto)] - public static extern MmResult waveOutGetDevCaps(IntPtr deviceID, out WaveOutCapabilities waveOutCaps, int waveOutCapsSize); - - [DllImport("winmm.dll")] - public static extern Int32 waveInGetNumDevs(); - - // http://msdn.microsoft.com/en-us/library/dd743841%28VS.85%29.aspx - [DllImport("winmm.dll", CharSet = CharSet.Auto)] - public static extern MmResult waveInGetDevCaps(IntPtr deviceID, out WaveInCapabilities waveInCaps, int waveInCapsSize); - - // http://msdn.microsoft.com/en-us/library/dd743838%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult waveInAddBuffer(IntPtr hWaveIn, WaveHeader pwh, int cbwh); - [DllImport("winmm.dll")] - public static extern MmResult waveInClose(IntPtr hWaveIn); - - // http://msdn.microsoft.com/en-us/library/dd743847%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult waveInOpen(out IntPtr hWaveIn, IntPtr uDeviceID, WaveFormat lpFormat, WaveCallback dwCallback, IntPtr dwInstance, WaveInOutOpenFlags dwFlags); - [DllImport("winmm.dll", EntryPoint = "waveInOpen")] - public static extern MmResult waveInOpenWindow(out IntPtr hWaveIn, IntPtr uDeviceID, WaveFormat lpFormat, IntPtr callbackWindowHandle, IntPtr dwInstance, WaveInOutOpenFlags dwFlags); - - // http://msdn.microsoft.com/en-us/library/dd743848%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult waveInPrepareHeader(IntPtr hWaveIn, WaveHeader lpWaveInHdr, int uSize); - - [DllImport("winmm.dll")] - public static extern MmResult waveInUnprepareHeader(IntPtr hWaveIn, WaveHeader lpWaveInHdr, int uSize); - - // http://msdn.microsoft.com/en-us/library/dd743850%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult waveInReset(IntPtr hWaveIn); - - // http://msdn.microsoft.com/en-us/library/dd743851%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult waveInStart(IntPtr hWaveIn); - - // http://msdn.microsoft.com/en-us/library/dd743852%28VS.85%29.aspx - [DllImport("winmm.dll")] - public static extern MmResult waveInStop(IntPtr hWaveIn); - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInterop.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInterop.cs.meta deleted file mode 100644 index bb20446..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveInterop.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 743d4b380d00069459859a26b2eaeee8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutCapabilities.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutCapabilities.cs deleted file mode 100644 index dd990f4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutCapabilities.cs +++ /dev/null @@ -1,217 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave -{ - /// - /// WaveOutCapabilities structure (based on WAVEOUTCAPS2 from mmsystem.h) - /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_waveoutcaps_str.asp - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - public struct WaveOutCapabilities - { - /// - /// wMid - /// - private short manufacturerId; - /// - /// wPid - /// - private short productId; - /// - /// vDriverVersion - /// - private int driverVersion; - /// - /// Product Name (szPname) - /// - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxProductNameLength)] - private string productName; - /// - /// Supported formats (bit flags) dwFormats - /// - private SupportedWaveFormat supportedFormats; - /// - /// Supported channels (1 for mono 2 for stereo) (wChannels) - /// Seems to be set to -1 on a lot of devices - /// - private short channels; - /// - /// wReserved1 - /// - private short reserved; - /// - /// Optional functionality supported by the device - /// - private WaveOutSupport support; // = new WaveOutSupport(); - - // extra WAVEOUTCAPS2 members - private Guid manufacturerGuid; - private Guid productGuid; - private Guid nameGuid; - - private const int MaxProductNameLength = 32; - - /// - /// Number of channels supported - /// - public int Channels - { - get - { - return channels; - } - } - - /// - /// Whether playback control is supported - /// - public bool SupportsPlaybackRateControl - { - get - { - return (support & WaveOutSupport.PlaybackRate) == WaveOutSupport.PlaybackRate; - } - } - - /// - /// The product name - /// - public string ProductName - { - get - { - return productName; - } - } - - /// - /// Checks to see if a given SupportedWaveFormat is supported - /// - /// The SupportedWaveFormat - /// true if supported - public bool SupportsWaveFormat(SupportedWaveFormat waveFormat) - { - return (supportedFormats & waveFormat) == waveFormat; - } - - /// - /// The device name Guid (if provided) - /// - public Guid NameGuid { get { return nameGuid; } } - /// - /// The product name Guid (if provided) - /// - public Guid ProductGuid { get { return productGuid; } } - /// - /// The manufacturer guid (if provided) - /// - public Guid ManufacturerGuid { get { return manufacturerGuid; } } - } - - /// - /// Supported wave formats for WaveOutCapabilities - /// - [Flags] - public enum SupportedWaveFormat - { - /// - /// 11.025 kHz, Mono, 8-bit - /// - WAVE_FORMAT_1M08 = 0x00000001, - /// - /// 11.025 kHz, Stereo, 8-bit - /// - WAVE_FORMAT_1S08 = 0x00000002, - /// - /// 11.025 kHz, Mono, 16-bit - /// - WAVE_FORMAT_1M16 = 0x00000004, - /// - /// 11.025 kHz, Stereo, 16-bit - /// - WAVE_FORMAT_1S16 = 0x00000008, - /// - /// 22.05 kHz, Mono, 8-bit - /// - WAVE_FORMAT_2M08 = 0x00000010, - /// - /// 22.05 kHz, Stereo, 8-bit - /// - WAVE_FORMAT_2S08 = 0x00000020, - /// - /// 22.05 kHz, Mono, 16-bit - /// - WAVE_FORMAT_2M16 = 0x00000040, - /// - /// 22.05 kHz, Stereo, 16-bit - /// - WAVE_FORMAT_2S16 = 0x00000080, - /// - /// 44.1 kHz, Mono, 8-bit - /// - WAVE_FORMAT_4M08 = 0x00000100, - /// - /// 44.1 kHz, Stereo, 8-bit - /// - WAVE_FORMAT_4S08 = 0x00000200, - /// - /// 44.1 kHz, Mono, 16-bit - /// - WAVE_FORMAT_4M16 = 0x00000400, - /// - /// 44.1 kHz, Stereo, 16-bit - /// - WAVE_FORMAT_4S16 = 0x00000800, - - /// - /// 44.1 kHz, Mono, 8-bit - /// - WAVE_FORMAT_44M08 = 0x00000100, - /// - /// 44.1 kHz, Stereo, 8-bit - /// - WAVE_FORMAT_44S08 = 0x00000200, - /// - /// 44.1 kHz, Mono, 16-bit - /// - WAVE_FORMAT_44M16 = 0x00000400, - /// - /// 44.1 kHz, Stereo, 16-bit - /// - WAVE_FORMAT_44S16 = 0x00000800, - /// - /// 48 kHz, Mono, 8-bit - /// - WAVE_FORMAT_48M08 = 0x00001000, - /// - /// 48 kHz, Stereo, 8-bit - /// - WAVE_FORMAT_48S08 = 0x00002000, - /// - /// 48 kHz, Mono, 16-bit - /// - WAVE_FORMAT_48M16 = 0x00004000, - /// - /// 48 kHz, Stereo, 16-bit - /// - WAVE_FORMAT_48S16 = 0x00008000, - /// - /// 96 kHz, Mono, 8-bit - /// - WAVE_FORMAT_96M08 = 0x00010000, - /// - /// 96 kHz, Stereo, 8-bit - /// - WAVE_FORMAT_96S08 = 0x00020000, - /// - /// 96 kHz, Mono, 16-bit - /// - WAVE_FORMAT_96M16 = 0x00040000, - /// - /// 96 kHz, Stereo, 16-bit - /// - WAVE_FORMAT_96S16 = 0x00080000, - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutCapabilities.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutCapabilities.cs.meta deleted file mode 100644 index 3b1468a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutCapabilities.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b24aab35c26818f4689ae457056accbc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutSupport.cs b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutSupport.cs deleted file mode 100644 index 33baf02..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutSupport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace NAudio.Wave -{ - /// - /// Flags indicating what features this WaveOut device supports - /// - [Flags] - enum WaveOutSupport - { - /// supports pitch control (WAVECAPS_PITCH) - Pitch = 0x0001, - /// supports playback rate control (WAVECAPS_PLAYBACKRATE) - PlaybackRate = 0x0002, - /// supports volume control (WAVECAPS_VOLUME) - Volume = 0x0004, - /// supports separate left-right volume control (WAVECAPS_LRVOLUME) - LRVolume = 0x0008, - /// (WAVECAPS_SYNC) - Sync = 0x0010, - /// (WAVECAPS_SAMPLEACCURATE) - SampleAccurate = 0x0020, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutSupport.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutSupport.cs.meta deleted file mode 100644 index e82357e..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/MmeInterop/WaveOutSupport.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8d9f9c23c44c5124d8dfd060da7c38e6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters.meta deleted file mode 100644 index 363484f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c75302961bf09ee459f50ffe7b3c2a7d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/ISampleChunkConverter.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/ISampleChunkConverter.cs deleted file mode 100644 index 439a3db..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/ISampleChunkConverter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Sample provider interface to make WaveChannel32 extensible - /// Still a bit ugly, hence internal at the moment - and might even make these into - /// bit depth converting WaveProviders - /// - interface ISampleChunkConverter - { - bool Supports(WaveFormat format); - void LoadNextChunk(IWaveProvider sourceProvider, int samplePairsRequired); - bool GetNextSample(out float sampleLeft, out float sampleRight); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/ISampleChunkConverter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/ISampleChunkConverter.cs.meta deleted file mode 100644 index bd02a6f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/ISampleChunkConverter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 416b656fffb4c2346963663dca960f42 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono16SampleChunkConverter.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono16SampleChunkConverter.cs deleted file mode 100644 index cb52d90..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono16SampleChunkConverter.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - class Mono16SampleChunkConverter : ISampleChunkConverter - { - private int sourceSample; - private byte[] sourceBuffer; - private WaveBuffer sourceWaveBuffer; - private int sourceSamples; - - public bool Supports(WaveFormat waveFormat) - { - return waveFormat.Encoding == WaveFormatEncoding.Pcm && - waveFormat.BitsPerSample == 16 && - waveFormat.Channels == 1; - } - - public void LoadNextChunk(IWaveProvider source, int samplePairsRequired) - { - int sourceBytesRequired = samplePairsRequired * 2; - sourceSample = 0; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - sourceWaveBuffer = new WaveBuffer(sourceBuffer); - sourceSamples = source.Read(sourceBuffer, 0, sourceBytesRequired) / 2; - } - - public bool GetNextSample(out float sampleLeft, out float sampleRight) - { - if (sourceSample < sourceSamples) - { - sampleLeft = sourceWaveBuffer.ShortBuffer[sourceSample++] / 32768.0f; - sampleRight = sampleLeft; - return true; - } - else - { - sampleLeft = 0.0f; - sampleRight = 0.0f; - return false; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono16SampleChunkConverter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono16SampleChunkConverter.cs.meta deleted file mode 100644 index 3e1b821..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono16SampleChunkConverter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 031a2d3c303c50c47b82deed482e8b8b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono24SampleChunkConverter.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono24SampleChunkConverter.cs deleted file mode 100644 index e3e3b2d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono24SampleChunkConverter.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - class Mono24SampleChunkConverter : ISampleChunkConverter - { - private int offset; - private byte[] sourceBuffer; - private int sourceBytes; - - public bool Supports(WaveFormat waveFormat) - { - return waveFormat.Encoding == WaveFormatEncoding.Pcm && - waveFormat.BitsPerSample == 24 && - waveFormat.Channels == 1; - } - - public void LoadNextChunk(IWaveProvider source, int samplePairsRequired) - { - int sourceBytesRequired = samplePairsRequired * 3; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer,sourceBytesRequired); - sourceBytes = source.Read(sourceBuffer, 0, sourceBytesRequired); - offset = 0; - } - - public bool GetNextSample(out float sampleLeft, out float sampleRight) - { - if (offset < sourceBytes) - { - sampleLeft = (((sbyte)sourceBuffer[offset + 2] << 16) | (sourceBuffer[offset + 1] << 8) | sourceBuffer[offset]) / 8388608f; - offset += 3; - sampleRight = sampleLeft; - return true; - } - else - { - sampleLeft = 0.0f; - sampleRight = 0.0f; - return false; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono24SampleChunkConverter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono24SampleChunkConverter.cs.meta deleted file mode 100644 index 7793ac8..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono24SampleChunkConverter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 232cfe62ac0c78348939009e7d623cb5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono8SampleChunkConverter.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono8SampleChunkConverter.cs deleted file mode 100644 index 9aac48d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono8SampleChunkConverter.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - class Mono8SampleChunkConverter : ISampleChunkConverter - { - private int offset; - private byte[] sourceBuffer; - private int sourceBytes; - - public bool Supports(WaveFormat waveFormat) - { - return waveFormat.Encoding == WaveFormatEncoding.Pcm && - waveFormat.BitsPerSample == 8 && - waveFormat.Channels == 1; - } - - public void LoadNextChunk(IWaveProvider source, int samplePairsRequired) - { - int sourceBytesRequired = samplePairsRequired; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - sourceBytes = source.Read(sourceBuffer, 0, sourceBytesRequired); - offset = 0; - } - - public bool GetNextSample(out float sampleLeft, out float sampleRight) - { - if (offset < sourceBytes) - { - sampleLeft = sourceBuffer[offset] / 256f; - offset++; - sampleRight = sampleLeft; - return true; - } - else - { - sampleLeft = 0.0f; - sampleRight = 0.0f; - return false; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono8SampleChunkConverter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono8SampleChunkConverter.cs.meta deleted file mode 100644 index c0e49e2..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Mono8SampleChunkConverter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a69c513c13ad82b43b712f0651de2fd7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/MonoFloatSampleChunkConverter.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/MonoFloatSampleChunkConverter.cs deleted file mode 100644 index 5411520..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/MonoFloatSampleChunkConverter.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - class MonoFloatSampleChunkConverter : ISampleChunkConverter - { - private int sourceSample; - private byte[] sourceBuffer; - private WaveBuffer sourceWaveBuffer; - private int sourceSamples; - - public bool Supports(WaveFormat waveFormat) - { - return waveFormat.Encoding == WaveFormatEncoding.IeeeFloat && - waveFormat.Channels == 1; - } - - public void LoadNextChunk(IWaveProvider source, int samplePairsRequired) - { - int sourceBytesRequired = samplePairsRequired * 4; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - sourceWaveBuffer = new WaveBuffer(sourceBuffer); - sourceSamples = source.Read(sourceBuffer, 0, sourceBytesRequired) / 4; - sourceSample = 0; - } - - public bool GetNextSample(out float sampleLeft, out float sampleRight) - { - if (sourceSample < sourceSamples) - { - sampleLeft = sourceWaveBuffer.FloatBuffer[sourceSample++]; - sampleRight = sampleLeft; - return true; - } - else - { - sampleLeft = 0.0f; - sampleRight = 0.0f; - return false; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/MonoFloatSampleChunkConverter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/MonoFloatSampleChunkConverter.cs.meta deleted file mode 100644 index 227e803..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/MonoFloatSampleChunkConverter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dc285f33126969843a8a1be86ca1afcf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo16SampleChunkConverter.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo16SampleChunkConverter.cs deleted file mode 100644 index b6f1a24..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo16SampleChunkConverter.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - class Stereo16SampleChunkConverter : ISampleChunkConverter - { - private int sourceSample; - private byte[] sourceBuffer; - private WaveBuffer sourceWaveBuffer; - private int sourceSamples; - - public bool Supports(WaveFormat waveFormat) - { - return waveFormat.Encoding == WaveFormatEncoding.Pcm && - waveFormat.BitsPerSample == 16 && - waveFormat.Channels == 2; - } - - public void LoadNextChunk(IWaveProvider source, int samplePairsRequired) - { - int sourceBytesRequired = samplePairsRequired * 4; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - sourceWaveBuffer = new WaveBuffer(sourceBuffer); - sourceSamples = source.Read(sourceBuffer, 0, sourceBytesRequired) / 2; - sourceSample = 0; - } - - public bool GetNextSample(out float sampleLeft, out float sampleRight) - { - if (sourceSample < sourceSamples) - { - sampleLeft = sourceWaveBuffer.ShortBuffer[sourceSample++] / 32768.0f; - sampleRight = sourceWaveBuffer.ShortBuffer[sourceSample++] / 32768.0f; - return true; - } - else - { - sampleLeft = 0.0f; - sampleRight = 0.0f; - return false; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo16SampleChunkConverter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo16SampleChunkConverter.cs.meta deleted file mode 100644 index abd9384..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo16SampleChunkConverter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d1852c7291b1fa240b34865aed4ec293 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo24SampleChunkConverter.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo24SampleChunkConverter.cs deleted file mode 100644 index 76aa690..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo24SampleChunkConverter.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - class Stereo24SampleChunkConverter : ISampleChunkConverter - { - private int offset; - private byte[] sourceBuffer; - private int sourceBytes; - - public bool Supports(WaveFormat waveFormat) - { - return waveFormat.Encoding == WaveFormatEncoding.Pcm && - waveFormat.BitsPerSample == 24 && - waveFormat.Channels == 2; - } - - - public void LoadNextChunk(IWaveProvider source, int samplePairsRequired) - { - int sourceBytesRequired = samplePairsRequired * 6; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - sourceBytes = source.Read(sourceBuffer, 0, sourceBytesRequired); - offset = 0; - } - - public bool GetNextSample(out float sampleLeft, out float sampleRight) - { - if (offset < sourceBytes) - { - sampleLeft = (((sbyte)sourceBuffer[offset + 2] << 16) | (sourceBuffer[offset + 1] << 8) | sourceBuffer[offset]) / 8388608f; - offset += 3; - sampleRight = (((sbyte)sourceBuffer[offset + 2] << 16) | (sourceBuffer[offset + 1] << 8) | sourceBuffer[offset]) / 8388608f; - offset += 3; - return true; - } - else - { - sampleLeft = 0.0f; - sampleRight = 0.0f; - return false; - } - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo24SampleChunkConverter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo24SampleChunkConverter.cs.meta deleted file mode 100644 index 1ea812a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo24SampleChunkConverter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d8af114d8042c874d86f9a443b29ca47 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo8SampleChunkConverter.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo8SampleChunkConverter.cs deleted file mode 100644 index 0031ed3..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo8SampleChunkConverter.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - class Stereo8SampleChunkConverter : ISampleChunkConverter - { - private int offset; - private byte[] sourceBuffer; - private int sourceBytes; - - public bool Supports(WaveFormat waveFormat) - { - return waveFormat.Encoding == WaveFormatEncoding.Pcm && - waveFormat.BitsPerSample == 8 && - waveFormat.Channels == 2; - } - - public void LoadNextChunk(IWaveProvider source, int samplePairsRequired) - { - int sourceBytesRequired = samplePairsRequired * 2; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - sourceBytes = source.Read(sourceBuffer, 0, sourceBytesRequired); - offset = 0; - } - - public bool GetNextSample(out float sampleLeft, out float sampleRight) - { - if (offset < sourceBytes) - { - sampleLeft = sourceBuffer[offset++] / 256f; - sampleRight = sourceBuffer[offset++] / 256f; - return true; - } - else - { - sampleLeft = 0.0f; - sampleRight = 0.0f; - return false; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo8SampleChunkConverter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo8SampleChunkConverter.cs.meta deleted file mode 100644 index 8b93030..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/Stereo8SampleChunkConverter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6fc6553aaf756474491232dbaab50cb4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/StereoFloatSampleChunkConverter.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/StereoFloatSampleChunkConverter.cs deleted file mode 100644 index d4973e7..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/StereoFloatSampleChunkConverter.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - class StereoFloatSampleChunkConverter : ISampleChunkConverter - { - private int sourceSample; - private byte[] sourceBuffer; - private WaveBuffer sourceWaveBuffer; - private int sourceSamples; - - public bool Supports(WaveFormat waveFormat) - { - return waveFormat.Encoding == WaveFormatEncoding.IeeeFloat && - waveFormat.Channels == 2; - } - - public void LoadNextChunk(IWaveProvider source, int samplePairsRequired) - { - int sourceBytesRequired = samplePairsRequired * 8; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - sourceWaveBuffer = new WaveBuffer(sourceBuffer); - sourceSamples = source.Read(sourceBuffer, 0, sourceBytesRequired) / 4; - sourceSample = 0; - } - - public bool GetNextSample(out float sampleLeft, out float sampleRight) - { - if (sourceSample < sourceSamples) - { - sampleLeft = sourceWaveBuffer.FloatBuffer[sourceSample++]; - sampleRight = sourceWaveBuffer.FloatBuffer[sourceSample++]; - return true; - } - else - { - sampleLeft = 0.0f; - sampleRight = 0.0f; - return false; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/StereoFloatSampleChunkConverter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/StereoFloatSampleChunkConverter.cs.meta deleted file mode 100644 index 76fff46..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleChunkConverters/StereoFloatSampleChunkConverter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c8ab0680aa0b34b4087b74d1de14c4a5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders.meta deleted file mode 100644 index 7766fc7..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e99d36d907668354589d821d9ef85ef3 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/AdsrSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/AdsrSampleProvider.cs deleted file mode 100644 index 09c87e7..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/AdsrSampleProvider.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Linq; -using NAudio.Dsp; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// ADSR sample provider allowing you to specify attack, decay, sustain and release values - /// - public class AdsrSampleProvider : ISampleProvider - { - private readonly ISampleProvider source; - private readonly EnvelopeGenerator adsr; - private float attackSeconds; - private float releaseSeconds; - - /// - /// Creates a new AdsrSampleProvider with default values - /// - public AdsrSampleProvider(ISampleProvider source) - { - if (source.WaveFormat.Channels > 1) throw new ArgumentException("Currently only supports mono inputs"); - this.source = source; - adsr = new EnvelopeGenerator(); - AttackSeconds = 0.01f; - adsr.SustainLevel = 1.0f; - adsr.DecayRate = 0.0f * WaveFormat.SampleRate; - ReleaseSeconds = 0.3f; - adsr.Gate(true); - } - - /// - /// Attack time in seconds - /// - public float AttackSeconds - { - get - { - return attackSeconds; - } - set - { - attackSeconds = value; - adsr.AttackRate = attackSeconds * WaveFormat.SampleRate; - } - } - - /// - /// Release time in seconds - /// - public float ReleaseSeconds - { - get - { - return releaseSeconds; - } - set - { - releaseSeconds = value; - adsr.ReleaseRate = releaseSeconds * WaveFormat.SampleRate; - } - } - - /// - /// Reads audio from this sample provider - /// - public int Read(float[] buffer, int offset, int count) - { - if (adsr.State == EnvelopeGenerator.EnvelopeState.Idle) return 0; // we've finished - var samples = source.Read(buffer, offset, count); - for (int n = 0; n < samples; n++) - { - buffer[offset++] *= adsr.Process(); - } - return samples; - } - - /// - /// Enters the Release phase - /// - public void Stop() - { - adsr.Gate(false); - } - - /// - /// The output WaveFormat - /// - public WaveFormat WaveFormat { get { return source.WaveFormat; } } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/AdsrSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/AdsrSampleProvider.cs.meta deleted file mode 100644 index a63f6eb..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/AdsrSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b8238d9b8302f184bbc42343a5bcae18 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/ConcatenatingSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/ConcatenatingSampleProvider.cs deleted file mode 100644 index ef2718a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/ConcatenatingSampleProvider.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Sample Provider to concatenate multiple sample providers together - /// - public class ConcatenatingSampleProvider : ISampleProvider - { - private readonly ISampleProvider[] providers; - private int currentProviderIndex; - - /// - /// Creates a new ConcatenatingSampleProvider - /// - /// The source providers to play one after the other. Must all share the same sample rate and channel count - public ConcatenatingSampleProvider(IEnumerable providers) - { - if (providers == null) throw new ArgumentNullException(nameof(providers)); - this.providers = providers.ToArray(); - if (this.providers.Length == 0) throw new ArgumentException("Must provide at least one input", nameof(providers)); - if (this.providers.Any(p => p.WaveFormat.Channels != WaveFormat.Channels)) throw new ArgumentException("All inputs must have the same channel count", nameof(providers)); - if (this.providers.Any(p => p.WaveFormat.SampleRate != WaveFormat.SampleRate)) throw new ArgumentException("All inputs must have the same sample rate", nameof(providers)); - } - - /// - /// The WaveFormat of this Sample Provider - /// - public WaveFormat WaveFormat => providers[0].WaveFormat; - - /// - /// Read Samples from this sample provider - /// - public int Read(float[] buffer, int offset, int count) - { - var read = 0; - while (read < count && currentProviderIndex < providers.Length) - { - var needed = count - read; - var readThisTime = providers[currentProviderIndex].Read(buffer, read, needed); - read += readThisTime; - if (readThisTime == 0) currentProviderIndex++; - } - return read; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/ConcatenatingSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/ConcatenatingSampleProvider.cs.meta deleted file mode 100644 index 1bf9150..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/ConcatenatingSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5d3fca0e460be5f439d504fec52984e9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/FadeInOutSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/FadeInOutSampleProvider.cs deleted file mode 100644 index e589b6c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/FadeInOutSampleProvider.cs +++ /dev/null @@ -1,146 +0,0 @@ -namespace NAudio.Wave.SampleProviders -{ - /// - /// Sample Provider to allow fading in and out - /// - public class FadeInOutSampleProvider : ISampleProvider - { - enum FadeState - { - Silence, - FadingIn, - FullVolume, - FadingOut, - } - - private readonly object lockObject = new object(); - private readonly ISampleProvider source; - private int fadeSamplePosition; - private int fadeSampleCount; - private FadeState fadeState; - - /// - /// Creates a new FadeInOutSampleProvider - /// - /// The source stream with the audio to be faded in or out - /// If true, we start faded out - public FadeInOutSampleProvider(ISampleProvider source, bool initiallySilent = false) - { - this.source = source; - fadeState = initiallySilent ? FadeState.Silence : FadeState.FullVolume; - } - - /// - /// Requests that a fade-in begins (will start on the next call to Read) - /// - /// Duration of fade in milliseconds - public void BeginFadeIn(double fadeDurationInMilliseconds) - { - lock (lockObject) - { - fadeSamplePosition = 0; - fadeSampleCount = (int)((fadeDurationInMilliseconds * source.WaveFormat.SampleRate) / 1000); - fadeState = FadeState.FadingIn; - } - } - - /// - /// Requests that a fade-out begins (will start on the next call to Read) - /// - /// Duration of fade in milliseconds - public void BeginFadeOut(double fadeDurationInMilliseconds) - { - lock (lockObject) - { - fadeSamplePosition = 0; - fadeSampleCount = (int)((fadeDurationInMilliseconds * source.WaveFormat.SampleRate) / 1000); - fadeState = FadeState.FadingOut; - } - } - - /// - /// Reads samples from this sample provider - /// - /// Buffer to read into - /// Offset within buffer to write to - /// Number of samples desired - /// Number of samples read - public int Read(float[] buffer, int offset, int count) - { - int sourceSamplesRead = source.Read(buffer, offset, count); - lock (lockObject) - { - if (fadeState == FadeState.FadingIn) - { - FadeIn(buffer, offset, sourceSamplesRead); - } - else if (fadeState == FadeState.FadingOut) - { - FadeOut(buffer, offset, sourceSamplesRead); - } - else if (fadeState == FadeState.Silence) - { - ClearBuffer(buffer, offset, count); - } - } - return sourceSamplesRead; - } - - private static void ClearBuffer(float[] buffer, int offset, int count) - { - for (int n = 0; n < count; n++) - { - buffer[n + offset] = 0; - } - } - - private void FadeOut(float[] buffer, int offset, int sourceSamplesRead) - { - int sample = 0; - while (sample < sourceSamplesRead) - { - float multiplier = 1.0f - (fadeSamplePosition / (float)fadeSampleCount); - for (int ch = 0; ch < source.WaveFormat.Channels; ch++) - { - buffer[offset + sample++] *= multiplier; - } - fadeSamplePosition++; - if (fadeSamplePosition > fadeSampleCount) - { - fadeState = FadeState.Silence; - // clear out the end - ClearBuffer(buffer, sample + offset, sourceSamplesRead - sample); - break; - } - } - } - - private void FadeIn(float[] buffer, int offset, int sourceSamplesRead) - { - int sample = 0; - while (sample < sourceSamplesRead) - { - float multiplier = (fadeSamplePosition / (float)fadeSampleCount); - for (int ch = 0; ch < source.WaveFormat.Channels; ch++) - { - buffer[offset + sample++] *= multiplier; - } - fadeSamplePosition++; - if (fadeSamplePosition > fadeSampleCount) - { - fadeState = FadeState.FullVolume; - // no need to multiply any more - break; - } - } - } - - /// - /// WaveFormat of this SampleProvider - /// - public WaveFormat WaveFormat - { - get { return source.WaveFormat; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/FadeInOutSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/FadeInOutSampleProvider.cs.meta deleted file mode 100644 index 50214d7..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/FadeInOutSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c31478154d4ad8f4cb7a179b9e04ec54 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MeteringSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MeteringSampleProvider.cs deleted file mode 100644 index c959149..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MeteringSampleProvider.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Simple SampleProvider that passes through audio unchanged and raises - /// an event every n samples with the maximum sample value from the period - /// for metering purposes - /// - public class MeteringSampleProvider : ISampleProvider - { - private readonly ISampleProvider source; - - private readonly float[] maxSamples; - private int sampleCount; - private readonly int channels; - private readonly StreamVolumeEventArgs args; - - /// - /// Number of Samples per notification - /// - public int SamplesPerNotification { get; set; } - - /// - /// Raised periodically to inform the user of the max volume - /// - public event EventHandler StreamVolume; - - /// - /// Initialises a new instance of MeteringSampleProvider that raises 10 stream volume - /// events per second - /// - /// Source sample provider - public MeteringSampleProvider(ISampleProvider source) : - this(source, source.WaveFormat.SampleRate / 10) - { - } - - /// - /// Initialises a new instance of MeteringSampleProvider - /// - /// source sampler provider - /// Number of samples between notifications - public MeteringSampleProvider(ISampleProvider source, int samplesPerNotification) - { - this.source = source; - channels = source.WaveFormat.Channels; - maxSamples = new float[channels]; - SamplesPerNotification = samplesPerNotification; - args = new StreamVolumeEventArgs() { MaxSampleValues = maxSamples }; // create objects up front giving GC little to do - } - - /// - /// The WaveFormat of this sample provider - /// - public WaveFormat WaveFormat => source.WaveFormat; - - /// - /// Reads samples from this Sample Provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Number of samples required - /// Number of samples read - public int Read(float[] buffer, int offset, int count) - { - int samplesRead = source.Read(buffer, offset, count); - // only bother if there is an event listener - if (StreamVolume != null) - { - for (int index = 0; index < samplesRead; index += channels) - { - for (int channel = 0; channel < channels; channel++) - { - float sampleValue = Math.Abs(buffer[offset + index + channel]); - maxSamples[channel] = Math.Max(maxSamples[channel], sampleValue); - } - sampleCount++; - if (sampleCount >= SamplesPerNotification) - { - StreamVolume(this, args); - sampleCount = 0; - // n.b. we avoid creating new instances of anything here - Array.Clear(maxSamples, 0, channels); - } - } - } - return samplesRead; - } - } - - /// - /// Event args for aggregated stream volume - /// - public class StreamVolumeEventArgs : EventArgs - { - /// - /// Max sample values array (one for each channel) - /// - public float[] MaxSampleValues { get; set; } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MeteringSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MeteringSampleProvider.cs.meta deleted file mode 100644 index e1481e1..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MeteringSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6f790e0b87003c9428873cdca3570eb2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MixingSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MixingSampleProvider.cs deleted file mode 100644 index e1da2dd..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MixingSampleProvider.cs +++ /dev/null @@ -1,206 +0,0 @@ -using System; -using System.Collections.Generic; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// A sample provider mixer, allowing inputs to be added and removed - /// - public class MixingSampleProvider : ISampleProvider - { - private readonly List sources; - private float[] sourceBuffer; - private const int MaxInputs = 1024; // protect ourselves against doing something silly - - /// - /// Creates a new MixingSampleProvider, with no inputs, but a specified WaveFormat - /// - /// The WaveFormat of this mixer. All inputs must be in this format - public MixingSampleProvider(WaveFormat waveFormat) - { - if (waveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - { - throw new ArgumentException("Mixer wave format must be IEEE float"); - } - sources = new List(); - WaveFormat = waveFormat; - } - - /// - /// Creates a new MixingSampleProvider, based on the given inputs - /// - /// Mixer inputs - must all have the same waveformat, and must - /// all be of the same WaveFormat. There must be at least one input - public MixingSampleProvider(IEnumerable sources) - { - this.sources = new List(); - foreach (var source in sources) - { - AddMixerInput(source); - } - if (this.sources.Count == 0) - { - throw new ArgumentException("Must provide at least one input in this constructor"); - } - } - - /// - /// Returns the mixer inputs (read-only - use AddMixerInput to add an input - /// - public IEnumerable MixerInputs => sources; - - /// - /// When set to true, the Read method always returns the number - /// of samples requested, even if there are no inputs, or if the - /// current inputs reach their end. Setting this to true effectively - /// makes this a never-ending sample provider, so take care if you plan - /// to write it out to a file. - /// - public bool ReadFully { get; set; } - - /// - /// Adds a WaveProvider as a Mixer input. - /// Must be PCM or IEEE float already - /// - /// IWaveProvider mixer input - public void AddMixerInput(IWaveProvider mixerInput) - { - AddMixerInput(SampleProviderConverters.ConvertWaveProviderIntoSampleProvider(mixerInput)); - } - - /// - /// Adds a new mixer input - /// - /// Mixer input - public void AddMixerInput(ISampleProvider mixerInput) - { - // we'll just call the lock around add since we are protecting against an AddMixerInput at - // the same time as a Read, rather than two AddMixerInput calls at the same time - lock (sources) - { - if (sources.Count >= MaxInputs) - { - throw new InvalidOperationException("Too many mixer inputs"); - } - sources.Add(mixerInput); - } - if (WaveFormat == null) - { - WaveFormat = mixerInput.WaveFormat; - } - else - { - if (WaveFormat.SampleRate != mixerInput.WaveFormat.SampleRate || - WaveFormat.Channels != mixerInput.WaveFormat.Channels) - { - throw new ArgumentException("All mixer inputs must have the same WaveFormat"); - } - } - } - - /// - /// Raised when a mixer input has been removed because it has ended - /// - public event EventHandler MixerInputEnded; - - /// - /// Removes a mixer input - /// - /// Mixer input to remove - public void RemoveMixerInput(ISampleProvider mixerInput) - { - lock (sources) - { - sources.Remove(mixerInput); - } - } - - /// - /// Removes all mixer inputs - /// - public void RemoveAllMixerInputs() - { - lock (sources) - { - sources.Clear(); - } - } - - /// - /// The output WaveFormat of this sample provider - /// - public WaveFormat WaveFormat { get; private set; } - - /// - /// Reads samples from this sample provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Number of samples required - /// Number of samples read - public int Read(float[] buffer, int offset, int count) - { - int outputSamples = 0; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, count); - lock (sources) - { - int index = sources.Count - 1; - while (index >= 0) - { - var source = sources[index]; - int samplesRead = source.Read(sourceBuffer, 0, count); - int outIndex = offset; - for (int n = 0; n < samplesRead; n++) - { - if (n >= outputSamples) - { - buffer[outIndex++] = sourceBuffer[n]; - } - else - { - buffer[outIndex++] += sourceBuffer[n]; - } - } - outputSamples = Math.Max(samplesRead, outputSamples); - if (samplesRead < count) - { - MixerInputEnded?.Invoke(this, new SampleProviderEventArgs(source)); - sources.RemoveAt(index); - } - index--; - } - } - // optionally ensure we return a full buffer - if (ReadFully && outputSamples < count) - { - int outputIndex = offset + outputSamples; - while (outputIndex < offset + count) - { - buffer[outputIndex++] = 0; - } - outputSamples = count; - } - return outputSamples; - } - } - - /// - /// SampleProvider event args - /// - public class SampleProviderEventArgs : EventArgs - { - /// - /// Constructs a new SampleProviderEventArgs - /// - public SampleProviderEventArgs(ISampleProvider sampleProvider) - { - SampleProvider = sampleProvider; - } - - /// - /// The Sample Provider - /// - public ISampleProvider SampleProvider { get; private set; } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MixingSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MixingSampleProvider.cs.meta deleted file mode 100644 index b0a08b6..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MixingSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4742d284bd88c654089f6916160e0f00 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MonoToStereoSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MonoToStereoSampleProvider.cs deleted file mode 100644 index 01ff738..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MonoToStereoSampleProvider.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// No nonsense mono to stereo provider, no volume adjustment, - /// just copies input to left and right. - /// - public class MonoToStereoSampleProvider : ISampleProvider - { - private readonly ISampleProvider source; - private float[] sourceBuffer; - - /// - /// Initializes a new instance of MonoToStereoSampleProvider - /// - /// Source sample provider - public MonoToStereoSampleProvider(ISampleProvider source) - { - LeftVolume = 1.0f; - RightVolume = 1.0f; - if (source.WaveFormat.Channels != 1) - { - throw new ArgumentException("Source must be mono"); - } - this.source = source; - WaveFormat = WaveFormat.CreateIeeeFloatWaveFormat(source.WaveFormat.SampleRate, 2); - } - - /// - /// WaveFormat of this provider - /// - public WaveFormat WaveFormat { get; } - - /// - /// Reads samples from this provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Number of samples required - /// Number of samples read - public int Read(float[] buffer, int offset, int count) - { - var sourceSamplesRequired = count / 2; - var outIndex = offset; - EnsureSourceBuffer(sourceSamplesRequired); - var sourceSamplesRead = source.Read(sourceBuffer, 0, sourceSamplesRequired); - for (var n = 0; n < sourceSamplesRead; n++) - { - buffer[outIndex++] = sourceBuffer[n] * LeftVolume; - buffer[outIndex++] = sourceBuffer[n] * RightVolume; - } - return sourceSamplesRead * 2; - } - - /// - /// Multiplier for left channel (default is 1.0) - /// - public float LeftVolume { get; set; } - - /// - /// Multiplier for right channel (default is 1.0) - /// - public float RightVolume { get; set; } - - private void EnsureSourceBuffer(int count) - { - if (sourceBuffer == null || sourceBuffer.Length < count) - { - sourceBuffer = new float[count]; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MonoToStereoSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MonoToStereoSampleProvider.cs.meta deleted file mode 100644 index a3f4c3d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MonoToStereoSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e75936911a79fb24e9f80b64b0cafc43 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MultiplexingSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MultiplexingSampleProvider.cs deleted file mode 100644 index 38eaa62..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MultiplexingSampleProvider.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Collections.Generic; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Allows any number of inputs to be patched to outputs - /// Uses could include swapping left and right channels, turning mono into stereo, - /// feeding different input sources to different soundcard outputs etc - /// - public class MultiplexingSampleProvider : ISampleProvider - { - private readonly IList inputs; - private readonly WaveFormat waveFormat; - private readonly int outputChannelCount; - private readonly int inputChannelCount; - private readonly List mappings; - - /// - /// Creates a multiplexing sample provider, allowing re-patching of input channels to different - /// output channels - /// - /// Input sample providers. Must all be of the same sample rate, but can have any number of channels - /// Desired number of output channels. - public MultiplexingSampleProvider(IEnumerable inputs, int numberOfOutputChannels) - { - this.inputs = new List(inputs); - outputChannelCount = numberOfOutputChannels; - - if (this.inputs.Count == 0) - { - throw new ArgumentException("You must provide at least one input"); - } - if (numberOfOutputChannels < 1) - { - throw new ArgumentException("You must provide at least one output"); - } - foreach (var input in this.inputs) - { - if (waveFormat == null) - { - if (input.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - { - throw new ArgumentException("Only 32 bit float is supported"); - } - waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(input.WaveFormat.SampleRate, numberOfOutputChannels); - } - else - { - if (input.WaveFormat.BitsPerSample != waveFormat.BitsPerSample) - { - throw new ArgumentException("All inputs must have the same bit depth"); - } - if (input.WaveFormat.SampleRate != waveFormat.SampleRate) - { - throw new ArgumentException("All inputs must have the same sample rate"); - } - } - inputChannelCount += input.WaveFormat.Channels; - } - - mappings = new List(); - for (int n = 0; n < outputChannelCount; n++) - { - mappings.Add(n % inputChannelCount); - } - } - - /// - /// persistent temporary buffer to prevent creating work for garbage collector - /// - private float[] inputBuffer; - - /// - /// Reads samples from this sample provider - /// - /// Buffer to be filled with sample data - /// Offset into buffer to start writing to, usually 0 - /// Number of samples required - /// Number of samples read - public int Read(float[] buffer, int offset, int count) - { - int sampleFramesRequested = count / outputChannelCount; - int inputOffset = 0; - int sampleFramesRead = 0; - // now we must read from all inputs, even if we don't need their data, so they stay in sync - foreach (var input in inputs) - { - int samplesRequired = sampleFramesRequested * input.WaveFormat.Channels; - inputBuffer = BufferHelpers.Ensure(inputBuffer, samplesRequired); - int samplesRead = input.Read(inputBuffer, 0, samplesRequired); - sampleFramesRead = Math.Max(sampleFramesRead, samplesRead / input.WaveFormat.Channels); - - for (int n = 0; n < input.WaveFormat.Channels; n++) - { - int inputIndex = inputOffset + n; - for (int outputIndex = 0; outputIndex < outputChannelCount; outputIndex++) - { - if (mappings[outputIndex] == inputIndex) - { - int inputBufferOffset = n; - int outputBufferOffset = offset + outputIndex; - int sample = 0; - while (sample < sampleFramesRequested && inputBufferOffset < samplesRead) - { - buffer[outputBufferOffset] = inputBuffer[inputBufferOffset]; - outputBufferOffset += outputChannelCount; - inputBufferOffset += input.WaveFormat.Channels; - sample++; - } - // clear the end - while (sample < sampleFramesRequested) - { - buffer[outputBufferOffset] = 0; - outputBufferOffset += outputChannelCount; - sample++; - } - } - } - } - inputOffset += input.WaveFormat.Channels; - } - - return sampleFramesRead * outputChannelCount; - } - - /// - /// The output WaveFormat for this SampleProvider - /// - public WaveFormat WaveFormat => waveFormat; - - /// - /// Connects a specified input channel to an output channel - /// - /// Input Channel index (zero based). Must be less than InputChannelCount - /// Output Channel index (zero based). Must be less than OutputChannelCount - public void ConnectInputToOutput(int inputChannel, int outputChannel) - { - if (inputChannel < 0 || inputChannel >= InputChannelCount) - { - throw new ArgumentException("Invalid input channel"); - } - if (outputChannel < 0 || outputChannel >= OutputChannelCount) - { - throw new ArgumentException("Invalid output channel"); - } - mappings[outputChannel] = inputChannel; - } - - /// - /// The number of input channels. Note that this is not the same as the number of input wave providers. If you pass in - /// one stereo and one mono input provider, the number of input channels is three. - /// - public int InputChannelCount => inputChannelCount; - - /// - /// The number of output channels, as specified in the constructor. - /// - public int OutputChannelCount => outputChannelCount; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MultiplexingSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MultiplexingSampleProvider.cs.meta deleted file mode 100644 index e57b910..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/MultiplexingSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2ec787349483f9f479206c7db8c45a63 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/NotifyingSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/NotifyingSampleProvider.cs deleted file mode 100644 index 78b8ebd..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/NotifyingSampleProvider.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Simple class that raises an event on every sample - /// - public class NotifyingSampleProvider : ISampleProvider, ISampleNotifier - { - private readonly ISampleProvider source; - // try not to give the garbage collector anything to deal with when playing live audio - private readonly SampleEventArgs sampleArgs = new SampleEventArgs(0, 0); - private readonly int channels; - - /// - /// Initializes a new instance of NotifyingSampleProvider - /// - /// Source Sample Provider - public NotifyingSampleProvider(ISampleProvider source) - { - this.source = source; - channels = WaveFormat.Channels; - } - - /// - /// WaveFormat - /// - public WaveFormat WaveFormat => source.WaveFormat; - - /// - /// Reads samples from this sample provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Number of samples desired - /// Number of samples read - public int Read(float[] buffer, int offset, int sampleCount) - { - int samplesRead = source.Read(buffer, offset, sampleCount); - if (Sample != null) - { - for (int n = 0; n < samplesRead; n += channels) - { - sampleArgs.Left = buffer[offset + n]; - sampleArgs.Right = channels > 1 ? buffer[offset + n + 1] : sampleArgs.Left; - Sample(this, sampleArgs); - } - } - return samplesRead; - } - - /// - /// Sample notifier - /// - public event EventHandler Sample; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/NotifyingSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/NotifyingSampleProvider.cs.meta deleted file mode 100644 index 8adfe0c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/NotifyingSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1fc7b353214e77f4a93f1064f04c74f2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/OffsetSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/OffsetSampleProvider.cs deleted file mode 100644 index e0f909c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/OffsetSampleProvider.cs +++ /dev/null @@ -1,255 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Allows you to: - /// 1. insert a pre-delay of silence before the source begins - /// 2. skip over a certain amount of the beginning of the source - /// 3. only play a set amount from the source - /// 4. insert silence at the end after the source is complete - /// - public class OffsetSampleProvider : ISampleProvider - { - private readonly ISampleProvider sourceProvider; - private int phase; // 0 = not started yet, 1 = delay, 2 = skip, 3 = take, 4 = lead_out, 5 = end - private int phasePos; - private int delayBySamples; - private int skipOverSamples; - private int takeSamples; - private int leadOutSamples; - - private int TimeSpanToSamples(TimeSpan time) - { - var samples = (int)(time.TotalSeconds * WaveFormat.SampleRate) * WaveFormat.Channels; - return samples; - } - - private TimeSpan SamplesToTimeSpan(int samples) - { - return TimeSpan.FromSeconds((samples / WaveFormat.Channels) / (double)WaveFormat.SampleRate); - } - - /// - /// Number of samples of silence to insert before playing source - /// - public int DelayBySamples - { - get { return delayBySamples; } - set - { - if (phase != 0) - { - throw new InvalidOperationException("Can't set DelayBySamples after calling Read"); - } - if (value % WaveFormat.Channels != 0) - { - throw new ArgumentException("DelayBySamples must be a multiple of WaveFormat.Channels"); - } - delayBySamples = value; - } - } - - /// - /// Amount of silence to insert before playing - /// - public TimeSpan DelayBy - { - get { return SamplesToTimeSpan(delayBySamples); } - set { delayBySamples = TimeSpanToSamples(value); } - } - - /// - /// Number of samples in source to discard - /// - public int SkipOverSamples - { - get { return skipOverSamples; } - set - { - if (phase != 0) - { - throw new InvalidOperationException("Can't set SkipOverSamples after calling Read"); - } - if (value % WaveFormat.Channels != 0) - { - throw new ArgumentException("SkipOverSamples must be a multiple of WaveFormat.Channels"); - } - skipOverSamples = value; - } - } - - /// - /// Amount of audio to skip over from the source before beginning playback - /// - public TimeSpan SkipOver - { - get { return SamplesToTimeSpan(skipOverSamples); } - set { skipOverSamples = TimeSpanToSamples(value); } - } - - - /// - /// Number of samples to read from source (if 0, then read it all) - /// - public int TakeSamples - { - get { return takeSamples; } - set - { - if (phase != 0) - { - throw new InvalidOperationException("Can't set TakeSamples after calling Read"); - } - if (value % WaveFormat.Channels != 0) - { - throw new ArgumentException("TakeSamples must be a multiple of WaveFormat.Channels"); - } - takeSamples = value; - } - } - - /// - /// Amount of audio to take from the source (TimeSpan.Zero means play to end) - /// - public TimeSpan Take - { - get { return SamplesToTimeSpan(takeSamples); } - set { takeSamples = TimeSpanToSamples(value); } - } - - /// - /// Number of samples of silence to insert after playing source - /// - public int LeadOutSamples - { - get { return leadOutSamples; } - set - { - if (phase != 0) - { - throw new InvalidOperationException("Can't set LeadOutSamples after calling Read"); - } - if (value % WaveFormat.Channels != 0) - { - throw new ArgumentException("LeadOutSamples must be a multiple of WaveFormat.Channels"); - } - leadOutSamples = value; - } - } - - /// - /// Amount of silence to insert after playing source - /// - public TimeSpan LeadOut - { - get { return SamplesToTimeSpan(leadOutSamples); } - set { leadOutSamples = TimeSpanToSamples(value); } - } - - /// - /// Creates a new instance of offsetSampleProvider - /// - /// The Source Sample Provider to read from - public OffsetSampleProvider(ISampleProvider sourceProvider) - { - this.sourceProvider = sourceProvider; - } - - /// - /// The WaveFormat of this SampleProvider - /// - public WaveFormat WaveFormat - { - get { return sourceProvider.WaveFormat; } - } - - /// - /// Reads from this sample provider - /// - /// Sample buffer - /// Offset within sample buffer to read to - /// Number of samples required - /// Number of samples read - public int Read(float[] buffer, int offset, int count) - { - int samplesRead = 0; - - if (phase == 0) // not started yet - { - phase++; - } - - if (phase == 1) // delay - { - int delaySamples = Math.Min(count, DelayBySamples - phasePos); - for (int n = 0; n < delaySamples; n++) - { - buffer[offset + n] = 0; - } - phasePos += delaySamples; - samplesRead += delaySamples; - if (phasePos >= DelayBySamples) - { - phase++; - phasePos = 0; - } - } - - if (phase == 2) // skip - { - if (SkipOverSamples > 0) - { - var skipBuffer = new float[WaveFormat.SampleRate * WaveFormat.Channels]; - // skip everything - int samplesSkipped = 0; - while (samplesSkipped < SkipOverSamples) - { - int samplesRequired = Math.Min(SkipOverSamples - samplesSkipped, skipBuffer.Length); - var read = sourceProvider.Read(skipBuffer, 0, samplesRequired); - if (read == 0) // source has ended while still in skip - { - break; - } - samplesSkipped += read; - } - } - phase++; - phasePos = 0; - } - - if (phase == 3) // take - { - int samplesRequired = count - samplesRead; - if (takeSamples != 0) - samplesRequired = Math.Min(samplesRequired, takeSamples - phasePos); - int read = sourceProvider.Read(buffer, offset + samplesRead, samplesRequired); - phasePos += read; - samplesRead += read; - if (read < samplesRequired || (takeSamples > 0 && phasePos >= takeSamples)) - { - phase++; - phasePos = 0; - } - } - - if (phase == 4) // lead out - { - int samplesRequired = Math.Min(count - samplesRead, LeadOutSamples - phasePos); - for (int n = 0; n < samplesRequired; n++) - { - buffer[offset + samplesRead + n] = 0; - } - phasePos += samplesRequired; - samplesRead += samplesRequired; - if (phasePos >= LeadOutSamples) - { - phase++; - phasePos = 0; - } - } - - return samplesRead; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/OffsetSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/OffsetSampleProvider.cs.meta deleted file mode 100644 index 573738a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/OffsetSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9b801952fc003d54da894cb94b312e3b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/PanningSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/PanningSampleProvider.cs deleted file mode 100644 index a0c8350..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/PanningSampleProvider.cs +++ /dev/null @@ -1,217 +0,0 @@ -using System; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Converts a mono sample provider to stereo, with a customisable pan strategy - /// - public class PanningSampleProvider : ISampleProvider - { - private readonly ISampleProvider source; - private float pan; - private float leftMultiplier; - private float rightMultiplier; - private readonly WaveFormat waveFormat; - private float[] sourceBuffer; - private IPanStrategy panStrategy; - - /// - /// Initialises a new instance of the PanningSampleProvider - /// - /// Source sample provider, must be mono - public PanningSampleProvider(ISampleProvider source) - { - if (source.WaveFormat.Channels != 1) - { - throw new ArgumentException("Source sample provider must be mono"); - } - this.source = source; - waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(source.WaveFormat.SampleRate, 2); - panStrategy = new SinPanStrategy(); - } - - /// - /// Pan value, must be between -1 (left) and 1 (right) - /// - public float Pan - { - get - { - return pan; - } - set - { - if (value < -1.0f || value > 1.0f) - { - throw new ArgumentOutOfRangeException(nameof(value), "Pan must be in the range -1 to 1"); - } - pan = value; - UpdateMultipliers(); - } - } - - /// - /// The pan strategy currently in use - /// - public IPanStrategy PanStrategy - { - get - { - return panStrategy; - } - set - { - panStrategy = value; - UpdateMultipliers(); - } - } - - private void UpdateMultipliers() - { - var multipliers = panStrategy.GetMultipliers(Pan); - leftMultiplier = multipliers.Left; - rightMultiplier = multipliers.Right; - } - - /// - /// The WaveFormat of this sample provider - /// - public WaveFormat WaveFormat => waveFormat; - - /// - /// Reads samples from this sample provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Number of samples desired - /// Number of samples read - public int Read(float[] buffer, int offset, int count) - { - int sourceSamplesRequired = count / 2; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceSamplesRequired); - int sourceSamplesRead = source.Read(sourceBuffer, 0, sourceSamplesRequired); - int outIndex = offset; - for (int n = 0; n < sourceSamplesRead; n++) - { - buffer[outIndex++] = leftMultiplier * sourceBuffer[n]; - buffer[outIndex++] = rightMultiplier * sourceBuffer[n]; - } - return sourceSamplesRead * 2; - } - } - - /// - /// Pair of floating point values, representing samples or multipliers - /// - public struct StereoSamplePair - { - /// - /// Left value - /// - public float Left { get; set; } - /// - /// Right value - /// - public float Right { get; set; } - } - - /// - /// Required Interface for a Panning Strategy - /// - public interface IPanStrategy - { - /// - /// Gets the left and right multipliers for a given pan value - /// - /// Pan value from -1 to 1 - /// Left and right multipliers in a stereo sample pair - StereoSamplePair GetMultipliers(float pan); - } - - /// - /// Simplistic "balance" control - treating the mono input as if it was stereo - /// In the centre, both channels full volume. Opposite channel decays linearly - /// as balance is turned to to one side - /// - public class StereoBalanceStrategy : IPanStrategy - { - /// - /// Gets the left and right channel multipliers for this pan value - /// - /// Pan value, between -1 and 1 - /// Left and right multipliers - public StereoSamplePair GetMultipliers(float pan) - { - float leftChannel = (pan <= 0) ? 1.0f : ((1 - pan) / 2.0f); - float rightChannel = (pan >= 0) ? 1.0f : ((pan + 1) / 2.0f); - // Console.WriteLine(pan + ": " + leftChannel + "," + rightChannel); - return new StereoSamplePair() { Left = leftChannel, Right = rightChannel }; - } - } - - - /// - /// Square Root Pan, thanks to Yuval Naveh - /// - public class SquareRootPanStrategy : IPanStrategy - { - /// - /// Gets the left and right channel multipliers for this pan value - /// - /// Pan value, between -1 and 1 - /// Left and right multipliers - public StereoSamplePair GetMultipliers(float pan) - { - // -1..+1 -> 1..0 - float normPan = (-pan + 1) / 2; - float leftChannel = (float)Math.Sqrt(normPan); - float rightChannel = (float)Math.Sqrt(1 - normPan); - // Console.WriteLine(pan + ": " + leftChannel + "," + rightChannel); - return new StereoSamplePair() { Left = leftChannel, Right = rightChannel }; - } - } - - /// - /// Sinus Pan, thanks to Yuval Naveh - /// - public class SinPanStrategy : IPanStrategy - { - private const float HalfPi = (float)Math.PI / 2; - - /// - /// Gets the left and right channel multipliers for this pan value - /// - /// Pan value, between -1 and 1 - /// Left and right multipliers - public StereoSamplePair GetMultipliers(float pan) - { - // -1..+1 -> 1..0 - float normPan = (-pan + 1) / 2; - float leftChannel = (float)Math.Sin(normPan * HalfPi); - float rightChannel = (float)Math.Cos(normPan * HalfPi); - // Console.WriteLine(pan + ": " + leftChannel + "," + rightChannel); - return new StereoSamplePair() { Left = leftChannel, Right = rightChannel }; - } - } - - /// - /// Linear Pan - /// - public class LinearPanStrategy : IPanStrategy - { - /// - /// Gets the left and right channel multipliers for this pan value - /// - /// Pan value, between -1 and 1 - /// Left and right multipliers - public StereoSamplePair GetMultipliers(float pan) - { - // -1..+1 -> 1..0 - float normPan = (-pan + 1) / 2; - float leftChannel = normPan; - float rightChannel = 1 - normPan; - return new StereoSamplePair() { Left = leftChannel, Right = rightChannel }; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/PanningSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/PanningSampleProvider.cs.meta deleted file mode 100644 index 6afe3db..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/PanningSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f2c4c9965369ea84ba160b4f3b389bf3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm16BitToSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm16BitToSampleProvider.cs deleted file mode 100644 index ef2b5ca..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm16BitToSampleProvider.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Converts an IWaveProvider containing 16 bit PCM to an - /// ISampleProvider - /// - public class Pcm16BitToSampleProvider : SampleProviderConverterBase - { - /// - /// Initialises a new instance of Pcm16BitToSampleProvider - /// - /// Source wave provider - public Pcm16BitToSampleProvider(IWaveProvider source) - : base(source) - { - } - - /// - /// Reads samples from this sample provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Samples required - /// Number of samples read - public override int Read(float[] buffer, int offset, int count) - { - int sourceBytesRequired = count * 2; - EnsureSourceBuffer(sourceBytesRequired); - int bytesRead = source.Read(sourceBuffer, 0, sourceBytesRequired); - int outIndex = offset; - for(int n = 0; n < bytesRead; n+=2) - { - buffer[outIndex++] = BitConverter.ToInt16(sourceBuffer, n) / 32768f; - } - return bytesRead / 2; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm16BitToSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm16BitToSampleProvider.cs.meta deleted file mode 100644 index 87ac6be..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm16BitToSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eb7cee9f826e9794982958c904177aa6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm24BitToSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm24BitToSampleProvider.cs deleted file mode 100644 index 39f976f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm24BitToSampleProvider.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Converts an IWaveProvider containing 24 bit PCM to an - /// ISampleProvider - /// - public class Pcm24BitToSampleProvider : SampleProviderConverterBase - { - /// - /// Initialises a new instance of Pcm24BitToSampleProvider - /// - /// Source Wave Provider - public Pcm24BitToSampleProvider(IWaveProvider source) - : base(source) - { - - } - - /// - /// Reads floating point samples from this sample provider - /// - /// sample buffer - /// offset within sample buffer to write to - /// number of samples required - /// number of samples provided - public override int Read(float[] buffer, int offset, int count) - { - int sourceBytesRequired = count * 3; - EnsureSourceBuffer(sourceBytesRequired); - int bytesRead = source.Read(sourceBuffer, 0, sourceBytesRequired); - int outIndex = offset; - for (int n = 0; n < bytesRead; n += 3) - { - buffer[outIndex++] = (((sbyte)sourceBuffer[n + 2] << 16) | (sourceBuffer[n + 1] << 8) | sourceBuffer[n]) / 8388608f; - } - return bytesRead / 3; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm24BitToSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm24BitToSampleProvider.cs.meta deleted file mode 100644 index ff899ff..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm24BitToSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cc0c96bd1460fc6498a9073f6501e61e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm32BitToSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm32BitToSampleProvider.cs deleted file mode 100644 index e443ce8..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm32BitToSampleProvider.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace NAudio.Wave.SampleProviders -{ - /// - /// Converts an IWaveProvider containing 32 bit PCM to an - /// ISampleProvider - /// - public class Pcm32BitToSampleProvider : SampleProviderConverterBase - { - /// - /// Initialises a new instance of Pcm32BitToSampleProvider - /// - /// Source Wave Provider - public Pcm32BitToSampleProvider(IWaveProvider source) - : base(source) - { - - } - - /// - /// Reads floating point samples from this sample provider - /// - /// sample buffer - /// offset within sample buffer to write to - /// number of samples required - /// number of samples provided - public override int Read(float[] buffer, int offset, int count) - { - int sourceBytesRequired = count*4; - EnsureSourceBuffer(sourceBytesRequired); - int bytesRead = source.Read(sourceBuffer, 0, sourceBytesRequired); - int outIndex = offset; - for (int n = 0; n < bytesRead; n += 4) - { - buffer[outIndex++] = (((sbyte) sourceBuffer[n + 3] << 24 | - sourceBuffer[n + 2] << 16) | - (sourceBuffer[n + 1] << 8) | - sourceBuffer[n])/2147483648f; - } - return bytesRead/4; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm32BitToSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm32BitToSampleProvider.cs.meta deleted file mode 100644 index 8f069d4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm32BitToSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c93c9448c961dde45aabb369c46af6b8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm8BitToSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm8BitToSampleProvider.cs deleted file mode 100644 index d0078fd..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm8BitToSampleProvider.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Converts an IWaveProvider containing 8 bit PCM to an - /// ISampleProvider - /// - public class Pcm8BitToSampleProvider : SampleProviderConverterBase - { - /// - /// Initialises a new instance of Pcm8BitToSampleProvider - /// - /// Source wave provider - public Pcm8BitToSampleProvider(IWaveProvider source) : - base(source) - { - } - - /// - /// Reads samples from this sample provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Number of samples to read - /// Number of samples read - public override int Read(float[] buffer, int offset, int count) - { - int sourceBytesRequired = count; - EnsureSourceBuffer(sourceBytesRequired); - int bytesRead = source.Read(sourceBuffer, 0, sourceBytesRequired); - int outIndex = offset; - for (int n = 0; n < bytesRead; n++) - { - buffer[outIndex++] = sourceBuffer[n] / 128f - 1.0f; - } - return bytesRead; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm8BitToSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm8BitToSampleProvider.cs.meta deleted file mode 100644 index 6c49df6..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/Pcm8BitToSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f4126d63a935c8a4490de9272e54310b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SMBPitchShiftingSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SMBPitchShiftingSampleProvider.cs deleted file mode 100644 index 145f483..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SMBPitchShiftingSampleProvider.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using NAudio.Dsp; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Author: Freefall - /// Date: 05.08.16 - /// Based on: the port of Stephan M. Bernsee´s pitch shifting class - /// Port site: https://sites.google.com/site/mikescoderama/pitch-shifting - /// Test application and github site: https://github.com/Freefall63/NAudio-Pitchshifter - /// - /// NOTE: I strongly advice to add a Limiter for post-processing. - /// For my needs the FastAttackCompressor1175 provides acceptable results: - /// https://github.com/Jiyuu/SkypeFX/blob/master/JSNet/FastAttackCompressor1175.cs - /// - /// UPDATE: Added a simple Limiter based on the pydirac implementation. - /// https://github.com/echonest/remix/blob/master/external/pydirac225/source/Dirac_LE.cpp - /// - /// - public class SmbPitchShiftingSampleProvider : ISampleProvider - { - //Shifter objects - private readonly ISampleProvider sourceStream; - private readonly WaveFormat waveFormat; - private float pitch = 1f; - private readonly int fftSize; - private readonly long osamp; - private readonly SmbPitchShifter shifterLeft = new SmbPitchShifter(); - private readonly SmbPitchShifter shifterRight = new SmbPitchShifter(); - - //Limiter constants - const float LIM_THRESH = 0.95f; - const float LIM_RANGE = (1f - LIM_THRESH); - const float M_PI_2 = (float) (Math.PI/2); - - /// - /// Creates a new SMB Pitch Shifting Sample Provider with default settings - /// - /// Source provider - public SmbPitchShiftingSampleProvider(ISampleProvider sourceProvider) - : this(sourceProvider, 4096, 4L, 1f) - { - } - - /// - /// Creates a new SMB Pitch Shifting Sample Provider with custom settings - /// - /// Source provider - /// FFT Size (any power of two <= 4096: 4096, 2048, 1024, 512, ...) - /// Oversampling (number of overlapping windows) - /// Initial pitch (0.5f = octave down, 1.0f = normal, 2.0f = octave up) - public SmbPitchShiftingSampleProvider(ISampleProvider sourceProvider, int fftSize, long osamp, - float initialPitch) - { - sourceStream = sourceProvider; - waveFormat = sourceProvider.WaveFormat; - this.fftSize = fftSize; - this.osamp = osamp; - PitchFactor = initialPitch; - } - - /// - /// Read from this sample provider - /// - public int Read(float[] buffer, int offset, int count) - { - int sampRead = sourceStream.Read(buffer, offset, count); - if (pitch == 1f) - { - //Nothing to do. - return sampRead; - } - if (waveFormat.Channels == 1) - { - var mono = new float[sampRead]; - var index = 0; - for (var sample = offset; sample <= sampRead + offset - 1; sample++) - { - mono[index] = buffer[sample]; - index += 1; - } - shifterLeft.PitchShift(pitch, sampRead, fftSize, osamp, waveFormat.SampleRate, mono); - index = 0; - for (var sample = offset; sample <= sampRead + offset - 1; sample++) - { - buffer[sample] = Limiter(mono[index]); - index += 1; - } - return sampRead; - } - if (waveFormat.Channels == 2) - { - var left = new float[(sampRead >> 1)]; - var right = new float[(sampRead >> 1)]; - var index = 0; - for (var sample = offset; sample <= sampRead + offset - 1; sample += 2) - { - left[index] = buffer[sample]; - right[index] = buffer[sample + 1]; - index += 1; - } - shifterLeft.PitchShift(pitch, sampRead >> 1, fftSize, osamp, waveFormat.SampleRate, left); - shifterRight.PitchShift(pitch, sampRead >> 1, fftSize, osamp, waveFormat.SampleRate, right); - index = 0; - for (var sample = offset; sample <= sampRead + offset - 1; sample += 2) - { - buffer[sample] = Limiter(left[index]); - buffer[sample + 1] = Limiter(right[index]); - index += 1; - } - return sampRead; - } - throw new Exception("Shifting of more than 2 channels is currently not supported."); - } - - /// - /// WaveFormat - /// - public WaveFormat WaveFormat => waveFormat; - - /// - /// Pitch Factor (0.5f = octave down, 1.0f = normal, 2.0f = octave up) - /// - public float PitchFactor - { - get { return pitch; } - set { pitch = value; } - } - - private float Limiter(float sample) - { - float res; - if ((LIM_THRESH < sample)) - { - res = (sample - LIM_THRESH)/LIM_RANGE; - res = (float) ((Math.Atan(res)/M_PI_2)*LIM_RANGE + LIM_THRESH); - } - else if ((sample < -LIM_THRESH)) - { - res = -(sample + LIM_THRESH)/LIM_RANGE; - res = -(float) ((Math.Atan(res)/M_PI_2)*LIM_RANGE + LIM_THRESH); - } - else - { - res = sample; - } - return res; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SMBPitchShiftingSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SMBPitchShiftingSampleProvider.cs.meta deleted file mode 100644 index a7bb42b..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SMBPitchShiftingSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d2d71b14871db1e4eb8027f495820321 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleChannel.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleChannel.cs deleted file mode 100644 index 360fa6a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleChannel.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Utility class that takes an IWaveProvider input at any bit depth - /// and exposes it as an ISampleProvider. Can turn mono inputs into stereo, - /// and allows adjusting of volume - /// (The eventual successor to WaveChannel32) - /// This class also serves as an example of how you can link together several simple - /// Sample Providers to form a more useful class. - /// - public class SampleChannel : ISampleProvider - { - private readonly VolumeSampleProvider volumeProvider; - private readonly MeteringSampleProvider preVolumeMeter; - private readonly WaveFormat waveFormat; - - /// - /// Initialises a new instance of SampleChannel - /// - /// Source wave provider, must be PCM or IEEE - public SampleChannel(IWaveProvider waveProvider) - : this(waveProvider, false) - { - - } - - /// - /// Initialises a new instance of SampleChannel - /// - /// Source wave provider, must be PCM or IEEE - /// force mono inputs to become stereo - public SampleChannel(IWaveProvider waveProvider, bool forceStereo) - { - ISampleProvider sampleProvider = SampleProviderConverters.ConvertWaveProviderIntoSampleProvider(waveProvider); - if (sampleProvider.WaveFormat.Channels == 1 && forceStereo) - { - sampleProvider = new MonoToStereoSampleProvider(sampleProvider); - } - waveFormat = sampleProvider.WaveFormat; - // let's put the meter before the volume (useful for drawing waveforms) - preVolumeMeter = new MeteringSampleProvider(sampleProvider); - volumeProvider = new VolumeSampleProvider(preVolumeMeter); - } - - /// - /// Reads samples from this sample provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Number of samples desired - /// Number of samples read - public int Read(float[] buffer, int offset, int sampleCount) - { - return volumeProvider.Read(buffer, offset, sampleCount); - } - - /// - /// The WaveFormat of this Sample Provider - /// - public WaveFormat WaveFormat => waveFormat; - - /// - /// Allows adjusting the volume, 1.0f = full volume - /// - public float Volume - { - get { return volumeProvider.Volume; } - set { volumeProvider.Volume = value; } - } - - /// - /// Raised periodically to inform the user of the max volume - /// (before the volume meter) - /// - public event EventHandler PreVolumeMeter - { - add { preVolumeMeter.StreamVolume += value; } - remove { preVolumeMeter.StreamVolume -= value; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleChannel.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleChannel.cs.meta deleted file mode 100644 index be6e3fe..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleChannel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 53e6b7a55f4313b4dad9a118c1fa571e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverterBase.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverterBase.cs deleted file mode 100644 index 94b91d8..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverterBase.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Helper base class for classes converting to ISampleProvider - /// - public abstract class SampleProviderConverterBase : ISampleProvider - { - /// - /// Source Wave Provider - /// - protected IWaveProvider source; - private readonly WaveFormat waveFormat; - - /// - /// Source buffer (to avoid constantly creating small buffers during playback) - /// - protected byte[] sourceBuffer; - - /// - /// Initialises a new instance of SampleProviderConverterBase - /// - /// Source Wave provider - public SampleProviderConverterBase(IWaveProvider source) - { - this.source = source; - waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(source.WaveFormat.SampleRate, source.WaveFormat.Channels); - } - - /// - /// Wave format of this wave provider - /// - public WaveFormat WaveFormat => waveFormat; - - /// - /// Reads samples from the source wave provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Number of samples required - /// Number of samples read - public abstract int Read(float[] buffer, int offset, int count); - - /// - /// Ensure the source buffer exists and is big enough - /// - /// Bytes required - protected void EnsureSourceBuffer(int sourceBytesRequired) - { - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverterBase.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverterBase.cs.meta deleted file mode 100644 index f32bce7..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverterBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bea0f336af2d9b34cb3bc6de5787652b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverters.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverters.cs deleted file mode 100644 index 1ca088b..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverters.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Utility class for converting to SampleProvider - /// - static class SampleProviderConverters - { - /// - /// Helper function to go from IWaveProvider to a SampleProvider - /// Must already be PCM or IEEE float - /// - /// The WaveProvider to convert - /// A sample provider - public static ISampleProvider ConvertWaveProviderIntoSampleProvider(IWaveProvider waveProvider) - { - ISampleProvider sampleProvider; - if (waveProvider.WaveFormat.Encoding == WaveFormatEncoding.Pcm) - { - // go to float - if (waveProvider.WaveFormat.BitsPerSample == 8) - { - sampleProvider = new Pcm8BitToSampleProvider(waveProvider); - } - else if (waveProvider.WaveFormat.BitsPerSample == 16) - { - sampleProvider = new Pcm16BitToSampleProvider(waveProvider); - } - else if (waveProvider.WaveFormat.BitsPerSample == 24) - { - sampleProvider = new Pcm24BitToSampleProvider(waveProvider); - } - else if (waveProvider.WaveFormat.BitsPerSample == 32) - { - sampleProvider = new Pcm32BitToSampleProvider(waveProvider); - } - else - { - throw new InvalidOperationException("Unsupported bit depth"); - } - } - else if (waveProvider.WaveFormat.Encoding == WaveFormatEncoding.IeeeFloat) - { - if (waveProvider.WaveFormat.BitsPerSample == 64) - sampleProvider = new WaveToSampleProvider64(waveProvider); - else - sampleProvider = new WaveToSampleProvider(waveProvider); - } - else - { - throw new ArgumentException("Unsupported source encoding"); - } - return sampleProvider; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverters.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverters.cs.meta deleted file mode 100644 index 1453a38..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleProviderConverters.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6cfad8fe3fad44747b4c34cc42bb47e1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider.cs deleted file mode 100644 index 7550974..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Helper class for when you need to convert back to an IWaveProvider from - /// an ISampleProvider. Keeps it as IEEE float - /// - public class SampleToWaveProvider : IWaveProvider - { - private readonly ISampleProvider source; - - /// - /// Initializes a new instance of the WaveProviderFloatToWaveProvider class - /// - /// Source wave provider - public SampleToWaveProvider(ISampleProvider source) - { - if (source.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - { - throw new ArgumentException("Must be already floating point"); - } - this.source = source; - } - - /// - /// Reads from this provider - /// - public int Read(byte[] buffer, int offset, int count) - { - int samplesNeeded = count / 4; - var wb = new WaveBuffer(buffer); - int samplesRead = source.Read(wb.FloatBuffer, offset / 4, samplesNeeded); - return samplesRead * 4; - } - - /// - /// The waveformat of this WaveProvider (same as the source) - /// - public WaveFormat WaveFormat => source.WaveFormat; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider.cs.meta deleted file mode 100644 index 225e53f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a782e0d006015bf4eb7f1806a6068202 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider16.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider16.cs deleted file mode 100644 index d3f83b4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider16.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Converts a sample provider to 16 bit PCM, optionally clipping and adjusting volume along the way - /// - public class SampleToWaveProvider16 : IWaveProvider - { - private readonly ISampleProvider sourceProvider; - private readonly WaveFormat waveFormat; - private volatile float volume; - private float[] sourceBuffer; - - /// - /// Converts from an ISampleProvider (IEEE float) to a 16 bit PCM IWaveProvider. - /// Number of channels and sample rate remain unchanged. - /// - /// The input source provider - public SampleToWaveProvider16(ISampleProvider sourceProvider) - { - if (sourceProvider.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - throw new ArgumentException("Input source provider must be IEEE float", nameof(sourceProvider)); - if (sourceProvider.WaveFormat.BitsPerSample != 32) - throw new ArgumentException("Input source provider must be 32 bit", nameof(sourceProvider)); - - waveFormat = new WaveFormat(sourceProvider.WaveFormat.SampleRate, 16, sourceProvider.WaveFormat.Channels); - - this.sourceProvider = sourceProvider; - volume = 1.0f; - } - - /// - /// Reads bytes from this wave stream - /// - /// The destination buffer - /// Offset into the destination buffer - /// Number of bytes read - /// Number of bytes read. - public int Read(byte[] destBuffer, int offset, int numBytes) - { - int samplesRequired = numBytes / 2; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, samplesRequired); - int sourceSamples = sourceProvider.Read(sourceBuffer, 0, samplesRequired); - var destWaveBuffer = new WaveBuffer(destBuffer); - - int destOffset = offset / 2; - for (int sample = 0; sample < sourceSamples; sample++) - { - // adjust volume - float sample32 = sourceBuffer[sample] * volume; - // clip - if (sample32 > 1.0f) - sample32 = 1.0f; - if (sample32 < -1.0f) - sample32 = -1.0f; - destWaveBuffer.ShortBuffer[destOffset++] = (short)(sample32 * 32767); - } - - return sourceSamples * 2; - } - - /// - /// - /// - public WaveFormat WaveFormat => waveFormat; - - /// - /// Volume of this channel. 1.0 = full scale - /// - public float Volume - { - get { return volume; } - set { volume = value; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider16.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider16.cs.meta deleted file mode 100644 index 68232e6..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider16.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bcd343e24b602864a84bc2d9cd326a68 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider24.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider24.cs deleted file mode 100644 index f0f5264..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider24.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using NAudio.Utils; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Converts a sample provider to 24 bit PCM, optionally clipping and adjusting volume along the way - /// - public class SampleToWaveProvider24 : IWaveProvider - { - private readonly ISampleProvider sourceProvider; - private readonly WaveFormat waveFormat; - private volatile float volume; - private float[] sourceBuffer; - - /// - /// Converts from an ISampleProvider (IEEE float) to a 16 bit PCM IWaveProvider. - /// Number of channels and sample rate remain unchanged. - /// - /// The input source provider - public SampleToWaveProvider24(ISampleProvider sourceProvider) - { - if (sourceProvider.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - throw new ArgumentException("Input source provider must be IEEE float", "sourceProvider"); - if (sourceProvider.WaveFormat.BitsPerSample != 32) - throw new ArgumentException("Input source provider must be 32 bit", "sourceProvider"); - - waveFormat = new WaveFormat(sourceProvider.WaveFormat.SampleRate, 24, sourceProvider.WaveFormat.Channels); - - this.sourceProvider = sourceProvider; - volume = 1.0f; - } - - /// - /// Reads bytes from this wave stream, clipping if necessary - /// - /// The destination buffer - /// Offset into the destination buffer - /// Number of bytes read - /// Number of bytes read. - public int Read(byte[] destBuffer, int offset, int numBytes) - { - var samplesRequired = numBytes / 3; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, samplesRequired); - var sourceSamples = sourceProvider.Read(sourceBuffer, 0, samplesRequired); - - int destOffset = offset; - for (var sample = 0; sample < sourceSamples; sample++) - { - // adjust volume - var sample32 = sourceBuffer[sample] * volume; - // clip - if (sample32 > 1.0f) - sample32 = 1.0f; - if (sample32 < -1.0f) - sample32 = -1.0f; - - var sample24 = (int) (sample32*8388607.0); - destBuffer[destOffset++] = (byte)(sample24); - destBuffer[destOffset++] = (byte)(sample24 >> 8); - destBuffer[destOffset++] = (byte)(sample24 >> 16); - } - - return sourceSamples * 3; - } - - /// - /// The Format of this IWaveProvider - /// - /// - public WaveFormat WaveFormat - { - get { return waveFormat; } - } - - /// - /// Volume of this channel. 1.0 = full scale, 0.0 to mute - /// - public float Volume - { - get { return volume; } - set { volume = value; } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider24.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider24.cs.meta deleted file mode 100644 index 42340c4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SampleToWaveProvider24.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8227e881bf131834fab5b3727e194694 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SignalGenerator.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SignalGenerator.cs deleted file mode 100644 index 32a0f4f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SignalGenerator.cs +++ /dev/null @@ -1,282 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Signal Generator - /// Sin, Square, Triangle, SawTooth, White Noise, Pink Noise, Sweep. - /// - /// - /// Posibility to change ISampleProvider - /// Example : - /// --------- - /// WaveOut _waveOutGene = new WaveOut(); - /// WaveGenerator wg = new SignalGenerator(); - /// wg.Type = ... - /// wg.Frequency = ... - /// wg ... - /// _waveOutGene.Init(wg); - /// _waveOutGene.Play(); - /// - public class SignalGenerator : ISampleProvider - { - // Wave format - private readonly WaveFormat waveFormat; - - // Random Number for the White Noise & Pink Noise Generator - private readonly Random random = new Random(); - - private readonly double[] pinkNoiseBuffer = new double[7]; - - // Const Math - private const double TwoPi = 2*Math.PI; - - // Generator variable - private int nSample; - - // Sweep Generator variable - private double phi; - - /// - /// Initializes a new instance for the Generator (Default :: 44.1Khz, 2 channels, Sinus, Frequency = 440, Gain = 1) - /// - public SignalGenerator() - : this(44100, 2) - { - - } - - /// - /// Initializes a new instance for the Generator (UserDef SampleRate & Channels) - /// - /// Desired sample rate - /// Number of channels - public SignalGenerator(int sampleRate, int channel) - { - phi = 0; - waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(sampleRate, channel); - - // Default - Type = SignalGeneratorType.Sin; - Frequency = 440.0; - Gain = 1; - PhaseReverse = new bool[channel]; - SweepLengthSecs = 2; - } - - /// - /// The waveformat of this WaveProvider (same as the source) - /// - public WaveFormat WaveFormat => waveFormat; - - /// - /// Frequency for the Generator. (20.0 - 20000.0 Hz) - /// Sin, Square, Triangle, SawTooth, Sweep (Start Frequency). - /// - public double Frequency { get; set; } - - /// - /// Return Log of Frequency Start (Read only) - /// - public double FrequencyLog => Math.Log(Frequency); - - /// - /// End Frequency for the Sweep Generator. (Start Frequency in Frequency) - /// - public double FrequencyEnd { get; set; } - - /// - /// Return Log of Frequency End (Read only) - /// - public double FrequencyEndLog => Math.Log(FrequencyEnd); - - /// - /// Gain for the Generator. (0.0 to 1.0) - /// - public double Gain { get; set; } - - /// - /// Channel PhaseReverse - /// - public bool[] PhaseReverse { get; } - - /// - /// Type of Generator. - /// - public SignalGeneratorType Type { get; set; } - - /// - /// Length Seconds for the Sweep Generator. - /// - public double SweepLengthSecs { get; set; } - - /// - /// Reads from this provider. - /// - public int Read(float[] buffer, int offset, int count) - { - int outIndex = offset; - - // Generator current value - double multiple; - double sampleValue; - double sampleSaw; - - // Complete Buffer - for (int sampleCount = 0; sampleCount < count/waveFormat.Channels; sampleCount++) - { - switch (Type) - { - case SignalGeneratorType.Sin: - - // Sinus Generator - - multiple = TwoPi*Frequency/waveFormat.SampleRate; - sampleValue = Gain*Math.Sin(nSample*multiple); - - nSample++; - - break; - - - case SignalGeneratorType.Square: - - // Square Generator - - multiple = 2*Frequency/waveFormat.SampleRate; - sampleSaw = ((nSample*multiple)%2) - 1; - sampleValue = sampleSaw > 0 ? Gain : -Gain; - - nSample++; - break; - - case SignalGeneratorType.Triangle: - - // Triangle Generator - - multiple = 2*Frequency/waveFormat.SampleRate; - sampleSaw = ((nSample*multiple)%2); - sampleValue = 2*sampleSaw; - if (sampleValue > 1) - sampleValue = 2 - sampleValue; - if (sampleValue < -1) - sampleValue = -2 - sampleValue; - - sampleValue *= Gain; - - nSample++; - break; - - case SignalGeneratorType.SawTooth: - - // SawTooth Generator - - multiple = 2*Frequency/waveFormat.SampleRate; - sampleSaw = ((nSample*multiple)%2) - 1; - sampleValue = Gain*sampleSaw; - - nSample++; - break; - - case SignalGeneratorType.White: - - // White Noise Generator - sampleValue = (Gain*NextRandomTwo()); - break; - - case SignalGeneratorType.Pink: - - // Pink Noise Generator - - double white = NextRandomTwo(); - pinkNoiseBuffer[0] = 0.99886*pinkNoiseBuffer[0] + white*0.0555179; - pinkNoiseBuffer[1] = 0.99332*pinkNoiseBuffer[1] + white*0.0750759; - pinkNoiseBuffer[2] = 0.96900*pinkNoiseBuffer[2] + white*0.1538520; - pinkNoiseBuffer[3] = 0.86650*pinkNoiseBuffer[3] + white*0.3104856; - pinkNoiseBuffer[4] = 0.55000*pinkNoiseBuffer[4] + white*0.5329522; - pinkNoiseBuffer[5] = -0.7616*pinkNoiseBuffer[5] - white*0.0168980; - double pink = pinkNoiseBuffer[0] + pinkNoiseBuffer[1] + pinkNoiseBuffer[2] + pinkNoiseBuffer[3] + pinkNoiseBuffer[4] + pinkNoiseBuffer[5] + pinkNoiseBuffer[6] + white*0.5362; - pinkNoiseBuffer[6] = white*0.115926; - sampleValue = (Gain*(pink/5)); - break; - - case SignalGeneratorType.Sweep: - - // Sweep Generator - double f = Math.Exp(FrequencyLog + (nSample*(FrequencyEndLog - FrequencyLog))/(SweepLengthSecs*waveFormat.SampleRate)); - - multiple = TwoPi*f/waveFormat.SampleRate; - phi += multiple; - sampleValue = Gain*(Math.Sin(phi)); - nSample++; - if (nSample > SweepLengthSecs*waveFormat.SampleRate) - { - nSample = 0; - phi = 0; - } - break; - - default: - sampleValue = 0.0; - break; - } - - // Phase Reverse Per Channel - for (int i = 0; i < waveFormat.Channels; i++) - { - if (PhaseReverse[i]) - buffer[outIndex++] = (float) -sampleValue; - else - buffer[outIndex++] = (float) sampleValue; - } - } - return count; - } - - /// - /// Private :: Random for WhiteNoise & Pink Noise (Value form -1 to 1) - /// - /// Random value from -1 to +1 - private double NextRandomTwo() - { - return 2*random.NextDouble() - 1; - } - - } - - /// - /// Signal Generator type - /// - public enum SignalGeneratorType - { - /// - /// Pink noise - /// - Pink, - /// - /// White noise - /// - White, - /// - /// Sweep - /// - Sweep, - /// - /// Sine wave - /// - Sin, - /// - /// Square wave - /// - Square, - /// - /// Triangle Wave - /// - Triangle, - /// - /// Sawtooth wave - /// - SawTooth, - } - -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SignalGenerator.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SignalGenerator.cs.meta deleted file mode 100644 index 291fa90..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/SignalGenerator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 38501f843f6467d42aa73c5c2d82b080 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/StereoToMonoSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/StereoToMonoSampleProvider.cs deleted file mode 100644 index cd6c198..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/StereoToMonoSampleProvider.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Takes a stereo input and turns it to mono - /// - public class StereoToMonoSampleProvider : ISampleProvider - { - private readonly ISampleProvider sourceProvider; - private float[] sourceBuffer; - - /// - /// Creates a new mono ISampleProvider based on a stereo input - /// - /// Stereo 16 bit PCM input - public StereoToMonoSampleProvider(ISampleProvider sourceProvider) - { - LeftVolume = 0.5f; - RightVolume = 0.5f; - if (sourceProvider.WaveFormat.Channels != 2) - { - throw new ArgumentException("Source must be stereo"); - } - this.sourceProvider = sourceProvider; - WaveFormat = WaveFormat.CreateIeeeFloatWaveFormat(sourceProvider.WaveFormat.SampleRate, 1); - } - - /// - /// 1.0 to mix the mono source entirely to the left channel - /// - public float LeftVolume { get; set; } - - /// - /// 1.0 to mix the mono source entirely to the right channel - /// - public float RightVolume { get; set; } - - /// - /// Output Wave Format - /// - public WaveFormat WaveFormat { get; } - - /// - /// Reads bytes from this SampleProvider - /// - public int Read(float[] buffer, int offset, int count) - { - var sourceSamplesRequired = count * 2; - if (sourceBuffer == null || sourceBuffer.Length < sourceSamplesRequired) sourceBuffer = new float[sourceSamplesRequired]; - - var sourceSamplesRead = sourceProvider.Read(sourceBuffer, 0, sourceSamplesRequired); - var destOffset = offset / 2; - for (var sourceSample = 0; sourceSample < sourceSamplesRead; sourceSample += 2) - { - var left = sourceBuffer[sourceSample]; - var right = sourceBuffer[sourceSample + 1]; - var outSample = (left * LeftVolume) + (right * RightVolume); - - buffer[destOffset++] = outSample; - } - return sourceSamplesRead / 2; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/StereoToMonoSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/StereoToMonoSampleProvider.cs.meta deleted file mode 100644 index 4e9cb17..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/StereoToMonoSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2c1e79cbd6c02f04084ae66eddb6e5c6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/VolumeSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/VolumeSampleProvider.cs deleted file mode 100644 index d3e8c22..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/VolumeSampleProvider.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Very simple sample provider supporting adjustable gain - /// - public class VolumeSampleProvider : ISampleProvider - { - private readonly ISampleProvider source; - private float volume; - - /// - /// Initializes a new instance of VolumeSampleProvider - /// - /// Source Sample Provider - public VolumeSampleProvider(ISampleProvider source) - { - this.source = source; - this.volume = 1.0f; - } - - /// - /// WaveFormat - /// - public WaveFormat WaveFormat - { - get { return source.WaveFormat; } - } - - /// - /// Reads samples from this sample provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Number of samples desired - /// Number of samples read - public int Read(float[] buffer, int offset, int sampleCount) - { - int samplesRead = source.Read(buffer, offset, sampleCount); - if (volume != 1f) - { - for (int n = 0; n < sampleCount; n++) - { - buffer[offset + n] *= volume; - } - } - return samplesRead; - } - - /// - /// Allows adjusting the volume, 1.0f = full volume - /// - public float Volume - { - get { return volume; } - set { volume = value; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/VolumeSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/VolumeSampleProvider.cs.meta deleted file mode 100644 index 3815d3d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/VolumeSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2e4d337919323084a866140dbd6faefa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider.cs deleted file mode 100644 index 5ac550c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Helper class turning an already 32 bit floating point IWaveProvider - /// into an ISampleProvider - hopefully not needed for most applications - /// - public class WaveToSampleProvider : SampleProviderConverterBase - { - /// - /// Initializes a new instance of the WaveToSampleProvider class - /// - /// Source wave provider, must be IEEE float - public WaveToSampleProvider(IWaveProvider source) - : base(source) - { - if (source.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - { - throw new ArgumentException("Must be already floating point"); - } - } - - /// - /// Reads from this provider - /// - public override int Read(float[] buffer, int offset, int count) - { - int bytesNeeded = count * 4; - EnsureSourceBuffer(bytesNeeded); - int bytesRead = source.Read(sourceBuffer, 0, bytesNeeded); - int samplesRead = bytesRead / 4; - int outputIndex = offset; - for (int n = 0; n < bytesRead; n+=4) - { - buffer[outputIndex++] = BitConverter.ToSingle(sourceBuffer, n); - } - return samplesRead; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider.cs.meta deleted file mode 100644 index 49b921f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6aa3a48d312e4384f9034c2ff652f5fd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider64.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider64.cs deleted file mode 100644 index 088c5f6..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider64.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Helper class turning an already 64 bit floating point IWaveProvider - /// into an ISampleProvider - hopefully not needed for most applications - /// - public class WaveToSampleProvider64 : SampleProviderConverterBase - { - /// - /// Initializes a new instance of the WaveToSampleProvider class - /// - /// Source wave provider, must be IEEE float - public WaveToSampleProvider64(IWaveProvider source) - : base(source) - { - if (source.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - { - throw new ArgumentException("Must be already floating point"); - } - } - - /// - /// Reads from this provider - /// - public override int Read(float[] buffer, int offset, int count) - { - int bytesNeeded = count * 8; - EnsureSourceBuffer(bytesNeeded); - int bytesRead = source.Read(sourceBuffer, 0, bytesNeeded); - int samplesRead = bytesRead / 8; - int outputIndex = offset; - for (int n = 0; n < bytesRead; n += 8) - { - long sample64 = BitConverter.ToInt64(sourceBuffer, n); - buffer[outputIndex++] = (float)BitConverter.Int64BitsToDouble(sample64); - } - return samplesRead; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider64.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider64.cs.meta deleted file mode 100644 index 7376185..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WaveToSampleProvider64.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4cb757214f806074c9b4bdd08846ae6d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WdlResamplingSampleProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WdlResamplingSampleProvider.cs deleted file mode 100644 index 5102765..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WdlResamplingSampleProvider.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Linq; -using NAudio.Dsp; - -namespace NAudio.Wave.SampleProviders -{ - /// - /// Fully managed resampling sample provider, based on the WDL Resampler - /// - public class WdlResamplingSampleProvider : ISampleProvider - { - private readonly WdlResampler resampler; - private readonly WaveFormat outFormat; - private readonly ISampleProvider source; - private readonly int channels; - - /// - /// Constructs a new resampler - /// - /// Source to resample - /// Desired output sample rate - public WdlResamplingSampleProvider(ISampleProvider source, int newSampleRate) - { - channels = source.WaveFormat.Channels; - outFormat = WaveFormat.CreateIeeeFloatWaveFormat(newSampleRate, channels); - this.source = source; - - resampler = new WdlResampler(); - resampler.SetMode(true, 2, false); - resampler.SetFilterParms(); - resampler.SetFeedMode(false); // output driven - resampler.SetRates(source.WaveFormat.SampleRate, newSampleRate); - } - - /// - /// Reads from this sample provider - /// - public int Read(float[] buffer, int offset, int count) - { - float[] inBuffer; - int inBufferOffset; - int framesRequested = count / channels; - int inNeeded = resampler.ResamplePrepare(framesRequested, outFormat.Channels, out inBuffer, out inBufferOffset); - int inAvailable = source.Read(inBuffer, inBufferOffset, inNeeded * channels) / channels; - int outAvailable = resampler.ResampleOut(buffer, offset, inAvailable, framesRequested, channels); - return outAvailable * channels; - } - - /// - /// Output WaveFormat - /// - public WaveFormat WaveFormat - { - get { return outFormat; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WdlResamplingSampleProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WdlResamplingSampleProvider.cs.meta deleted file mode 100644 index 7705000..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/SampleProviders/WdlResamplingSampleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 53623c70cbe72834f8f655765ff25e19 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveExtensionMethods.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveExtensionMethods.cs deleted file mode 100644 index 272d9c0..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveExtensionMethods.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using NAudio.Wave.SampleProviders; - -namespace NAudio.Wave -{ - /// - /// Useful extension methods to make switching between WaveAndSampleProvider easier - /// - public static class WaveExtensionMethods - { - /// - /// Converts a WaveProvider into a SampleProvider (only works for PCM) - /// - /// WaveProvider to convert - /// - public static ISampleProvider ToSampleProvider(this IWaveProvider waveProvider) - { - return SampleProviderConverters.ConvertWaveProviderIntoSampleProvider(waveProvider); - } - - /// - /// Allows sending a SampleProvider directly to an IWavePlayer without needing to convert - /// back to an IWaveProvider - /// - /// The WavePlayer - /// - /// - public static void Init(this IWavePlayer wavePlayer, ISampleProvider sampleProvider, bool convertTo16Bit = false) - { - IWaveProvider provider = convertTo16Bit ? (IWaveProvider)new SampleToWaveProvider16(sampleProvider) : new SampleToWaveProvider(sampleProvider); - wavePlayer.Init(provider); - } - - /// - /// Turns WaveFormatExtensible into a standard waveformat if possible - /// - /// Input wave format - /// A standard PCM or IEEE waveformat, or the original waveformat - public static WaveFormat AsStandardWaveFormat(this WaveFormat waveFormat) - { - var wfe = waveFormat as WaveFormatExtensible; - return wfe != null ? wfe.ToStandardWaveFormat() : waveFormat; - } - - /// - /// Converts a ISampleProvider to a IWaveProvider but still 32 bit float - /// - /// SampleProvider to convert - /// An IWaveProvider - public static IWaveProvider ToWaveProvider(this ISampleProvider sampleProvider) - { - return new SampleToWaveProvider(sampleProvider); - } - - /// - /// Converts a ISampleProvider to a IWaveProvider but and convert to 16 bit - /// - /// SampleProvider to convert - /// A 16 bit IWaveProvider - public static IWaveProvider ToWaveProvider16(this ISampleProvider sampleProvider) - { - return new SampleToWaveProvider16(sampleProvider); - } - - /// - /// Concatenates one Sample Provider on the end of another - /// - /// The sample provider to play first - /// The sample provider to play next - /// A single sampleprovider to play one after the other - public static ISampleProvider FollowedBy(this ISampleProvider sampleProvider, ISampleProvider next) - { - return new ConcatenatingSampleProvider(new[] { sampleProvider, next}); - } - - /// - /// Concatenates one Sample Provider on the end of another with silence inserted - /// - /// The sample provider to play first - /// Silence duration to insert between the two - /// The sample provider to play next - /// A single sample provider - public static ISampleProvider FollowedBy(this ISampleProvider sampleProvider, TimeSpan silenceDuration, ISampleProvider next) - { - var silenceAppended = new OffsetSampleProvider(sampleProvider) {LeadOut = silenceDuration}; - return new ConcatenatingSampleProvider(new[] { silenceAppended, next }); - } - - /// - /// Skips over a specified amount of time (by consuming source stream) - /// - /// Source sample provider - /// Duration to skip over - /// A sample provider that skips over the specified amount of time - public static ISampleProvider Skip(this ISampleProvider sampleProvider, TimeSpan skipDuration) - { - return new OffsetSampleProvider(sampleProvider) { SkipOver = skipDuration}; - } - - /// - /// Takes a specified amount of time from the source stream - /// - /// Source sample provider - /// Duration to take - /// A sample provider that reads up to the specified amount of time - public static ISampleProvider Take(this ISampleProvider sampleProvider, TimeSpan takeDuration) - { - return new OffsetSampleProvider(sampleProvider) { Take = takeDuration }; - } - - /// - /// Converts a Stereo Sample Provider to mono, allowing mixing of channel volume - /// - /// Stereo Source Provider - /// Amount of left channel to mix in (0 = mute, 1 = full, 0.5 for mixing half from each channel) - /// Amount of right channel to mix in (0 = mute, 1 = full, 0.5 for mixing half from each channel) - /// A mono SampleProvider - public static ISampleProvider ToMono(this ISampleProvider sourceProvider, float leftVol = 0.5f, float rightVol = 0.5f) - { - if(sourceProvider.WaveFormat.Channels == 1) return sourceProvider; - return new StereoToMonoSampleProvider(sourceProvider) {LeftVolume = leftVol, RightVolume = rightVol}; - } - - /// - /// Converts a Mono ISampleProvider to stereo - /// - /// Mono Source Provider - /// Amount to mix to left channel (1.0 is full volume) - /// Amount to mix to right channel (1.0 is full volume) - /// - public static ISampleProvider ToStereo(this ISampleProvider sourceProvider, float leftVol = 1.0f, float rightVol = 1.0f) - { - if (sourceProvider.WaveFormat.Channels == 2) return sourceProvider; - return new MonoToStereoSampleProvider(sourceProvider) { LeftVolume = leftVol, RightVolume = rightVol }; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveExtensionMethods.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveExtensionMethods.cs.meta deleted file mode 100644 index ecf2eae..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveExtensionMethods.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8e7cd4c8945eb8e4b93a5a4329d3d3ac -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats.meta deleted file mode 100644 index d33d488..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dbdf2baa0dbb2ba4b80388411303382d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/AdpcmWaveFormat.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/AdpcmWaveFormat.cs deleted file mode 100644 index 58845d4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/AdpcmWaveFormat.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Microsoft ADPCM - /// See http://icculus.org/SDL_sound/downloads/external_documentation/wavecomp.htm - /// - [StructLayout(LayoutKind.Sequential, Pack=2)] - public class AdpcmWaveFormat : WaveFormat - { - short samplesPerBlock; - short numCoeff; - // 7 pairs of coefficients - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 14)] - short[] coefficients; - - /// - /// Empty constructor needed for marshalling from a pointer - /// - AdpcmWaveFormat() : this(8000,1) - { - } - - /// - /// Samples per block - /// - public int SamplesPerBlock => samplesPerBlock; - - /// - /// Number of coefficients - /// - public int NumCoefficients => numCoeff; - - /// - /// Coefficients - /// - public short[] Coefficients => coefficients; - - /// - /// Microsoft ADPCM - /// - /// Sample Rate - /// Channels - public AdpcmWaveFormat(int sampleRate, int channels) : - base(sampleRate,0,channels) - { - this.waveFormatTag = WaveFormatEncoding.Adpcm; - - // TODO: validate sampleRate, bitsPerSample - this.extraSize = 32; - switch(this.sampleRate) - { - case 8000: - case 11025: - blockAlign = 256; - break; - case 22050: - blockAlign = 512; - break; - case 44100: - default: - blockAlign = 1024; - break; - } - - this.bitsPerSample = 4; - this.samplesPerBlock = (short) ((((blockAlign - (7 * channels)) * 8) / (bitsPerSample * channels)) + 2); - this.averageBytesPerSecond = - ((this.SampleRate * blockAlign) / samplesPerBlock); - - // samplesPerBlock = blockAlign - (7 * channels)) * (2 / channels) + 2; - - - numCoeff = 7; - coefficients = new short[14] { - 256,0,512,-256,0,0,192,64,240,0,460,-208,392,-232 - }; - } - - /// - /// Serializes this wave format - /// - /// Binary writer - public override void Serialize(System.IO.BinaryWriter writer) - { - base.Serialize(writer); - writer.Write(samplesPerBlock); - writer.Write(numCoeff); - foreach (short coefficient in coefficients) - { - writer.Write(coefficient); - } - } - - /// - /// String Description of this WaveFormat - /// - public override string ToString() - { - return String.Format("Microsoft ADPCM {0} Hz {1} channels {2} bits per sample {3} samples per block", - this.SampleRate, this.channels, this.bitsPerSample, this.samplesPerBlock); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/AdpcmWaveFormat.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/AdpcmWaveFormat.cs.meta deleted file mode 100644 index 45ae211..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/AdpcmWaveFormat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 95206568cf9afaa4a852ca3ebb4c0fba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Gsm610WaveFormat.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Gsm610WaveFormat.cs deleted file mode 100644 index 17e17e4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Gsm610WaveFormat.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.IO; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// GSM 610 - /// - [StructLayout(LayoutKind.Sequential, Pack = 2)] - public class Gsm610WaveFormat : WaveFormat - { - private readonly short samplesPerBlock; - - /// - /// Creates a GSM 610 WaveFormat - /// For now hardcoded to 13kbps - /// - public Gsm610WaveFormat() - { - waveFormatTag = WaveFormatEncoding.Gsm610; - channels = 1; - averageBytesPerSecond = 1625; - bitsPerSample = 0; // must be zero - blockAlign = 65; - sampleRate = 8000; - - extraSize = 2; - samplesPerBlock = 320; - } - - /// - /// Samples per block - /// - public short SamplesPerBlock { get { return samplesPerBlock; } } - - /// - /// Writes this structure to a BinaryWriter - /// - public override void Serialize(BinaryWriter writer) - { - base.Serialize(writer); - writer.Write(samplesPerBlock); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Gsm610WaveFormat.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Gsm610WaveFormat.cs.meta deleted file mode 100644 index 1d7cc35..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Gsm610WaveFormat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4d264e8b98f152c42b9177be2bb7137c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/ImaAdpcmWaveFormat.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/ImaAdpcmWaveFormat.cs deleted file mode 100644 index 75e22f2..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/ImaAdpcmWaveFormat.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.Wave -{ - /// - /// IMA/DVI ADPCM Wave Format - /// Work in progress - /// - [StructLayout(LayoutKind.Sequential, Pack = 2)] - public class ImaAdpcmWaveFormat : WaveFormat - { - short samplesPerBlock; - - /// - /// parameterless constructor for Marshalling - /// - ImaAdpcmWaveFormat() - { - } - - /// - /// Creates a new IMA / DVI ADPCM Wave Format - /// - /// Sample Rate - /// Number of channels - /// Bits Per Sample - public ImaAdpcmWaveFormat(int sampleRate, int channels, int bitsPerSample) - { - this.waveFormatTag = WaveFormatEncoding.DviAdpcm; // can also be ImaAdpcm - they are the same - this.sampleRate = sampleRate; - this.channels = (short)channels; - this.bitsPerSample = (short)bitsPerSample; // TODO: can be 3 or 4 - this.extraSize = 2; - this.blockAlign = 0; //TODO - this.averageBytesPerSecond = 0; //TODO - this.samplesPerBlock = 0; // TODO - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/ImaAdpcmWaveFormat.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/ImaAdpcmWaveFormat.cs.meta deleted file mode 100644 index eb83b96..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/ImaAdpcmWaveFormat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2f92b79b12494f647b5cb29af08f87c0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Mp3WaveFormat.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Mp3WaveFormat.cs deleted file mode 100644 index c36c0fd..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Mp3WaveFormat.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave -{ - /// - /// MP3 WaveFormat, MPEGLAYER3WAVEFORMAT from mmreg.h - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 2)] - public class Mp3WaveFormat : WaveFormat - { - /// - /// Wave format ID (wID) - /// - public Mp3WaveFormatId id; - /// - /// Padding flags (fdwFlags) - /// - public Mp3WaveFormatFlags flags; - /// - /// Block Size (nBlockSize) - /// - public ushort blockSize; - /// - /// Frames per block (nFramesPerBlock) - /// - public ushort framesPerBlock; - /// - /// Codec Delay (nCodecDelay) - /// - public ushort codecDelay; - - private const short Mp3WaveFormatExtraBytes = 12; // MPEGLAYER3_WFX_EXTRA_BYTES - - /// - /// Creates a new MP3 WaveFormat - /// - public Mp3WaveFormat(int sampleRate, int channels, int blockSize, int bitRate) - { - waveFormatTag = WaveFormatEncoding.MpegLayer3; - this.channels = (short)channels; - this.averageBytesPerSecond = bitRate / 8; - this.bitsPerSample = 0; // must be zero - this.blockAlign = 1; // must be 1 - this.sampleRate = sampleRate; - - this.extraSize = Mp3WaveFormatExtraBytes; - this.id = Mp3WaveFormatId.Mpeg; - this.flags = Mp3WaveFormatFlags.PaddingIso; - this.blockSize = (ushort)blockSize; - this.framesPerBlock = 1; - this.codecDelay = 0; - } - } - - /// - /// Wave Format Padding Flags - /// - [Flags] - public enum Mp3WaveFormatFlags - { - /// - /// MPEGLAYER3_FLAG_PADDING_ISO - /// - PaddingIso = 0, - /// - /// MPEGLAYER3_FLAG_PADDING_ON - /// - PaddingOn = 1, - /// - /// MPEGLAYER3_FLAG_PADDING_OFF - /// - PaddingOff = 2, - } - - /// - /// Wave Format ID - /// - public enum Mp3WaveFormatId : ushort - { - /// MPEGLAYER3_ID_UNKNOWN - Unknown = 0, - /// MPEGLAYER3_ID_MPEG - Mpeg = 1, - /// MPEGLAYER3_ID_CONSTANTFRAMESIZE - ConstantFrameSize = 2 - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Mp3WaveFormat.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Mp3WaveFormat.cs.meta deleted file mode 100644 index 4386daa..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/Mp3WaveFormat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2f5a85755ff032240a3256edffd68547 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/OggWaveFormat.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/OggWaveFormat.cs deleted file mode 100644 index 49f88d9..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/OggWaveFormat.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave -{ - //http://svn.xiph.org/tags/vorbisacm_20020708/src/vorbisacm/vorbisacm.h - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack=2)] - class OggWaveFormat : WaveFormat - { - //public short cbSize; - public uint dwVorbisACMVersion; - public uint dwLibVorbisVersion; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/OggWaveFormat.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/OggWaveFormat.cs.meta deleted file mode 100644 index 7cc292b..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/OggWaveFormat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 098cd76e20cd8c64098073ba5239481e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/TrueSpeechWaveFormat.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/TrueSpeechWaveFormat.cs deleted file mode 100644 index 02e8431..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/TrueSpeechWaveFormat.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; -using System.IO; - -namespace NAudio.Wave -{ - /// - /// DSP Group TrueSpeech - /// - [StructLayout(LayoutKind.Sequential, Pack = 2)] - public class TrueSpeechWaveFormat : WaveFormat - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] - short[] unknown; - - /// - /// DSP Group TrueSpeech WaveFormat - /// - public TrueSpeechWaveFormat() - { - this.waveFormatTag = WaveFormatEncoding.DspGroupTrueSpeech; - this.channels = 1; - this.averageBytesPerSecond = 1067; - this.bitsPerSample = 1; - this.blockAlign = 32; - this.sampleRate = 8000; - - this.extraSize = 32; - this.unknown = new short[16]; - this.unknown[0] = 1; - this.unknown[1] = 0xF0; - } - - /// - /// Writes this structure to a BinaryWriter - /// - public override void Serialize(BinaryWriter writer) - { - base.Serialize(writer); - foreach (short val in unknown) - { - writer.Write(val); - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/TrueSpeechWaveFormat.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/TrueSpeechWaveFormat.cs.meta deleted file mode 100644 index 2707e6a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/TrueSpeechWaveFormat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f85195180db42c24cab6a541a87c1896 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormat.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormat.cs deleted file mode 100644 index f37ae35..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormat.cs +++ /dev/null @@ -1,345 +0,0 @@ -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Diagnostics; -using NAudio.Utils; - -namespace NAudio.Wave -{ - /// - /// Represents a Wave file format - /// - [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi, Pack=2)] - public class WaveFormat - { - /// format type - protected WaveFormatEncoding waveFormatTag; - /// number of channels - protected short channels; - /// sample rate - protected int sampleRate; - /// for buffer estimation - protected int averageBytesPerSecond; - /// block size of data - protected short blockAlign; - /// number of bits per sample of mono data - protected short bitsPerSample; - /// number of following bytes - protected short extraSize; - - /// - /// Creates a new PCM 44.1Khz stereo 16 bit format - /// - public WaveFormat() : this(44100,16,2) - { - - } - - /// - /// Creates a new 16 bit wave format with the specified sample - /// rate and channel count - /// - /// Sample Rate - /// Number of channels - public WaveFormat(int sampleRate, int channels) - : this(sampleRate, 16, channels) - { - } - - /// - /// Gets the size of a wave buffer equivalent to the latency in milliseconds. - /// - /// The milliseconds. - /// - public int ConvertLatencyToByteSize(int milliseconds) - { - int bytes = (int) ((AverageBytesPerSecond/1000.0)*milliseconds); - if ((bytes%BlockAlign) != 0) - { - // Return the upper BlockAligned - bytes = bytes + BlockAlign - (bytes % BlockAlign); - } - return bytes; - } - - /// - /// Creates a WaveFormat with custom members - /// - /// The encoding - /// Sample Rate - /// Number of channels - /// Average Bytes Per Second - /// Block Align - /// Bits Per Sample - /// - public static WaveFormat CreateCustomFormat(WaveFormatEncoding tag, int sampleRate, int channels, int averageBytesPerSecond, int blockAlign, int bitsPerSample) - { - WaveFormat waveFormat = new WaveFormat(); - waveFormat.waveFormatTag = tag; - waveFormat.channels = (short)channels; - waveFormat.sampleRate = sampleRate; - waveFormat.averageBytesPerSecond = averageBytesPerSecond; - waveFormat.blockAlign = (short)blockAlign; - waveFormat.bitsPerSample = (short)bitsPerSample; - waveFormat.extraSize = 0; - return waveFormat; - } - - /// - /// Creates an A-law wave format - /// - /// Sample Rate - /// Number of Channels - /// Wave Format - public static WaveFormat CreateALawFormat(int sampleRate, int channels) - { - return CreateCustomFormat(WaveFormatEncoding.ALaw, sampleRate, channels, sampleRate * channels, channels, 8); - } - - /// - /// Creates a Mu-law wave format - /// - /// Sample Rate - /// Number of Channels - /// Wave Format - public static WaveFormat CreateMuLawFormat(int sampleRate, int channels) - { - return CreateCustomFormat(WaveFormatEncoding.MuLaw, sampleRate, channels, sampleRate * channels, channels, 8); - } - - /// - /// Creates a new PCM format with the specified sample rate, bit depth and channels - /// - public WaveFormat(int rate, int bits, int channels) - { - if (channels < 1) - { - throw new ArgumentOutOfRangeException(nameof(channels), "Channels must be 1 or greater"); - } - // minimum 16 bytes, sometimes 18 for PCM - waveFormatTag = WaveFormatEncoding.Pcm; - this.channels = (short)channels; - sampleRate = rate; - bitsPerSample = (short)bits; - extraSize = 0; - - blockAlign = (short)(channels * (bits / 8)); - averageBytesPerSecond = this.sampleRate * this.blockAlign; - } - - /// - /// Creates a new 32 bit IEEE floating point wave format - /// - /// sample rate - /// number of channels - public static WaveFormat CreateIeeeFloatWaveFormat(int sampleRate, int channels) - { - var wf = new WaveFormat(); - wf.waveFormatTag = WaveFormatEncoding.IeeeFloat; - wf.channels = (short)channels; - wf.bitsPerSample = 32; - wf.sampleRate = sampleRate; - wf.blockAlign = (short) (4*channels); - wf.averageBytesPerSecond = sampleRate * wf.blockAlign; - wf.extraSize = 0; - return wf; - } - - /// - /// Helper function to retrieve a WaveFormat structure from a pointer - /// - /// WaveFormat structure - /// - public static WaveFormat MarshalFromPtr(IntPtr pointer) - { - var waveFormat = MarshalHelpers.PtrToStructure(pointer); - switch (waveFormat.Encoding) - { - case WaveFormatEncoding.Pcm: - // can't rely on extra size even being there for PCM so blank it to avoid reading - // corrupt data - waveFormat.extraSize = 0; - break; - case WaveFormatEncoding.Extensible: - waveFormat = MarshalHelpers.PtrToStructure(pointer); - break; - case WaveFormatEncoding.Adpcm: - waveFormat = MarshalHelpers.PtrToStructure(pointer); - break; - case WaveFormatEncoding.Gsm610: - waveFormat = MarshalHelpers.PtrToStructure(pointer); - break; - default: - if (waveFormat.ExtraSize > 0) - { - waveFormat = MarshalHelpers.PtrToStructure(pointer); - } - break; - } - return waveFormat; - } - - /// - /// Helper function to marshal WaveFormat to an IntPtr - /// - /// WaveFormat - /// IntPtr to WaveFormat structure (needs to be freed by callee) - public static IntPtr MarshalToPtr(WaveFormat format) - { - int formatSize = Marshal.SizeOf(format); - IntPtr formatPointer = Marshal.AllocHGlobal(formatSize); - Marshal.StructureToPtr(format, formatPointer, false); - return formatPointer; - } - - /// - /// Reads in a WaveFormat (with extra data) from a fmt chunk (chunk identifier and - /// length should already have been read) - /// - /// Binary reader - /// Format chunk length - /// A WaveFormatExtraData - public static WaveFormat FromFormatChunk(BinaryReader br, int formatChunkLength) - { - var waveFormat = new WaveFormatExtraData(); - waveFormat.ReadWaveFormat(br, formatChunkLength); - waveFormat.ReadExtraData(br); - return waveFormat; - } - - private void ReadWaveFormat(BinaryReader br, int formatChunkLength) - { - if (formatChunkLength < 16) - throw new InvalidDataException("Invalid WaveFormat Structure"); - waveFormatTag = (WaveFormatEncoding)br.ReadUInt16(); - channels = br.ReadInt16(); - sampleRate = br.ReadInt32(); - averageBytesPerSecond = br.ReadInt32(); - blockAlign = br.ReadInt16(); - bitsPerSample = br.ReadInt16(); - if (formatChunkLength > 16) - { - extraSize = br.ReadInt16(); - if (extraSize != formatChunkLength - 18) - { - Debug.WriteLine("Format chunk mismatch"); - extraSize = (short)(formatChunkLength - 18); - } - } - } - - /// - /// Reads a new WaveFormat object from a stream - /// - /// A binary reader that wraps the stream - public WaveFormat(BinaryReader br) - { - int formatChunkLength = br.ReadInt32(); - ReadWaveFormat(br, formatChunkLength); - } - - /// - /// Reports this WaveFormat as a string - /// - /// String describing the wave format - public override string ToString() - { - switch (waveFormatTag) - { - case WaveFormatEncoding.Pcm: - case WaveFormatEncoding.Extensible: - // extensible just has some extra bits after the PCM header - return $"{bitsPerSample} bit PCM: {sampleRate/1000}kHz {channels} channels"; - default: - return waveFormatTag.ToString(); - } - } - - /// - /// Compares with another WaveFormat object - /// - /// Object to compare to - /// True if the objects are the same - public override bool Equals(object obj) - { - var other = obj as WaveFormat; - if(other != null) - { - return waveFormatTag == other.waveFormatTag && - channels == other.channels && - sampleRate == other.sampleRate && - averageBytesPerSecond == other.averageBytesPerSecond && - blockAlign == other.blockAlign && - bitsPerSample == other.bitsPerSample; - } - return false; - } - - /// - /// Provides a Hashcode for this WaveFormat - /// - /// A hashcode - public override int GetHashCode() - { - return (int) waveFormatTag ^ - (int) channels ^ - sampleRate ^ - averageBytesPerSecond ^ - (int) blockAlign ^ - (int) bitsPerSample; - } - - /// - /// Returns the encoding type used - /// - public WaveFormatEncoding Encoding => waveFormatTag; - - /// - /// Writes this WaveFormat object to a stream - /// - /// the output stream - public virtual void Serialize(BinaryWriter writer) - { - writer.Write((int)(18 + extraSize)); // wave format length - writer.Write((short)Encoding); - writer.Write((short)Channels); - writer.Write((int)SampleRate); - writer.Write((int)AverageBytesPerSecond); - writer.Write((short)BlockAlign); - writer.Write((short)BitsPerSample); - writer.Write((short)extraSize); - } - - /// - /// Returns the number of channels (1=mono,2=stereo etc) - /// - public int Channels => channels; - - /// - /// Returns the sample rate (samples per second) - /// - public int SampleRate => sampleRate; - - /// - /// Returns the average number of bytes used per second - /// - public int AverageBytesPerSecond => averageBytesPerSecond; - - /// - /// Returns the block alignment - /// - public virtual int BlockAlign => blockAlign; - - /// - /// Returns the number of bits per sample (usually 16 or 32, sometimes 24 or 8) - /// Can be 0 for some codecs - /// - public int BitsPerSample => bitsPerSample; - - /// - /// Returns the number of extra bytes used by this waveformat. Often 0, - /// except for compressed formats which store extra data after the WAVEFORMATEX header - /// - public int ExtraSize => extraSize; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormat.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormat.cs.meta deleted file mode 100644 index 39bb562..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 425e4952fadfbd943875aba1c01f72ab -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatCustomMarshaler.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatCustomMarshaler.cs deleted file mode 100644 index bb84d19..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatCustomMarshaler.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Custom marshaller for WaveFormat structures - /// - public sealed class WaveFormatCustomMarshaler : ICustomMarshaler - { - private static WaveFormatCustomMarshaler marshaler = null; - - /// - /// Gets the instance of this marshaller - /// - /// - /// - public static ICustomMarshaler GetInstance(string cookie) - { - if (marshaler == null) - { - marshaler = new WaveFormatCustomMarshaler(); - } - return marshaler; - } - - /// - /// Clean up managed data - /// - public void CleanUpManagedData(object ManagedObj) - { - - } - - /// - /// Clean up native data - /// - /// - public void CleanUpNativeData(IntPtr pNativeData) - { - Marshal.FreeHGlobal(pNativeData); - } - - /// - /// Get native data size - /// - public int GetNativeDataSize() - { - throw new NotImplementedException(); - } - - /// - /// Marshal managed to native - /// - public IntPtr MarshalManagedToNative(object ManagedObj) - { - return WaveFormat.MarshalToPtr((WaveFormat)ManagedObj); - } - - /// - /// Marshal Native to Managed - /// - public object MarshalNativeToManaged(IntPtr pNativeData) - { - return WaveFormat.MarshalFromPtr(pNativeData); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatCustomMarshaler.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatCustomMarshaler.cs.meta deleted file mode 100644 index 1c2cdc0..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatCustomMarshaler.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e576febe6b421ab459cbd765720b6be9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatEncoding.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatEncoding.cs deleted file mode 100644 index e1542db..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatEncoding.cs +++ /dev/null @@ -1,434 +0,0 @@ -using System; - -namespace NAudio.Wave -{ - /// - /// Summary description for WaveFormatEncoding. - /// - public enum WaveFormatEncoding : ushort - { - /// WAVE_FORMAT_UNKNOWN, Microsoft Corporation - Unknown = 0x0000, - - /// WAVE_FORMAT_PCM Microsoft Corporation - Pcm = 0x0001, - - /// WAVE_FORMAT_ADPCM Microsoft Corporation - Adpcm = 0x0002, - - /// WAVE_FORMAT_IEEE_FLOAT Microsoft Corporation - IeeeFloat = 0x0003, - - /// WAVE_FORMAT_VSELP Compaq Computer Corp. - Vselp = 0x0004, - - /// WAVE_FORMAT_IBM_CVSD IBM Corporation - IbmCvsd = 0x0005, - - /// WAVE_FORMAT_ALAW Microsoft Corporation - ALaw = 0x0006, - - /// WAVE_FORMAT_MULAW Microsoft Corporation - MuLaw = 0x0007, - - /// WAVE_FORMAT_DTS Microsoft Corporation - Dts = 0x0008, - - /// WAVE_FORMAT_DRM Microsoft Corporation - Drm = 0x0009, - - /// WAVE_FORMAT_WMAVOICE9 - WmaVoice9 = 0x000A, - - /// WAVE_FORMAT_OKI_ADPCM OKI - OkiAdpcm = 0x0010, - - /// WAVE_FORMAT_DVI_ADPCM Intel Corporation - DviAdpcm = 0x0011, - - /// WAVE_FORMAT_IMA_ADPCM Intel Corporation - ImaAdpcm = DviAdpcm, - - /// WAVE_FORMAT_MEDIASPACE_ADPCM Videologic - MediaspaceAdpcm = 0x0012, - - /// WAVE_FORMAT_SIERRA_ADPCM Sierra Semiconductor Corp - SierraAdpcm = 0x0013, - - /// WAVE_FORMAT_G723_ADPCM Antex Electronics Corporation - G723Adpcm = 0x0014, - - /// WAVE_FORMAT_DIGISTD DSP Solutions, Inc. - DigiStd = 0x0015, - - /// WAVE_FORMAT_DIGIFIX DSP Solutions, Inc. - DigiFix = 0x0016, - - /// WAVE_FORMAT_DIALOGIC_OKI_ADPCM Dialogic Corporation - DialogicOkiAdpcm = 0x0017, - - /// WAVE_FORMAT_MEDIAVISION_ADPCM Media Vision, Inc. - MediaVisionAdpcm = 0x0018, - - /// WAVE_FORMAT_CU_CODEC Hewlett-Packard Company - CUCodec = 0x0019, - - /// WAVE_FORMAT_YAMAHA_ADPCM Yamaha Corporation of America - YamahaAdpcm = 0x0020, - - /// WAVE_FORMAT_SONARC Speech Compression - SonarC = 0x0021, - - /// WAVE_FORMAT_DSPGROUP_TRUESPEECH DSP Group, Inc - DspGroupTrueSpeech = 0x0022, - - /// WAVE_FORMAT_ECHOSC1 Echo Speech Corporation - EchoSpeechCorporation1 = 0x0023, - - /// WAVE_FORMAT_AUDIOFILE_AF36, Virtual Music, Inc. - AudioFileAf36 = 0x0024, - - /// WAVE_FORMAT_APTX Audio Processing Technology - Aptx = 0x0025, - - /// WAVE_FORMAT_AUDIOFILE_AF10, Virtual Music, Inc. - AudioFileAf10 = 0x0026, - - /// WAVE_FORMAT_PROSODY_1612, Aculab plc - Prosody1612 = 0x0027, - - /// WAVE_FORMAT_LRC, Merging Technologies S.A. - Lrc = 0x0028, - - /// WAVE_FORMAT_DOLBY_AC2, Dolby Laboratories - DolbyAc2 = 0x0030, - - /// WAVE_FORMAT_GSM610, Microsoft Corporation - Gsm610 = 0x0031, - - /// WAVE_FORMAT_MSNAUDIO, Microsoft Corporation - MsnAudio = 0x0032, - - /// WAVE_FORMAT_ANTEX_ADPCME, Antex Electronics Corporation - AntexAdpcme = 0x0033, - - /// WAVE_FORMAT_CONTROL_RES_VQLPC, Control Resources Limited - ControlResVqlpc = 0x0034, - - /// WAVE_FORMAT_DIGIREAL, DSP Solutions, Inc. - DigiReal = 0x0035, - - /// WAVE_FORMAT_DIGIADPCM, DSP Solutions, Inc. - DigiAdpcm = 0x0036, - - /// WAVE_FORMAT_CONTROL_RES_CR10, Control Resources Limited - ControlResCr10 = 0x0037, - - /// - WAVE_FORMAT_NMS_VBXADPCM = 0x0038, // Natural MicroSystems - /// - WAVE_FORMAT_CS_IMAADPCM = 0x0039, // Crystal Semiconductor IMA ADPCM - /// - WAVE_FORMAT_ECHOSC3 = 0x003A, // Echo Speech Corporation - /// - WAVE_FORMAT_ROCKWELL_ADPCM = 0x003B, // Rockwell International - /// - WAVE_FORMAT_ROCKWELL_DIGITALK = 0x003C, // Rockwell International - /// - WAVE_FORMAT_XEBEC = 0x003D, // Xebec Multimedia Solutions Limited - /// - WAVE_FORMAT_G721_ADPCM = 0x0040, // Antex Electronics Corporation - /// - WAVE_FORMAT_G728_CELP = 0x0041, // Antex Electronics Corporation - /// - WAVE_FORMAT_MSG723 = 0x0042, // Microsoft Corporation - /// WAVE_FORMAT_MPEG, Microsoft Corporation - Mpeg = 0x0050, - - /// - WAVE_FORMAT_RT24 = 0x0052, // InSoft, Inc. - /// - WAVE_FORMAT_PAC = 0x0053, // InSoft, Inc. - /// WAVE_FORMAT_MPEGLAYER3, ISO/MPEG Layer3 Format Tag - MpegLayer3 = 0x0055, - - /// - WAVE_FORMAT_LUCENT_G723 = 0x0059, // Lucent Technologies - /// - WAVE_FORMAT_CIRRUS = 0x0060, // Cirrus Logic - /// - WAVE_FORMAT_ESPCM = 0x0061, // ESS Technology - /// - WAVE_FORMAT_VOXWARE = 0x0062, // Voxware Inc - /// - WAVE_FORMAT_CANOPUS_ATRAC = 0x0063, // Canopus, co., Ltd. - /// - WAVE_FORMAT_G726_ADPCM = 0x0064, // APICOM - /// - WAVE_FORMAT_G722_ADPCM = 0x0065, // APICOM - /// - WAVE_FORMAT_DSAT_DISPLAY = 0x0067, // Microsoft Corporation - /// - WAVE_FORMAT_VOXWARE_BYTE_ALIGNED = 0x0069, // Voxware Inc - /// - WAVE_FORMAT_VOXWARE_AC8 = 0x0070, // Voxware Inc - /// - WAVE_FORMAT_VOXWARE_AC10 = 0x0071, // Voxware Inc - /// - WAVE_FORMAT_VOXWARE_AC16 = 0x0072, // Voxware Inc - /// - WAVE_FORMAT_VOXWARE_AC20 = 0x0073, // Voxware Inc - /// - WAVE_FORMAT_VOXWARE_RT24 = 0x0074, // Voxware Inc - /// - WAVE_FORMAT_VOXWARE_RT29 = 0x0075, // Voxware Inc - /// - WAVE_FORMAT_VOXWARE_RT29HW = 0x0076, // Voxware Inc - /// - WAVE_FORMAT_VOXWARE_VR12 = 0x0077, // Voxware Inc - /// - WAVE_FORMAT_VOXWARE_VR18 = 0x0078, // Voxware Inc - /// - WAVE_FORMAT_VOXWARE_TQ40 = 0x0079, // Voxware Inc - /// - WAVE_FORMAT_SOFTSOUND = 0x0080, // Softsound, Ltd. - /// - WAVE_FORMAT_VOXWARE_TQ60 = 0x0081, // Voxware Inc - /// - WAVE_FORMAT_MSRT24 = 0x0082, // Microsoft Corporation - /// - WAVE_FORMAT_G729A = 0x0083, // AT&T Labs, Inc. - /// - WAVE_FORMAT_MVI_MVI2 = 0x0084, // Motion Pixels - /// - WAVE_FORMAT_DF_G726 = 0x0085, // DataFusion Systems (Pty) (Ltd) - /// - WAVE_FORMAT_DF_GSM610 = 0x0086, // DataFusion Systems (Pty) (Ltd) - /// - WAVE_FORMAT_ISIAUDIO = 0x0088, // Iterated Systems, Inc. - /// - WAVE_FORMAT_ONLIVE = 0x0089, // OnLive! Technologies, Inc. - /// - WAVE_FORMAT_SBC24 = 0x0091, // Siemens Business Communications Sys - /// - WAVE_FORMAT_DOLBY_AC3_SPDIF = 0x0092, // Sonic Foundry - /// - WAVE_FORMAT_MEDIASONIC_G723 = 0x0093, // MediaSonic - /// - WAVE_FORMAT_PROSODY_8KBPS = 0x0094, // Aculab plc - /// - WAVE_FORMAT_ZYXEL_ADPCM = 0x0097, // ZyXEL Communications, Inc. - /// - WAVE_FORMAT_PHILIPS_LPCBB = 0x0098, // Philips Speech Processing - /// - WAVE_FORMAT_PACKED = 0x0099, // Studer Professional Audio AG - /// - WAVE_FORMAT_MALDEN_PHONYTALK = 0x00A0, // Malden Electronics Ltd. - /// WAVE_FORMAT_GSM - Gsm = 0x00A1, - - /// WAVE_FORMAT_G729 - G729 = 0x00A2, - - /// WAVE_FORMAT_G723 - G723 = 0x00A3, - - /// WAVE_FORMAT_ACELP - Acelp = 0x00A4, - - /// - /// WAVE_FORMAT_RAW_AAC1 - /// - RawAac = 0x00FF, - /// - WAVE_FORMAT_RHETOREX_ADPCM = 0x0100, // Rhetorex Inc. - /// - WAVE_FORMAT_IRAT = 0x0101, // BeCubed Software Inc. - /// - WAVE_FORMAT_VIVO_G723 = 0x0111, // Vivo Software - /// - WAVE_FORMAT_VIVO_SIREN = 0x0112, // Vivo Software - /// - WAVE_FORMAT_DIGITAL_G723 = 0x0123, // Digital Equipment Corporation - /// - WAVE_FORMAT_SANYO_LD_ADPCM = 0x0125, // Sanyo Electric Co., Ltd. - /// - WAVE_FORMAT_SIPROLAB_ACEPLNET = 0x0130, // Sipro Lab Telecom Inc. - /// - WAVE_FORMAT_SIPROLAB_ACELP4800 = 0x0131, // Sipro Lab Telecom Inc. - /// - WAVE_FORMAT_SIPROLAB_ACELP8V3 = 0x0132, // Sipro Lab Telecom Inc. - /// - WAVE_FORMAT_SIPROLAB_G729 = 0x0133, // Sipro Lab Telecom Inc. - /// - WAVE_FORMAT_SIPROLAB_G729A = 0x0134, // Sipro Lab Telecom Inc. - /// - WAVE_FORMAT_SIPROLAB_KELVIN = 0x0135, // Sipro Lab Telecom Inc. - /// - WAVE_FORMAT_G726ADPCM = 0x0140, // Dictaphone Corporation - /// - WAVE_FORMAT_QUALCOMM_PUREVOICE = 0x0150, // Qualcomm, Inc. - /// - WAVE_FORMAT_QUALCOMM_HALFRATE = 0x0151, // Qualcomm, Inc. - /// - WAVE_FORMAT_TUBGSM = 0x0155, // Ring Zero Systems, Inc. - /// - WAVE_FORMAT_MSAUDIO1 = 0x0160, // Microsoft Corporation - /// - /// Windows Media Audio, WAVE_FORMAT_WMAUDIO2, Microsoft Corporation - /// - WindowsMediaAudio = 0x0161, - - /// - /// Windows Media Audio Professional WAVE_FORMAT_WMAUDIO3, Microsoft Corporation - /// - WindowsMediaAudioProfessional = 0x0162, - - /// - /// Windows Media Audio Lossless, WAVE_FORMAT_WMAUDIO_LOSSLESS - /// - WindowsMediaAudioLosseless = 0x0163, - - /// - /// Windows Media Audio Professional over SPDIF WAVE_FORMAT_WMASPDIF (0x0164) - /// - WindowsMediaAudioSpdif = 0x0164, - - /// - WAVE_FORMAT_UNISYS_NAP_ADPCM = 0x0170, // Unisys Corp. - /// - WAVE_FORMAT_UNISYS_NAP_ULAW = 0x0171, // Unisys Corp. - /// - WAVE_FORMAT_UNISYS_NAP_ALAW = 0x0172, // Unisys Corp. - /// - WAVE_FORMAT_UNISYS_NAP_16K = 0x0173, // Unisys Corp. - /// - WAVE_FORMAT_CREATIVE_ADPCM = 0x0200, // Creative Labs, Inc - /// - WAVE_FORMAT_CREATIVE_FASTSPEECH8 = 0x0202, // Creative Labs, Inc - /// - WAVE_FORMAT_CREATIVE_FASTSPEECH10 = 0x0203, // Creative Labs, Inc - /// - WAVE_FORMAT_UHER_ADPCM = 0x0210, // UHER informatic GmbH - /// - WAVE_FORMAT_QUARTERDECK = 0x0220, // Quarterdeck Corporation - /// - WAVE_FORMAT_ILINK_VC = 0x0230, // I-link Worldwide - /// - WAVE_FORMAT_RAW_SPORT = 0x0240, // Aureal Semiconductor - /// - WAVE_FORMAT_ESST_AC3 = 0x0241, // ESS Technology, Inc. - /// - WAVE_FORMAT_IPI_HSX = 0x0250, // Interactive Products, Inc. - /// - WAVE_FORMAT_IPI_RPELP = 0x0251, // Interactive Products, Inc. - /// - WAVE_FORMAT_CS2 = 0x0260, // Consistent Software - /// - WAVE_FORMAT_SONY_SCX = 0x0270, // Sony Corp. - /// - WAVE_FORMAT_FM_TOWNS_SND = 0x0300, // Fujitsu Corp. - /// - WAVE_FORMAT_BTV_DIGITAL = 0x0400, // Brooktree Corporation - /// - WAVE_FORMAT_QDESIGN_MUSIC = 0x0450, // QDesign Corporation - /// - WAVE_FORMAT_VME_VMPCM = 0x0680, // AT&T Labs, Inc. - /// - WAVE_FORMAT_TPC = 0x0681, // AT&T Labs, Inc. - /// - WAVE_FORMAT_OLIGSM = 0x1000, // Ing C. Olivetti & C., S.p.A. - /// - WAVE_FORMAT_OLIADPCM = 0x1001, // Ing C. Olivetti & C., S.p.A. - /// - WAVE_FORMAT_OLICELP = 0x1002, // Ing C. Olivetti & C., S.p.A. - /// - WAVE_FORMAT_OLISBC = 0x1003, // Ing C. Olivetti & C., S.p.A. - /// - WAVE_FORMAT_OLIOPR = 0x1004, // Ing C. Olivetti & C., S.p.A. - /// - WAVE_FORMAT_LH_CODEC = 0x1100, // Lernout & Hauspie - /// - WAVE_FORMAT_NORRIS = 0x1400, // Norris Communications, Inc. - /// - WAVE_FORMAT_SOUNDSPACE_MUSICOMPRESS = 0x1500, // AT&T Labs, Inc. - - /// - /// Advanced Audio Coding (AAC) audio in Audio Data Transport Stream (ADTS) format. - /// The format block is a WAVEFORMATEX structure with wFormatTag equal to WAVE_FORMAT_MPEG_ADTS_AAC. - /// - /// - /// The WAVEFORMATEX structure specifies the core AAC-LC sample rate and number of channels, - /// prior to applying spectral band replication (SBR) or parametric stereo (PS) tools, if present. - /// No additional data is required after the WAVEFORMATEX structure. - /// - /// http://msdn.microsoft.com/en-us/library/dd317599%28VS.85%29.aspx - MPEG_ADTS_AAC = 0x1600, - - /// - /// Source wmCodec.h - MPEG_RAW_AAC = 0x1601, - - /// - /// MPEG-4 audio transport stream with a synchronization layer (LOAS) and a multiplex layer (LATM). - /// The format block is a WAVEFORMATEX structure with wFormatTag equal to WAVE_FORMAT_MPEG_LOAS. - /// - /// - /// The WAVEFORMATEX structure specifies the core AAC-LC sample rate and number of channels, - /// prior to applying spectral SBR or PS tools, if present. - /// No additional data is required after the WAVEFORMATEX structure. - /// - /// http://msdn.microsoft.com/en-us/library/dd317599%28VS.85%29.aspx - MPEG_LOAS = 0x1602, - - /// NOKIA_MPEG_ADTS_AAC - /// Source wmCodec.h - NOKIA_MPEG_ADTS_AAC = 0x1608, - - /// NOKIA_MPEG_RAW_AAC - /// Source wmCodec.h - NOKIA_MPEG_RAW_AAC = 0x1609, - - /// VODAFONE_MPEG_ADTS_AAC - /// Source wmCodec.h - VODAFONE_MPEG_ADTS_AAC = 0x160A, - - /// VODAFONE_MPEG_RAW_AAC - /// Source wmCodec.h - VODAFONE_MPEG_RAW_AAC = 0x160B, - - /// - /// High-Efficiency Advanced Audio Coding (HE-AAC) stream. - /// The format block is an HEAACWAVEFORMAT structure. - /// - /// http://msdn.microsoft.com/en-us/library/dd317599%28VS.85%29.aspx - MPEG_HEAAC = 0x1610, - - /// WAVE_FORMAT_DVM - WAVE_FORMAT_DVM = 0x2000, // FAST Multimedia AG - - // others - not from MS headers - /// WAVE_FORMAT_VORBIS1 "Og" Original stream compatible - Vorbis1 = 0x674f, - - /// WAVE_FORMAT_VORBIS2 "Pg" Have independent header - Vorbis2 = 0x6750, - - /// WAVE_FORMAT_VORBIS3 "Qg" Have no codebook header - Vorbis3 = 0x6751, - - /// WAVE_FORMAT_VORBIS1P "og" Original stream compatible - Vorbis1P = 0x676f, - - /// WAVE_FORMAT_VORBIS2P "pg" Have independent headere - Vorbis2P = 0x6770, - - /// WAVE_FORMAT_VORBIS3P "qg" Have no codebook header - Vorbis3P = 0x6771, - - /// WAVE_FORMAT_EXTENSIBLE - Extensible = 0xFFFE, // Microsoft - /// - WAVE_FORMAT_DEVELOPMENT = 0xFFFF, - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatEncoding.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatEncoding.cs.meta deleted file mode 100644 index f4d0069..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatEncoding.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ced14ceb8f432ec478cbca0dac2b9f40 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtensible.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtensible.cs deleted file mode 100644 index 5ab3225..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtensible.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; -using NAudio.Dmo; - -namespace NAudio.Wave -{ - /// - /// WaveFormatExtensible - /// http://www.microsoft.com/whdc/device/audio/multichaud.mspx - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 2)] - public class WaveFormatExtensible : WaveFormat - { - short wValidBitsPerSample; // bits of precision, or is wSamplesPerBlock if wBitsPerSample==0 - int dwChannelMask; // which channels are present in stream - Guid subFormat; - - /// - /// Parameterless constructor for marshalling - /// - WaveFormatExtensible() - { - } - - /// - /// Creates a new WaveFormatExtensible for PCM or IEEE - /// - public WaveFormatExtensible(int rate, int bits, int channels) - : base(rate, bits, channels) - { - waveFormatTag = WaveFormatEncoding.Extensible; - extraSize = 22; - wValidBitsPerSample = (short) bits; - for (int n = 0; n < channels; n++) - { - dwChannelMask |= (1 << n); - } - if (bits == 32) - { - // KSDATAFORMAT_SUBTYPE_IEEE_FLOAT - subFormat = AudioMediaSubtypes.MEDIASUBTYPE_IEEE_FLOAT; - } - else - { - // KSDATAFORMAT_SUBTYPE_PCM - subFormat = AudioMediaSubtypes.MEDIASUBTYPE_PCM; - } - - } - - /// - /// WaveFormatExtensible for PCM or floating point can be awkward to work with - /// This creates a regular WaveFormat structure representing the same audio format - /// Returns the WaveFormat unchanged for non PCM or IEEE float - /// - /// - public WaveFormat ToStandardWaveFormat() - { - if (subFormat == AudioMediaSubtypes.MEDIASUBTYPE_IEEE_FLOAT && bitsPerSample == 32) - return CreateIeeeFloatWaveFormat(sampleRate, channels); - if (subFormat == AudioMediaSubtypes.MEDIASUBTYPE_PCM) - return new WaveFormat(sampleRate,bitsPerSample,channels); - return this; - //throw new InvalidOperationException("Not a recognised PCM or IEEE float format"); - } - - /// - /// SubFormat (may be one of AudioMediaSubtypes) - /// - public Guid SubFormat { get { return subFormat; } } - - /// - /// Serialize - /// - /// - public override void Serialize(System.IO.BinaryWriter writer) - { - base.Serialize(writer); - writer.Write(wValidBitsPerSample); - writer.Write(dwChannelMask); - byte[] guid = subFormat.ToByteArray(); - writer.Write(guid, 0, guid.Length); - } - - /// - /// String representation - /// - public override string ToString() - { - return String.Format("{0} wBitsPerSample:{1} dwChannelMask:{2} subFormat:{3} extraSize:{4}", - base.ToString(), - wValidBitsPerSample, - dwChannelMask, - subFormat, - extraSize); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtensible.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtensible.cs.meta deleted file mode 100644 index 610b0d6..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtensible.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e7fa0b466540a5e46a9a292d62a4075e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtraData.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtraData.cs deleted file mode 100644 index de882e5..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtraData.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.IO; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// This class used for marshalling from unmanaged code - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 2)] - public class WaveFormatExtraData : WaveFormat - { - // try with 100 bytes for now, increase if necessary - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 100)] - private byte[] extraData = new byte[100]; - - /// - /// Allows the extra data to be read - /// - public byte[] ExtraData => extraData; - - /// - /// parameterless constructor for marshalling - /// - internal WaveFormatExtraData() - { - } - - /// - /// Reads this structure from a BinaryReader - /// - public WaveFormatExtraData(BinaryReader reader) - : base(reader) - { - ReadExtraData(reader); - } - - internal void ReadExtraData(BinaryReader reader) - { - if (this.extraSize > 0) - { - reader.Read(extraData, 0, extraSize); - } - } - - /// - /// Writes this structure to a BinaryWriter - /// - public override void Serialize(BinaryWriter writer) - { - base.Serialize(writer); - if (extraSize > 0) - { - writer.Write(extraData, 0, extraSize); - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtraData.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtraData.cs.meta deleted file mode 100644 index 18c1e4f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WaveFormatExtraData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9b8a091c66a41bb47887762c5e6d51d9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WmaWaveFormat.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WmaWaveFormat.cs deleted file mode 100644 index 3b75fb6..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WmaWaveFormat.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.InteropServices; - -namespace NAudio.Wave.WaveFormats -{ - /// - /// The WMA wave format. - /// May not be much use because WMA codec is a DirectShow DMO not an ACM - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 2)] - class WmaWaveFormat : WaveFormat - { - short wValidBitsPerSample; // bits of precision - int dwChannelMask; // which channels are present in stream - int dwReserved1; - int dwReserved2; - short wEncodeOptions; - short wReserved3; - - public WmaWaveFormat(int sampleRate, int bitsPerSample, int channels) - : base(sampleRate,bitsPerSample,channels) - { - wValidBitsPerSample = (short) bitsPerSample; - if (channels == 1) - dwChannelMask = 1; - else if (channels == 2) - dwChannelMask = 3; - - // WMAUDIO3 is Pro - this.waveFormatTag = WaveFormatEncoding.WindowsMediaAudio; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WmaWaveFormat.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WmaWaveFormat.cs.meta deleted file mode 100644 index 272bd59..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveFormats/WmaWaveFormat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 53c79ec94d7f49949b80ff3b27acf60a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs.meta deleted file mode 100644 index f171ed5..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1a90b262927573d4a83a0f76a9a9dbbc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/IWaveIn.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/IWaveIn.cs deleted file mode 100644 index 7209f7f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/IWaveIn.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Generic interface for wave recording - /// - public interface IWaveIn : IDisposable - { - /// - /// Recording WaveFormat - /// - WaveFormat WaveFormat { get; set; } - - /// - /// Start Recording - /// - void StartRecording(); - - /// - /// Stop Recording - /// - void StopRecording(); - - /// - /// Indicates recorded data is available - /// - event EventHandler DataAvailable; - - /// - /// Indicates that all recorded data has now been received. - /// - event EventHandler RecordingStopped; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/IWaveIn.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/IWaveIn.cs.meta deleted file mode 100644 index 136ca8a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/IWaveIn.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: febfbb1eb116c804aaffad344e22a322 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiCapture.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiCapture.cs deleted file mode 100644 index ff0f642..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiCapture.cs +++ /dev/null @@ -1,362 +0,0 @@ -using System; -using NAudio.Wave; -using System.Threading; -using System.Runtime.InteropServices; - -// for consistency this should be in NAudio.Wave namespace, but left as it is for backwards compatibility -// ReSharper disable once CheckNamespace -namespace NAudio.CoreAudioApi -{ - /// - /// Represents state of a capture device - /// - public enum CaptureState - { - /// - /// Not recording - /// - Stopped, - /// - /// Beginning to record - /// - Starting, - /// - /// Recording in progress - /// - Capturing, - /// - /// Requesting stop - /// - Stopping - } - - /// - /// Audio Capture using Wasapi - /// See http://msdn.microsoft.com/en-us/library/dd370800%28VS.85%29.aspx - /// - public class WasapiCapture : IWaveIn - { - private const long ReftimesPerSec = 10000000; - private const long ReftimesPerMillisec = 10000; - private volatile CaptureState captureState; - private byte[] recordBuffer; - private Thread captureThread; - private AudioClient audioClient; - private int bytesPerFrame; - private WaveFormat waveFormat; - private bool initialized; - private readonly SynchronizationContext syncContext; - private readonly bool isUsingEventSync; - private EventWaitHandle frameEventWaitHandle; - private readonly int audioBufferMillisecondsLength; - - /// - /// Indicates recorded data is available - /// - public event EventHandler DataAvailable; - - /// - /// Indicates that all recorded data has now been received. - /// - public event EventHandler RecordingStopped; - - /// - /// Initialises a new instance of the WASAPI capture class - /// - public WasapiCapture() : - this(GetDefaultCaptureDevice()) - { - } - - /// - /// Initialises a new instance of the WASAPI capture class - /// - /// Capture device to use - public WasapiCapture(MMDevice captureDevice) - : this(captureDevice, false) - { - - } - - /// - /// Initializes a new instance of the class. - /// - /// The capture device. - /// true if sync is done with event. false use sleep. - public WasapiCapture(MMDevice captureDevice, bool useEventSync) - : this(captureDevice, useEventSync, 100) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The capture device. - /// true if sync is done with event. false use sleep. - /// Length of the audio buffer in milliseconds. A lower value means lower latency but increased CPU usage. - public WasapiCapture(MMDevice captureDevice, bool useEventSync, int audioBufferMillisecondsLength) - { - syncContext = SynchronizationContext.Current; - audioClient = captureDevice.AudioClient; - ShareMode = AudioClientShareMode.Shared; - isUsingEventSync = useEventSync; - this.audioBufferMillisecondsLength = audioBufferMillisecondsLength; - - waveFormat = audioClient.MixFormat; - - } - - /// - /// Share Mode - set before calling StartRecording - /// - public AudioClientShareMode ShareMode { get; set; } - - /// - /// Current Capturing State - /// - public CaptureState CaptureState { get { return captureState; } } - - /// - /// Capturing wave format - /// - public virtual WaveFormat WaveFormat - { - get - { - // for convenience, return a WAVEFORMATEX, instead of the real - // WAVEFORMATEXTENSIBLE being used - return waveFormat.AsStandardWaveFormat(); - } - set { waveFormat = value; } - } - - /// - /// Gets the default audio capture device - /// - /// The default audio capture device - public static MMDevice GetDefaultCaptureDevice() - { - var devices = new MMDeviceEnumerator(); - return devices.GetDefaultAudioEndpoint(DataFlow.Capture, Role.Console); - } - - private void InitializeCaptureDevice() - { - if (initialized) - return; - - long requestedDuration = ReftimesPerMillisec * audioBufferMillisecondsLength; - - if (!audioClient.IsFormatSupported(ShareMode, waveFormat)) - { - throw new ArgumentException("Unsupported Wave Format"); - } - - var streamFlags = GetAudioClientStreamFlags(); - - // If using EventSync, setup is specific with shareMode - if (isUsingEventSync) - { - // Init Shared or Exclusive - if (ShareMode == AudioClientShareMode.Shared) - { - // With EventCallBack and Shared, both latencies must be set to 0 - audioClient.Initialize(ShareMode, AudioClientStreamFlags.EventCallback | streamFlags, requestedDuration, 0, - waveFormat, Guid.Empty); - } - else - { - // With EventCallBack and Exclusive, both latencies must equals - audioClient.Initialize(ShareMode, AudioClientStreamFlags.EventCallback | streamFlags, requestedDuration, requestedDuration, - waveFormat, Guid.Empty); - } - - // Create the Wait Event Handle - frameEventWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset); - audioClient.SetEventHandle(frameEventWaitHandle.SafeWaitHandle.DangerousGetHandle()); - } - else - { - // Normal setup for both sharedMode - audioClient.Initialize(ShareMode, - streamFlags, - requestedDuration, - 0, - waveFormat, - Guid.Empty); - } - - int bufferFrameCount = audioClient.BufferSize; - bytesPerFrame = waveFormat.Channels * waveFormat.BitsPerSample / 8; - recordBuffer = new byte[bufferFrameCount * bytesPerFrame]; - - //Debug.WriteLine(string.Format("record buffer size = {0}", this.recordBuffer.Length)); - - initialized = true; - } - - /// - /// To allow overrides to specify different flags (e.g. loopback) - /// - protected virtual AudioClientStreamFlags GetAudioClientStreamFlags() - { - return AudioClientStreamFlags.None; - } - - /// - /// Start Capturing - /// - public void StartRecording() - { - if (captureState != CaptureState.Stopped) - { - throw new InvalidOperationException("Previous recording still in progress"); - } - captureState = CaptureState.Starting; - InitializeCaptureDevice(); - ThreadStart start = () => CaptureThread(audioClient); - captureThread = new Thread(start); - captureThread.Start(); - } - - /// - /// Stop Capturing (requests a stop, wait for RecordingStopped event to know it has finished) - /// - public void StopRecording() - { - if (captureState != CaptureState.Stopped) - captureState = CaptureState.Stopping; - } - - private void CaptureThread(AudioClient client) - { - Exception exception = null; - try - { - DoRecording(client); - } - catch (Exception e) - { - exception = e; - } - finally - { - client.Stop(); - // don't dispose - the AudioClient only gets disposed when WasapiCapture is disposed - } - captureThread = null; - captureState = CaptureState.Stopped; - RaiseRecordingStopped(exception); - } - - private void DoRecording(AudioClient client) - { - //Debug.WriteLine(String.Format("Client buffer frame count: {0}", client.BufferSize)); - int bufferFrameCount = client.BufferSize; - - // Calculate the actual duration of the allocated buffer. - long actualDuration = (long)((double)ReftimesPerSec * - bufferFrameCount / waveFormat.SampleRate); - int sleepMilliseconds = (int)(actualDuration / ReftimesPerMillisec / 2); - int waitMilliseconds = (int)(3 * actualDuration / ReftimesPerMillisec); - - var capture = client.AudioCaptureClient; - client.Start(); - captureState = CaptureState.Capturing; - while (captureState == CaptureState.Capturing) - { - bool readBuffer = true; - if (isUsingEventSync) - { - readBuffer = frameEventWaitHandle.WaitOne(waitMilliseconds, false); - } - else - { - Thread.Sleep(sleepMilliseconds); - } - if (captureState != CaptureState.Capturing) - break; - - // If still recording and notification is ok - if (readBuffer) - { - ReadNextPacket(capture); - } - } - } - - private void RaiseRecordingStopped(Exception e) - { - var handler = RecordingStopped; - if (handler == null) return; - if (syncContext == null) - { - handler(this, new StoppedEventArgs(e)); - } - else - { - syncContext.Post(state => handler(this, new StoppedEventArgs(e)), null); - } - } - - private void ReadNextPacket(AudioCaptureClient capture) - { - int packetSize = capture.GetNextPacketSize(); - int recordBufferOffset = 0; - //Debug.WriteLine(string.Format("packet size: {0} samples", packetSize / 4)); - - while (packetSize != 0) - { - int framesAvailable; - AudioClientBufferFlags flags; - IntPtr buffer = capture.GetBuffer(out framesAvailable, out flags); - - int bytesAvailable = framesAvailable * bytesPerFrame; - - // apparently it is sometimes possible to read more frames than we were expecting? - // fix suggested by Michael Feld: - int spaceRemaining = Math.Max(0, recordBuffer.Length - recordBufferOffset); - if (spaceRemaining < bytesAvailable && recordBufferOffset > 0) - { - if (DataAvailable != null) DataAvailable(this, new WaveInEventArgs(recordBuffer, recordBufferOffset)); - recordBufferOffset = 0; - } - - // if not silence... - if ((flags & AudioClientBufferFlags.Silent) != AudioClientBufferFlags.Silent) - { - Marshal.Copy(buffer, recordBuffer, recordBufferOffset, bytesAvailable); - } - else - { - Array.Clear(recordBuffer, recordBufferOffset, bytesAvailable); - } - recordBufferOffset += bytesAvailable; - capture.ReleaseBuffer(framesAvailable); - packetSize = capture.GetNextPacketSize(); - } - if (DataAvailable != null) - { - DataAvailable(this, new WaveInEventArgs(recordBuffer, recordBufferOffset)); - } - } - - /// - /// Dispose - /// - public void Dispose() - { - StopRecording(); - if (captureThread != null) - { - captureThread.Join(); - captureThread = null; - } - if (audioClient != null) - { - audioClient.Dispose(); - audioClient = null; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiCapture.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiCapture.cs.meta deleted file mode 100644 index 90190b2..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiCapture.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d5e4c87a4c3f811449ec91da98ae3752 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiLoopbackCapture.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiLoopbackCapture.cs deleted file mode 100644 index 65dc024..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiLoopbackCapture.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using NAudio.CoreAudioApi; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// WASAPI Loopback Capture - /// based on a contribution from "Pygmy" - http://naudio.codeplex.com/discussions/203605 - /// - public class WasapiLoopbackCapture : WasapiCapture - { - /// - /// Initialises a new instance of the WASAPI capture class - /// - public WasapiLoopbackCapture() : - this(GetDefaultLoopbackCaptureDevice()) - { - } - - /// - /// Initialises a new instance of the WASAPI capture class - /// - /// Capture device to use - public WasapiLoopbackCapture(MMDevice captureDevice) : - base(captureDevice) - { - } - - /// - /// Gets the default audio loopback capture device - /// - /// The default audio loopback capture device - public static MMDevice GetDefaultLoopbackCaptureDevice() - { - MMDeviceEnumerator devices = new MMDeviceEnumerator(); - return devices.GetDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia); - } - - /// - /// Capturing wave format - /// - public override WaveFormat WaveFormat - { - get { return base.WaveFormat; } - set { throw new InvalidOperationException("WaveFormat cannot be set for WASAPI Loopback Capture"); } - } - - /// - /// Specify loopback - /// - protected override AudioClientStreamFlags GetAudioClientStreamFlags() - { - return AudioClientStreamFlags.Loopback; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiLoopbackCapture.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiLoopbackCapture.cs.meta deleted file mode 100644 index 67cf0b8..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WasapiLoopbackCapture.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3b19748c6f7c5be408a3823c78fd2d80 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveIn.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveIn.cs deleted file mode 100644 index d1c7631..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveIn.cs +++ /dev/null @@ -1,303 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Threading; -using NAudio.Mixer; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Allows recording using the Windows waveIn APIs - /// Events are raised as recorded buffers are made available - /// - public class WaveIn : IWaveIn - { - private IntPtr waveInHandle; - private volatile bool recording; - private WaveInBuffer[] buffers; - private readonly WaveInterop.WaveCallback callback; - private WaveCallbackInfo callbackInfo; - private readonly SynchronizationContext syncContext; - private int lastReturnedBufferIndex; - /// - /// Indicates recorded data is available - /// - public event EventHandler DataAvailable; - - /// - /// Indicates that all recorded data has now been received. - /// - public event EventHandler RecordingStopped; - - /// - /// Prepares a Wave input device for recording - /// - public WaveIn() - : this(WaveCallbackInfo.NewWindow()) - { - - } - - /// - /// Creates a WaveIn device using the specified window handle for callbacks - /// - /// A valid window handle - public WaveIn(IntPtr windowHandle) - : this(WaveCallbackInfo.ExistingWindow(windowHandle)) - { - - } - - /// - /// Prepares a Wave input device for recording - /// - public WaveIn(WaveCallbackInfo callbackInfo) - { - syncContext = SynchronizationContext.Current; - if ((callbackInfo.Strategy == WaveCallbackStrategy.NewWindow || callbackInfo.Strategy == WaveCallbackStrategy.ExistingWindow) && - syncContext == null) - { - throw new InvalidOperationException("Use WaveInEvent to record on a background thread"); - } - DeviceNumber = 0; - WaveFormat = new WaveFormat(8000, 16, 1); - BufferMilliseconds = 100; - NumberOfBuffers = 3; - callback = Callback; - this.callbackInfo = callbackInfo; - callbackInfo.Connect(callback); - } - - /// - /// Returns the number of Wave In devices available in the system - /// - public static int DeviceCount - { - get - { - return WaveInterop.waveInGetNumDevs(); - } - } - - /// - /// Retrieves the capabilities of a waveIn device - /// - /// Device to test - /// The WaveIn device capabilities - public static WaveInCapabilities GetCapabilities(int devNumber) - { - var caps = new WaveInCapabilities(); - int structSize = Marshal.SizeOf(caps); - MmException.Try(WaveInterop.waveInGetDevCaps((IntPtr)devNumber, out caps, structSize), "waveInGetDevCaps"); - return caps; - } - - /// - /// Milliseconds for the buffer. Recommended value is 100ms - /// - public int BufferMilliseconds { get; set; } - - /// - /// Number of Buffers to use (usually 2 or 3) - /// - public int NumberOfBuffers { get; set; } - - /// - /// The device number to use - /// - public int DeviceNumber { get; set; } - - private void CreateBuffers() - { - // Default to three buffers of 100ms each - int bufferSize = BufferMilliseconds * WaveFormat.AverageBytesPerSecond / 1000; - if (bufferSize % WaveFormat.BlockAlign != 0) - { - bufferSize -= bufferSize % WaveFormat.BlockAlign; - } - - buffers = new WaveInBuffer[NumberOfBuffers]; - for (int n = 0; n < buffers.Length; n++) - { - buffers[n] = new WaveInBuffer(waveInHandle, bufferSize); - } - } - - /// - /// Called when we get a new buffer of recorded data - /// - private void Callback(IntPtr waveInHandle, WaveInterop.WaveMessage message, IntPtr userData, WaveHeader waveHeader, IntPtr reserved) - { - if (message == WaveInterop.WaveMessage.WaveInData) - { - if (recording) - { - var hBuffer = (GCHandle)waveHeader.userData; - var buffer = (WaveInBuffer)hBuffer.Target; - if (buffer == null) return; - - lastReturnedBufferIndex = Array.IndexOf(buffers, buffer); - RaiseDataAvailable(buffer); - try - { - buffer.Reuse(); - } - catch (Exception e) - { - recording = false; - RaiseRecordingStopped(e); - } - } - - } - } - - private void RaiseDataAvailable(WaveInBuffer buffer) - { - DataAvailable?.Invoke(this, new WaveInEventArgs(buffer.Data, buffer.BytesRecorded)); - } - - private void RaiseRecordingStopped(Exception e) - { - var handler = RecordingStopped; - if (handler != null) - { - if (syncContext == null) - { - handler(this, new StoppedEventArgs(e)); - } - else - { - syncContext.Post(state => handler(this, new StoppedEventArgs(e)), null); - } - } - } - - private void OpenWaveInDevice() - { - CloseWaveInDevice(); - MmResult result = callbackInfo.WaveInOpen(out waveInHandle, DeviceNumber, WaveFormat, callback); - MmException.Try(result, "waveInOpen"); - CreateBuffers(); - } - - /// - /// Start recording - /// - public void StartRecording() - { - if (recording) - { - throw new InvalidOperationException("Already recording"); - } - OpenWaveInDevice(); - EnqueueBuffers(); - MmException.Try(WaveInterop.waveInStart(waveInHandle), "waveInStart"); - recording = true; - } - - private void EnqueueBuffers() - { - foreach (var buffer in buffers) - { - if (!buffer.InQueue) - { - buffer.Reuse(); - } - } - } - - /// - /// Stop recording - /// - public void StopRecording() - { - if (recording) - { - recording = false; - MmException.Try(WaveInterop.waveInStop(waveInHandle), "waveInStop"); - // report the last buffers, sometimes more than one, so taking care to report them in the right order - for (int n = 0; n < buffers.Length; n++) - { - int index = (n + lastReturnedBufferIndex + 1)%buffers.Length; - var buffer = buffers[index]; - if (buffer.Done) - { - RaiseDataAvailable(buffer); - } - } - RaiseRecordingStopped(null); - } - //MmException.Try(WaveInterop.waveInReset(waveInHandle), "waveInReset"); - // Don't actually close yet so we get the last buffer - } - - /// - /// WaveFormat we are recording in - /// - public WaveFormat WaveFormat { get; set; } - - /// - /// Dispose pattern - /// - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - if (recording) - StopRecording(); - CloseWaveInDevice(); - if (callbackInfo != null) - { - callbackInfo.Disconnect(); - callbackInfo = null; - } - } - } - - private void CloseWaveInDevice() - { - if (waveInHandle == IntPtr.Zero) return; - // Some drivers need the reset to properly release buffers - WaveInterop.waveInReset(waveInHandle); - if (buffers != null) - { - for (int n = 0; n < buffers.Length; n++) - { - buffers[n].Dispose(); - } - buffers = null; - } - WaveInterop.waveInClose(waveInHandle); - waveInHandle = IntPtr.Zero; - - } - - /// - /// Microphone Level - /// - public MixerLine GetMixerLine() - { - // TODO use mixerGetID instead to see if this helps with XP - MixerLine mixerLine; - if (waveInHandle != IntPtr.Zero) - { - mixerLine = new MixerLine(waveInHandle, 0, MixerFlags.WaveInHandle); - } - else - { - mixerLine = new MixerLine((IntPtr)DeviceNumber, 0, MixerFlags.WaveIn); - } - return mixerLine; - } - - /// - /// Dispose method - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveIn.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveIn.cs.meta deleted file mode 100644 index c3c94f1..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveIn.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a2f415132a4fdf8428a43c3a5d7af573 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveInEvent.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveInEvent.cs deleted file mode 100644 index 0069e1e..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveInEvent.cs +++ /dev/null @@ -1,256 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.Mixer; -using System.Threading; -using NAudio.CoreAudioApi; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Recording using waveIn api with event callbacks. - /// Use this for recording in non-gui applications - /// Events are raised as recorded buffers are made available - /// - public class WaveInEvent : IWaveIn - { - private readonly AutoResetEvent callbackEvent; - private readonly SynchronizationContext syncContext; - private IntPtr waveInHandle; - private volatile CaptureState captureState; - private WaveInBuffer[] buffers; - - /// - /// Indicates recorded data is available - /// - public event EventHandler DataAvailable; - - /// - /// Indicates that all recorded data has now been received. - /// - public event EventHandler RecordingStopped; - - /// - /// Prepares a Wave input device for recording - /// - public WaveInEvent() - { - callbackEvent = new AutoResetEvent(false); - syncContext = SynchronizationContext.Current; - DeviceNumber = 0; - WaveFormat = new WaveFormat(8000, 16, 1); - BufferMilliseconds = 100; - NumberOfBuffers = 3; - captureState = CaptureState.Stopped; - } - - /// - /// Returns the number of Wave In devices available in the system - /// - public static int DeviceCount => WaveInterop.waveInGetNumDevs(); - - /// - /// Retrieves the capabilities of a waveIn device - /// - /// Device to test - /// The WaveIn device capabilities - public static WaveInCapabilities GetCapabilities(int devNumber) - { - WaveInCapabilities caps = new WaveInCapabilities(); - int structSize = Marshal.SizeOf(caps); - MmException.Try(WaveInterop.waveInGetDevCaps((IntPtr)devNumber, out caps, structSize), "waveInGetDevCaps"); - return caps; - } - - /// - /// Milliseconds for the buffer. Recommended value is 100ms - /// - public int BufferMilliseconds { get; set; } - - /// - /// Number of Buffers to use (usually 2 or 3) - /// - public int NumberOfBuffers { get; set; } - - /// - /// The device number to use - /// - public int DeviceNumber { get; set; } - - private void CreateBuffers() - { - // Default to three buffers of 100ms each - int bufferSize = BufferMilliseconds * WaveFormat.AverageBytesPerSecond / 1000; - if (bufferSize % WaveFormat.BlockAlign != 0) - { - bufferSize -= bufferSize % WaveFormat.BlockAlign; - } - - buffers = new WaveInBuffer[NumberOfBuffers]; - for (int n = 0; n < buffers.Length; n++) - { - buffers[n] = new WaveInBuffer(waveInHandle, bufferSize); - } - } - - private void OpenWaveInDevice() - { - CloseWaveInDevice(); - MmResult result = WaveInterop.waveInOpenWindow(out waveInHandle, (IntPtr)DeviceNumber, WaveFormat, - callbackEvent.SafeWaitHandle.DangerousGetHandle(), IntPtr.Zero, WaveInterop.WaveInOutOpenFlags.CallbackEvent); - MmException.Try(result, "waveInOpen"); - CreateBuffers(); - } - - /// - /// Start recording - /// - public void StartRecording() - { - if (captureState != CaptureState.Stopped) - throw new InvalidOperationException("Already recording"); - OpenWaveInDevice(); - MmException.Try(WaveInterop.waveInStart(waveInHandle), "waveInStart"); - captureState = CaptureState.Starting; - ThreadPool.QueueUserWorkItem((state) => RecordThread(), null); - } - - private void RecordThread() - { - Exception exception = null; - try - { - DoRecording(); - } - catch (Exception e) - { - exception = e; - } - finally - { - captureState = CaptureState.Stopped; - RaiseRecordingStoppedEvent(exception); - } - } - - private void DoRecording() - { - captureState = CaptureState.Capturing; - foreach (var buffer in buffers) - { - if (!buffer.InQueue) - { - buffer.Reuse(); - } - } - while (captureState == CaptureState.Capturing) - { - if (callbackEvent.WaitOne()) - { - // requeue any buffers returned to us - foreach (var buffer in buffers) - { - if (buffer.Done) - { - DataAvailable?.Invoke(this, new WaveInEventArgs(buffer.Data, buffer.BytesRecorded)); - if (captureState == CaptureState.Capturing) - { - buffer.Reuse(); - } - } - } - } - } - } - - private void RaiseRecordingStoppedEvent(Exception e) - { - var handler = RecordingStopped; - if (handler != null) - { - if (syncContext == null) - { - handler(this, new StoppedEventArgs(e)); - } - else - { - syncContext.Post(state => handler(this, new StoppedEventArgs(e)), null); - } - } - } - /// - /// Stop recording - /// - public void StopRecording() - { - if (captureState != CaptureState.Stopped) - { - captureState = CaptureState.Stopping; - callbackEvent.Set(); // signal the thread to exit - MmException.Try(WaveInterop.waveInStop(waveInHandle), "waveInStop"); - } - } - - /// - /// WaveFormat we are recording in - /// - public WaveFormat WaveFormat { get; set; } - - /// - /// Dispose pattern - /// - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - if (captureState != CaptureState.Stopped) - StopRecording(); - - CloseWaveInDevice(); - } - } - - private void CloseWaveInDevice() - { - // Some drivers need the reset to properly release buffers - WaveInterop.waveInReset(waveInHandle); - if (buffers != null) - { - for (int n = 0; n < buffers.Length; n++) - { - buffers[n].Dispose(); - } - buffers = null; - } - WaveInterop.waveInClose(waveInHandle); - waveInHandle = IntPtr.Zero; - } - - /// - /// Microphone Level - /// - public MixerLine GetMixerLine() - { - // TODO use mixerGetID instead to see if this helps with XP - MixerLine mixerLine; - if (waveInHandle != IntPtr.Zero) - { - mixerLine = new MixerLine(waveInHandle, 0, MixerFlags.WaveInHandle); - } - else - { - mixerLine = new MixerLine((IntPtr)DeviceNumber, 0, MixerFlags.WaveIn); - } - return mixerLine; - } - - /// - /// Dispose method - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveInEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveInEvent.cs.meta deleted file mode 100644 index 3059dea..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveInputs/WaveInEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 064674cfd1f2b9d40aa66997ad0dfdc4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs.meta deleted file mode 100644 index ad8cead..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 337c00ee407c3df49ae45fcc07906779 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/AiffFileWriter.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/AiffFileWriter.cs deleted file mode 100644 index 757d53c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/AiffFileWriter.cs +++ /dev/null @@ -1,376 +0,0 @@ -using System; -using System.IO; -using NAudio.Utils; - -namespace NAudio.Wave -{ - /// - /// This class writes audio data to a .aif file on disk - /// - public class AiffFileWriter : Stream - { - private Stream outStream; - private BinaryWriter writer; - private long dataSizePos; - private long commSampleCountPos; - private int dataChunkSize = 8; - private WaveFormat format; - private string filename; - - /// - /// Creates an Aiff file by reading all the data from a WaveProvider - /// BEWARE: the WaveProvider MUST return 0 from its Read method when it is finished, - /// or the Aiff File will grow indefinitely. - /// - /// The filename to use - /// The source WaveProvider - public static void CreateAiffFile(string filename, WaveStream sourceProvider) - { - using (var writer = new AiffFileWriter(filename, sourceProvider.WaveFormat)) - { - byte[] buffer = new byte[16384]; - - while (sourceProvider.Position < sourceProvider.Length) - { - int count = Math.Min((int)(sourceProvider.Length - sourceProvider.Position), buffer.Length); - int bytesRead = sourceProvider.Read(buffer, 0, count); - - if (bytesRead == 0) - { - // end of source provider - break; - } - - writer.Write(buffer, 0, bytesRead); - } - } - } - - /// - /// AiffFileWriter that actually writes to a stream - /// - /// Stream to be written to - /// Wave format to use - public AiffFileWriter(Stream outStream, WaveFormat format) - { - this.outStream = outStream; - this.format = format; - this.writer = new BinaryWriter(outStream, System.Text.Encoding.UTF8); - this.writer.Write(System.Text.Encoding.UTF8.GetBytes("FORM")); - this.writer.Write((int)0); // placeholder - this.writer.Write(System.Text.Encoding.UTF8.GetBytes("AIFF")); - - CreateCommChunk(); - WriteSsndChunkHeader(); - } - - /// - /// Creates a new AiffFileWriter - /// - /// The filename to write to - /// The Wave Format of the output data - public AiffFileWriter(string filename, WaveFormat format) - : this(new FileStream(filename, FileMode.Create, FileAccess.Write, FileShare.Read), format) - { - this.filename = filename; - } - - private void WriteSsndChunkHeader() - { - this.writer.Write(System.Text.Encoding.UTF8.GetBytes("SSND")); - dataSizePos = this.outStream.Position; - this.writer.Write((int)0); // placeholder - this.writer.Write((int)0); // zero offset - this.writer.Write(SwapEndian((int)format.BlockAlign)); - } - - private byte[] SwapEndian(short n) - { - return new byte[] { (byte)(n >> 8), (byte)(n & 0xff) }; - } - - private byte[] SwapEndian(int n) - { - return new byte[] { (byte)((n >> 24) & 0xff), (byte)((n >> 16) & 0xff), (byte)((n >> 8) & 0xff), (byte)(n & 0xff), }; - } - - private void CreateCommChunk() - { - this.writer.Write(System.Text.Encoding.UTF8.GetBytes("COMM")); - this.writer.Write(SwapEndian((int)18)); - this.writer.Write(SwapEndian((short)format.Channels)); - commSampleCountPos = this.outStream.Position; ; - this.writer.Write((int)0); // placeholder for total number of samples - this.writer.Write(SwapEndian((short)format.BitsPerSample)); - this.writer.Write(IEEE.ConvertToIeeeExtended(format.SampleRate)); - } - - /// - /// The aiff file name or null if not applicable - /// - public string Filename - { - get { return filename; } - } - - /// - /// Number of bytes of audio in the data chunk - /// - public override long Length - { - get { return dataChunkSize; } - } - - /// - /// WaveFormat of this aiff file - /// - public WaveFormat WaveFormat - { - get { return format; } - } - - /// - /// Returns false: Cannot read from a AiffFileWriter - /// - public override bool CanRead - { - get { return false; } - } - - /// - /// Returns true: Can write to a AiffFileWriter - /// - public override bool CanWrite - { - get { return true; } - } - - /// - /// Returns false: Cannot seek within a AiffFileWriter - /// - public override bool CanSeek - { - get { return false; } - } - - /// - /// Read is not supported for a AiffFileWriter - /// - public override int Read(byte[] buffer, int offset, int count) - { - throw new InvalidOperationException("Cannot read from an AiffFileWriter"); - } - - /// - /// Seek is not supported for a AiffFileWriter - /// - public override long Seek(long offset, SeekOrigin origin) - { - throw new InvalidOperationException("Cannot seek within an AiffFileWriter"); - } - - /// - /// SetLength is not supported for AiffFileWriter - /// - /// - public override void SetLength(long value) - { - throw new InvalidOperationException("Cannot set length of an AiffFileWriter"); - } - - /// - /// Gets the Position in the AiffFile (i.e. number of bytes written so far) - /// - public override long Position - { - get { return dataChunkSize; } - set { throw new InvalidOperationException("Repositioning an AiffFileWriter is not supported"); } - } - - /// - /// Appends bytes to the AiffFile (assumes they are already in the correct format) - /// - /// the buffer containing the wave data - /// the offset from which to start writing - /// the number of bytes to write - public override void Write(byte[] data, int offset, int count) - { - byte[] swappedData = new byte[data.Length]; - - int align = format.BitsPerSample / 8; - - for (int i = 0; i < data.Length; i++) - { - int pos = (int)Math.Floor((double)i / align) * align + (align - (i % align) - 1); - swappedData[i] = data[pos]; - } - - outStream.Write(swappedData, offset, count); - dataChunkSize += count; - } - - private byte[] value24 = new byte[3]; // keep this around to save us creating it every time - - /// - /// Writes a single sample to the Aiff file - /// - /// the sample to write (assumed floating point with 1.0f as max value) - public void WriteSample(float sample) - { - if (WaveFormat.BitsPerSample == 16) - { - writer.Write(SwapEndian((Int16)(Int16.MaxValue * sample))); - dataChunkSize += 2; - } - else if (WaveFormat.BitsPerSample == 24) - { - var value = BitConverter.GetBytes((Int32)(Int32.MaxValue * sample)); - value24[2] = value[1]; - value24[1] = value[2]; - value24[0] = value[3]; - writer.Write(value24); - dataChunkSize += 3; - } - else if (WaveFormat.BitsPerSample == 32 && WaveFormat.Encoding == NAudio.Wave.WaveFormatEncoding.Extensible) - { - writer.Write(SwapEndian(UInt16.MaxValue * (Int32)sample)); - dataChunkSize += 4; - } - else - { - throw new InvalidOperationException("Only 16, 24 or 32 bit PCM or IEEE float audio data supported"); - } - } - - /// - /// Writes 32 bit floating point samples to the Aiff file - /// They will be converted to the appropriate bit depth depending on the WaveFormat of the AIF file - /// - /// The buffer containing the floating point samples - /// The offset from which to start writing - /// The number of floating point samples to write - public void WriteSamples(float[] samples, int offset, int count) - { - for (int n = 0; n < count; n++) - { - WriteSample(samples[offset + n]); - } - } - - /// - /// Writes 16 bit samples to the Aiff file - /// - /// The buffer containing the 16 bit samples - /// The offset from which to start writing - /// The number of 16 bit samples to write - public void WriteSamples(short[] samples, int offset, int count) - { - // 16 bit PCM data - if (WaveFormat.BitsPerSample == 16) - { - for (int sample = 0; sample < count; sample++) - { - writer.Write(SwapEndian(samples[sample + offset])); - } - dataChunkSize += (count * 2); - } - // 24 bit PCM data - else if (WaveFormat.BitsPerSample == 24) - { - byte[] value; - for (int sample = 0; sample < count; sample++) - { - value = BitConverter.GetBytes(UInt16.MaxValue * (Int32)samples[sample + offset]); - value24[2] = value[1]; - value24[1] = value[2]; - value24[0] = value[3]; - writer.Write(value24); - } - dataChunkSize += (count * 3); - } - // 32 bit PCM data - else if (WaveFormat.BitsPerSample == 32 && WaveFormat.Encoding == WaveFormatEncoding.Extensible) - { - for (int sample = 0; sample < count; sample++) - { - writer.Write(SwapEndian(UInt16.MaxValue * (Int32)samples[sample + offset])); - } - dataChunkSize += (count * 4); - } - else - { - throw new InvalidOperationException("Only 16, 24 or 32 bit PCM audio data supported"); - } - } - - /// - /// Ensures data is written to disk - /// - public override void Flush() - { - writer.Flush(); - } - - #region IDisposable Members - - /// - /// Actually performs the close,making sure the header contains the correct data - /// - /// True if called from Dispose - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (outStream != null) - { - try - { - UpdateHeader(writer); - } - finally - { - // in a finally block as we don't want the FileStream to run its disposer in - // the GC thread if the code above caused an IOException (e.g. due to disk full) - outStream.Close(); // will close the underlying base stream - outStream = null; - } - } - } - } - - /// - /// Updates the header with file size information - /// - protected virtual void UpdateHeader(BinaryWriter writer) - { - this.Flush(); - writer.Seek(4, SeekOrigin.Begin); - writer.Write(SwapEndian((int)(outStream.Length - 8))); - UpdateCommChunk(writer); - UpdateSsndChunk(writer); - } - - private void UpdateCommChunk(BinaryWriter writer) - { - writer.Seek((int)commSampleCountPos, SeekOrigin.Begin); - writer.Write(SwapEndian((int)(dataChunkSize * 8 / format.BitsPerSample / format.Channels))); - } - - private void UpdateSsndChunk(BinaryWriter writer) - { - writer.Seek((int)dataSizePos, SeekOrigin.Begin); - writer.Write(SwapEndian((int)dataChunkSize)); - } - - /// - /// Finaliser - should only be called if the user forgot to close this AiffFileWriter - /// - ~AiffFileWriter() - { - System.Diagnostics.Debug.Assert(false, "AiffFileWriter was not disposed"); - Dispose(false); - } - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/AiffFileWriter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/AiffFileWriter.cs.meta deleted file mode 100644 index 681adc5..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/AiffFileWriter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5a3165b9ebc613c43839c7e183b4a2ba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BextChunkInfo.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BextChunkInfo.cs deleted file mode 100644 index afd5495..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BextChunkInfo.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// https://tech.ebu.ch/docs/tech/tech3285.pdf - /// - public class BextChunkInfo - { - /// - /// Constructs a new BextChunkInfo - /// - public BextChunkInfo() - { - //UniqueMaterialIdentifier = Guid.NewGuid().ToString(); - Reserved = new byte[190]; - } - - /// - /// Description (max 256 chars) - /// - public string Description { get; set; } - /// - /// Originator (max 32 chars) - /// - public string Originator { get; set; } - /// - /// Originator Reference (max 32 chars) - /// - public string OriginatorReference { get; set; } - /// - /// Originator Date Time - /// - public DateTime OriginationDateTime { get; set; } - /// - /// Origination Date as string - /// - public string OriginationDate => OriginationDateTime.ToString("yyyy-MM-dd"); - /// - /// Origination as time - /// - public string OriginationTime => OriginationDateTime.ToString("HH:mm:ss"); - /// - /// Time reference (first sample count since midnight) - /// - public long TimeReference { get; set; } - /// - /// version 2 has loudness stuff which we don't know so using version 1 - /// - public ushort Version => 1; - /// - /// 64 bytes http://en.wikipedia.org/wiki/UMID - /// - public string UniqueMaterialIdentifier { get; set; } - /// - /// for version 2 = 180 bytes (10 before are loudness values), using version 1 = 190 bytes - /// - public byte[] Reserved { get; } - /// - /// Coding history arbitrary length string at end of structure - /// http://www.ebu.ch/CMSimages/fr/tec_text_r98-1999_tcm7-4709.pdf - /// A=PCM,F=48000,W=16,M=stereo,T=original,CR/LF - /// - public string CodingHistory { get; set; } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BextChunkInfo.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BextChunkInfo.cs.meta deleted file mode 100644 index b2fead1..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BextChunkInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bfe59383888e7014c8291b4b7138e7da -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BwfWriter.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BwfWriter.cs deleted file mode 100644 index e42fa05..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BwfWriter.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Broadcast WAVE File Writer - /// - public class BwfWriter : IDisposable - { - private readonly WaveFormat format; - private readonly BinaryWriter writer; - private readonly long dataChunkSizePosition; - private long dataLength; - private bool isDisposed; - - /// - /// Createa a new BwfWriter - /// - /// Rarget filename - /// WaveFormat - /// Chunk information - public BwfWriter(string filename, WaveFormat format, BextChunkInfo bextChunkInfo) - { - this.format = format; - writer = new BinaryWriter(File.OpenWrite(filename)); - writer.Write(Encoding.UTF8.GetBytes("RIFF")); // will be updated to RF64 if large - writer.Write(0); // placeholder - writer.Write(Encoding.UTF8.GetBytes("WAVE")); - - writer.Write(Encoding.UTF8.GetBytes("JUNK")); // ds64 - writer.Write(28); // ds64 size - writer.Write(0L); // RIFF size - writer.Write(0L); // data size - writer.Write(0L); // sampleCount size - writer.Write(0); // table length - // TABLE appears here - to store the sizes of other huge chunks other than - - // write the broadcast audio extension - writer.Write(Encoding.UTF8.GetBytes("bext")); - var codingHistory = Encoding.ASCII.GetBytes(bextChunkInfo.CodingHistory ?? ""); - var bextLength = 602 + codingHistory.Length; - if (bextLength % 2 != 0) - bextLength++; - writer.Write(bextLength); // bext size - var bextStart = writer.BaseStream.Position; - writer.Write(GetAsBytes(bextChunkInfo.Description, 256)); - writer.Write(GetAsBytes(bextChunkInfo.Originator, 32)); - writer.Write(GetAsBytes(bextChunkInfo.OriginatorReference, 32)); - writer.Write(GetAsBytes(bextChunkInfo.OriginationDate, 10)); - writer.Write(GetAsBytes(bextChunkInfo.OriginationTime, 8)); - writer.Write(bextChunkInfo.TimeReference); // 8 bytes long - writer.Write(bextChunkInfo.Version); // 2 bytes long - writer.Write(GetAsBytes(bextChunkInfo.UniqueMaterialIdentifier, 64)); - writer.Write(bextChunkInfo.Reserved); // for version 1 this is 190 bytes - writer.Write(codingHistory); - if (codingHistory.Length % 2 != 0) - writer.Write((byte)0); - Debug.Assert(writer.BaseStream.Position == bextStart + bextLength, "Invalid bext chunk size"); - - // write the format chunk - writer.Write(Encoding.UTF8.GetBytes("fmt ")); - format.Serialize(writer); - - writer.Write(Encoding.UTF8.GetBytes("data")); - dataChunkSizePosition = writer.BaseStream.Position; - writer.Write(-1); // will be overwritten unless this is RF64 - // now finally the data chunk - } - - /// - /// Write audio data to this BWF - /// - public void Write(byte[] buffer, int offset, int count) - { - if (isDisposed) throw new ObjectDisposedException("This BWF Writer already disposed"); - writer.Write(buffer, offset, count); - dataLength += count; - } - - /// - /// Flush writer, and fix up header sizes - /// - public void Flush() - { - if (isDisposed) throw new ObjectDisposedException("This BWF Writer already disposed"); - writer.Flush(); - FixUpChunkSizes(true); // here to ensure WAV file created is always playable after Flush - } - - private void FixUpChunkSizes(bool restorePosition) - { - var pos = writer.BaseStream.Position; - var isLarge = dataLength > Int32.MaxValue; - var riffSize = writer.BaseStream.Length - 8; - if (isLarge) - { - var bytesPerSample = (format.BitsPerSample / 8) * format.Channels; - writer.BaseStream.Position = 0; - writer.Write(Encoding.UTF8.GetBytes("RF64")); - writer.Write(-1); - writer.BaseStream.Position += 4; // skip over WAVE - writer.Write(Encoding.UTF8.GetBytes("ds64")); - writer.BaseStream.Position += 4; // skip over ds64 chunk size - writer.Write(riffSize); - writer.Write(dataLength); - writer.Write(dataLength / bytesPerSample); - - // data chunk size can stay as -1 - } - else - { - // fix up the RIFF size - writer.BaseStream.Position = 4; - writer.Write((uint)riffSize); - // fix up the data chunk size - writer.BaseStream.Position = dataChunkSizePosition; - writer.Write((uint)dataLength); - } - if (restorePosition) - { - writer.BaseStream.Position = pos; - } - - } - - /// - /// Disposes this writer - /// - public void Dispose() - { - if (!isDisposed) - { - FixUpChunkSizes(false); - writer.Close(); - isDisposed = true; - } - } - - private static byte[] GetAsBytes(string message, int byteSize) - { - var outputBuffer = new byte[byteSize]; - var encoded = Encoding.ASCII.GetBytes(message ?? ""); - Array.Copy(encoded, outputBuffer, Math.Min(encoded.Length, byteSize)); - return outputBuffer; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BwfWriter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BwfWriter.cs.meta deleted file mode 100644 index 8875dc2..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/BwfWriter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2fac06e50eddac242ae9a514a4afcbfe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/CueWaveFileWriter.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/CueWaveFileWriter.cs deleted file mode 100644 index b866d01..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/CueWaveFileWriter.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.IO; - -namespace NAudio.Wave -{ - /// - /// A wave file writer that adds cue support - /// - public class CueWaveFileWriter : WaveFileWriter - { - private CueList cues = null; - - /// - /// Writes a wave file, including a cues chunk - /// - public CueWaveFileWriter(string fileName, WaveFormat waveFormat) - : base (fileName, waveFormat) - { - } - - /// - /// Adds a cue to the Wave file - /// - /// Sample position - /// Label text - public void AddCue(int position, string label) - { - if (cues == null) - { - cues = new CueList(); - } - cues.Add(new Cue(position, label)); - } - - private void WriteCues(BinaryWriter w) - { - // write the cue chunks to the end of the stream - if (cues != null) - { - byte[] cueChunks = cues.GetRiffChunks(); - int cueChunksSize = cueChunks.Length; - w.Seek(0, SeekOrigin.End); - - if (w.BaseStream.Length % 2 == 1) - { - w.Write((Byte)0x00); - } - - w.Write(cues.GetRiffChunks(), 0, cueChunksSize); - w.Seek(4, SeekOrigin.Begin); - w.Write((int)(w.BaseStream.Length - 8)); - } - } - - /// - /// Updates the header, and writes the cues out - /// - protected override void UpdateHeader(BinaryWriter writer) - { - base.UpdateHeader(writer); - WriteCues(writer); - } - } -} - diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/CueWaveFileWriter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/CueWaveFileWriter.cs.meta deleted file mode 100644 index 8760658..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/CueWaveFileWriter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cab9e713fb98cdd43a305555aff0a228 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/DirectSoundOut.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/DirectSoundOut.cs deleted file mode 100644 index 2625f61..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/DirectSoundOut.cs +++ /dev/null @@ -1,928 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Threading; -using System.Collections.Generic; -using System.Diagnostics; - -namespace NAudio.Wave -{ - /// - /// NativeDirectSoundOut using DirectSound COM interop. - /// Contact author: Alexandre Mutel - alexandre_mutel at yahoo.fr - /// Modified by: Graham "Gee" Plumb - /// - public class DirectSoundOut : IWavePlayer - { - /// - /// Playback Stopped - /// - public event EventHandler PlaybackStopped; - - private PlaybackState playbackState; - private WaveFormat waveFormat; - private int samplesTotalSize; - private int samplesFrameSize; - private int nextSamplesWriteIndex; - private int desiredLatency; - private Guid device; - private byte[] samples; - private IWaveProvider waveStream = null; - private IDirectSound directSound = null; - private IDirectSoundBuffer primarySoundBuffer = null; - private IDirectSoundBuffer secondaryBuffer = null; - private EventWaitHandle frameEventWaitHandle1; - private EventWaitHandle frameEventWaitHandle2; - private EventWaitHandle endEventWaitHandle; - private Thread notifyThread; - private SynchronizationContext syncContext; - private long bytesPlayed; - - // Used purely for locking - private Object m_LockObject = new Object(); - - /// - /// Gets the DirectSound output devices in the system - /// - public static IEnumerable Devices - { - get { - devices = new List(); - DirectSoundEnumerate(new DSEnumCallback(EnumCallback), IntPtr.Zero); - return devices; - } - } - - private static List devices; - - private static bool EnumCallback(IntPtr lpGuid, IntPtr lpcstrDescription, IntPtr lpcstrModule, IntPtr lpContext) - { - var device = new DirectSoundDeviceInfo(); - if (lpGuid == IntPtr.Zero) - { - device.Guid = Guid.Empty; - } - else - { - byte[] guidBytes = new byte[16]; - Marshal.Copy(lpGuid, guidBytes, 0, 16); - device.Guid = new Guid(guidBytes); - } - device.Description = Marshal.PtrToStringAnsi(lpcstrDescription); - if (lpcstrModule != null) - { - device.ModuleName = Marshal.PtrToStringAnsi(lpcstrModule); - } - devices.Add(device); - return true; - } - - - /// - /// Initializes a new instance of the class. - /// - public DirectSoundOut() - : this(DSDEVID_DefaultPlayback) - { - } - - /// - /// Initializes a new instance of the class. - /// - public DirectSoundOut(Guid device) - : this(device, 40) - { - } - - /// - /// Initializes a new instance of the class. - /// - public DirectSoundOut(int latency) - : this(DSDEVID_DefaultPlayback, latency) - { - } - - /// - /// Initializes a new instance of the class. - /// (40ms seems to work under Vista). - /// - /// The latency. - /// Selected device - public DirectSoundOut(Guid device, int latency) - { - if (device == Guid.Empty) - { - device = DSDEVID_DefaultPlayback; - } - this.device = device; - this.desiredLatency = latency; - this.syncContext = SynchronizationContext.Current; - } - - /// - /// Releases unmanaged resources and performs other cleanup operations before the - /// is reclaimed by garbage collection. - /// - ~DirectSoundOut() - { - Dispose(); - } - - /// - /// Begin playback - /// - public void Play() - { - if (playbackState == PlaybackState.Stopped) - { - // ------------------------------------------------------------------------------------- - // Thread that process samples - // ------------------------------------------------------------------------------------- - notifyThread = new Thread(new ThreadStart(PlaybackThreadFunc)); - // put this back to highest when we are confident we don't have any bugs in the thread proc - notifyThread.Priority = ThreadPriority.Normal; - notifyThread.IsBackground = true; - notifyThread.Start(); - } - - lock (m_LockObject) - { - playbackState = PlaybackState.Playing; - } - } - - /// - /// Stop playback - /// - public void Stop() - { - // Try and tidy up nicely - if (Monitor.TryEnter(m_LockObject, 50)) - { - playbackState = PlaybackState.Stopped; - Monitor.Exit(m_LockObject); - } - else - { - // No joy - abort the thread! - if (notifyThread != null) - { - notifyThread.Abort(); - notifyThread = null; - } - } - } - - /// - /// Pause Playback - /// - public void Pause() - { - lock (m_LockObject) - { - playbackState = PlaybackState.Paused; - } - } - - /// - /// Gets the current position in bytes from the wave output device. - /// (n.b. this is not the same thing as the position within your reader - /// stream) - /// - /// Position in bytes - public long GetPosition() - { - if (playbackState != Wave.PlaybackState.Stopped) - { - var sbuf = secondaryBuffer; - if (sbuf != null) - { - uint currentPlayCursor, currentWriteCursor; - sbuf.GetCurrentPosition(out currentPlayCursor, out currentWriteCursor); - return currentPlayCursor + bytesPlayed; - } - } - return 0; - } - - /// - /// Gets the current position from the wave output device. - /// - public TimeSpan PlaybackPosition - { - get - { - // bytes played in this stream - var pos = GetPosition(); - - // samples played in this stream - pos /= waveFormat.Channels * waveFormat.BitsPerSample / 8; - - // ms played in this stream - return TimeSpan.FromMilliseconds(pos * 1000.0 / waveFormat.SampleRate); - } - } - - - /// - /// Initialise playback - /// - /// The waveprovider to be played - public void Init(IWaveProvider waveProvider) - { - this.waveStream = waveProvider; - this.waveFormat = waveProvider.WaveFormat; - } - - private void InitializeDirectSound() - { - // Open DirectSound - lock (this.m_LockObject) - { - directSound = null; - DirectSoundCreate(ref device, out directSound, IntPtr.Zero); - - if (directSound != null) - { - // Set Cooperative Level to PRIORITY (priority level can call the SetFormat and Compact methods) - directSound.SetCooperativeLevel(GetDesktopWindow(), DirectSoundCooperativeLevel.DSSCL_PRIORITY); - - // ------------------------------------------------------------------------------------- - // Create PrimaryBuffer - // ------------------------------------------------------------------------------------- - - // Fill BufferDescription for PrimaryBuffer - BufferDescription bufferDesc = new BufferDescription(); - bufferDesc.dwSize = Marshal.SizeOf(bufferDesc); - bufferDesc.dwBufferBytes = 0; - bufferDesc.dwFlags = DirectSoundBufferCaps.DSBCAPS_PRIMARYBUFFER; - bufferDesc.dwReserved = 0; - bufferDesc.lpwfxFormat = IntPtr.Zero; - bufferDesc.guidAlgo = Guid.Empty; - - object soundBufferObj; - // Create PrimaryBuffer - directSound.CreateSoundBuffer(bufferDesc, out soundBufferObj, IntPtr.Zero); - primarySoundBuffer = (IDirectSoundBuffer)soundBufferObj; - - // Play & Loop on the PrimarySound Buffer - primarySoundBuffer.Play(0, 0, DirectSoundPlayFlags.DSBPLAY_LOOPING); - - // ------------------------------------------------------------------------------------- - // Create SecondaryBuffer - // ------------------------------------------------------------------------------------- - - // A frame of samples equals to Desired Latency - samplesFrameSize = MsToBytes(desiredLatency); - - // Fill BufferDescription for SecondaryBuffer - BufferDescription bufferDesc2 = new BufferDescription(); - bufferDesc2.dwSize = Marshal.SizeOf(bufferDesc2); - bufferDesc2.dwBufferBytes = (uint)(samplesFrameSize * 2); - bufferDesc2.dwFlags = DirectSoundBufferCaps.DSBCAPS_GETCURRENTPOSITION2 - | DirectSoundBufferCaps.DSBCAPS_CTRLPOSITIONNOTIFY - | DirectSoundBufferCaps.DSBCAPS_GLOBALFOCUS - | DirectSoundBufferCaps.DSBCAPS_CTRLVOLUME - | DirectSoundBufferCaps.DSBCAPS_STICKYFOCUS - | DirectSoundBufferCaps.DSBCAPS_GETCURRENTPOSITION2; - bufferDesc2.dwReserved = 0; - GCHandle handleOnWaveFormat = GCHandle.Alloc(waveFormat, GCHandleType.Pinned); // Ptr to waveFormat - bufferDesc2.lpwfxFormat = handleOnWaveFormat.AddrOfPinnedObject(); // set Ptr to waveFormat - bufferDesc2.guidAlgo = Guid.Empty; - - // Create SecondaryBuffer - directSound.CreateSoundBuffer(bufferDesc2, out soundBufferObj, IntPtr.Zero); - secondaryBuffer = (IDirectSoundBuffer)soundBufferObj; - handleOnWaveFormat.Free(); - - // Get effective SecondaryBuffer size - BufferCaps dsbCaps = new BufferCaps(); - dsbCaps.dwSize = Marshal.SizeOf(dsbCaps); - secondaryBuffer.GetCaps(dsbCaps); - - nextSamplesWriteIndex = 0; - samplesTotalSize = dsbCaps.dwBufferBytes; - samples = new byte[samplesTotalSize]; - System.Diagnostics.Debug.Assert(samplesTotalSize == (2 * samplesFrameSize), "Invalid SamplesTotalSize vs SamplesFrameSize"); - - // ------------------------------------------------------------------------------------- - // Create double buffering notification. - // Use DirectSoundNotify at Position [0, 1/2] and Stop Position (0xFFFFFFFF) - // ------------------------------------------------------------------------------------- - IDirectSoundNotify notify = (IDirectSoundNotify)soundBufferObj; - - frameEventWaitHandle1 = new EventWaitHandle(false, EventResetMode.AutoReset); - frameEventWaitHandle2 = new EventWaitHandle(false, EventResetMode.AutoReset); - endEventWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset); - - DirectSoundBufferPositionNotify[] notifies = new DirectSoundBufferPositionNotify[3]; - notifies[0] = new DirectSoundBufferPositionNotify(); - notifies[0].dwOffset = 0; - notifies[0].hEventNotify = frameEventWaitHandle1.SafeWaitHandle.DangerousGetHandle(); - - notifies[1] = new DirectSoundBufferPositionNotify(); - notifies[1].dwOffset = (uint)samplesFrameSize; - notifies[1].hEventNotify = frameEventWaitHandle2.SafeWaitHandle.DangerousGetHandle(); - - notifies[2] = new DirectSoundBufferPositionNotify(); - notifies[2].dwOffset = 0xFFFFFFFF; - notifies[2].hEventNotify = endEventWaitHandle.SafeWaitHandle.DangerousGetHandle(); - - notify.SetNotificationPositions(3, notifies); - } - } - } - - /// - /// Current playback state - /// - /// - public PlaybackState PlaybackState - { - get { return playbackState; } - } - - /// - /// The volume 1.0 is full scale - /// - /// - public float Volume - { - get - { - return 1.0f; - //return 1 + (secondaryBuffer.GetVolume()) / 10000.0f; - } - set - { - if (value != 1.0f) - { - throw new InvalidOperationException("Setting volume not supported on DirectSoundOut, adjust the volume on your WaveProvider instead"); - } - //int intVol = (int)((value - 1) * 10000.0f); - //secondaryBuffer.SetVolume(intVol); - } - } - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - public void Dispose() - { - Stop(); - GC.SuppressFinalize(this); - } - - /// - /// Determines whether the SecondaryBuffer is lost. - /// - /// - /// true if [is buffer lost]; otherwise, false. - /// - private bool IsBufferLost() - { - return (secondaryBuffer.GetStatus() & DirectSoundBufferStatus.DSBSTATUS_BUFFERLOST) != 0 ? true : false; - } - - /// - /// Convert ms to bytes size according to WaveFormat - /// - /// The ms - /// number of byttes - private int MsToBytes(int ms) - { - int bytes = ms * (waveFormat.AverageBytesPerSecond / 1000); - bytes -= bytes % waveFormat.BlockAlign; - return bytes; - } - - /// - /// Processes the samples in a separate thread. - /// - private void PlaybackThreadFunc() - { - // Used to determine if playback is halted - bool lPlaybackHalted = false; - bool firstBufferStarted = false; - bytesPlayed = 0; - - Exception exception = null; - // Incase the thread is killed - try - { - InitializeDirectSound(); - int lResult = 1; - - if (PlaybackState == PlaybackState.Stopped) - { - secondaryBuffer.SetCurrentPosition(0); - nextSamplesWriteIndex = 0; - lResult = Feed(samplesTotalSize); - } - - // Incase the previous Feed method returns 0 - if (lResult > 0) - { - lock (m_LockObject) - { - playbackState = PlaybackState.Playing; - } - - secondaryBuffer.Play(0, 0, DirectSoundPlayFlags.DSBPLAY_LOOPING); - - var waitHandles = new WaitHandle[] { frameEventWaitHandle1, frameEventWaitHandle2, endEventWaitHandle }; - - bool lContinuePlayback = true; - while (PlaybackState != PlaybackState.Stopped && lContinuePlayback) - { - // Wait for signals on frameEventWaitHandle1 (Position 0), frameEventWaitHandle2 (Position 1/2) - int indexHandle = WaitHandle.WaitAny(waitHandles, 3 * desiredLatency, false); - - // TimeOut is ok - if (indexHandle != WaitHandle.WaitTimeout) - { - // Buffer is Stopped - if (indexHandle == 2) - { - // (Gee) - Not sure whether to stop playback in this case or not! - StopPlayback(); - lPlaybackHalted = true; - lContinuePlayback = false; - } - else - { - if (indexHandle == 0) - { - // we're at the beginning of the buffer... - if (firstBufferStarted) - { - // because this notification is based on the *playback" cursor, this should be reasonably accurate - bytesPlayed += samplesFrameSize * 2; - } - } - else - { - firstBufferStarted = true; - } - - indexHandle = (indexHandle == 0) ? 1 : 0; - nextSamplesWriteIndex = indexHandle * samplesFrameSize; - - // Only carry on playing if we can! - if (Feed(samplesFrameSize) == 0) - { - StopPlayback(); - lPlaybackHalted = true; - lContinuePlayback = false; - } - } - } - else - { - // Timed out! - StopPlayback(); - lPlaybackHalted = true; - lContinuePlayback = false; - // report this as an error in the Playback Stopped - // seems to happen when device is unplugged - throw new Exception("DirectSound buffer timeout"); - } - } - } - } - catch (Exception e) - { - // Do nothing (except report error) - Debug.WriteLine(e.ToString()); - exception = e; - } - finally - { - if (!lPlaybackHalted) - { - try - { - StopPlayback(); - } - catch (Exception e) - { - Debug.WriteLine(e.ToString()); - // don't overwrite the original reason we exited the playback loop - if (exception == null) exception = e; - } - } - - lock (m_LockObject) - { - playbackState = PlaybackState.Stopped; - } - - bytesPlayed = 0; - - // Fire playback stopped event - RaisePlaybackStopped(exception); - } - } - - private void RaisePlaybackStopped(Exception e) - { - var handler = PlaybackStopped; - if (handler != null) - { - if (this.syncContext == null) - { - handler(this, new StoppedEventArgs(e)); - } - else - { - syncContext.Post(state => handler(this, new StoppedEventArgs(e)), null); - } - } - } - - - /// - /// Stop playback - /// - private void StopPlayback() - { - lock (this.m_LockObject) - { - if (secondaryBuffer != null) - { - CleanUpSecondaryBuffer(); - - secondaryBuffer.Stop(); - secondaryBuffer = null; - } - if (primarySoundBuffer != null) - { - primarySoundBuffer.Stop(); - primarySoundBuffer = null; - } - } - } - - /// - /// Clean up the SecondaryBuffer - /// - /// - /// - /// In DirectSound, when playback is started, - /// the rest of the sound that was played last time is played back as noise. - /// This happens even if the secondary buffer is completely silenced, - /// so it seems that the buffer in the primary buffer or higher is not cleared. - /// - /// - /// To solve this problem fill the secondary buffer with silence data when stop playback. - /// - /// - private void CleanUpSecondaryBuffer() - { - if (secondaryBuffer != null) - { - byte[] silence = new byte[samplesTotalSize]; - - // Lock the SecondaryBuffer - IntPtr wavBuffer1; - int nbSamples1; - IntPtr wavBuffer2; - int nbSamples2; - secondaryBuffer.Lock(0, (uint)samplesTotalSize, - out wavBuffer1, out nbSamples1, - out wavBuffer2, out nbSamples2, - DirectSoundBufferLockFlag.None); - - // Copy silence data to the SecondaryBuffer - if (wavBuffer1 != IntPtr.Zero) - { - Marshal.Copy(silence, 0, wavBuffer1, nbSamples1); - if (wavBuffer2 != IntPtr.Zero) - { - Marshal.Copy(silence, 0, wavBuffer1, nbSamples1); - } - } - - // Unlock the SecondaryBuffer - secondaryBuffer.Unlock(wavBuffer1, nbSamples1, wavBuffer2, nbSamples2); - } - } - - - /// - /// Feeds the SecondaryBuffer with the WaveStream - /// - /// number of bytes to feed - private int Feed(int bytesToCopy) - { - int bytesRead = bytesToCopy; - - // Restore the buffer if lost - if (IsBufferLost()) - { - secondaryBuffer.Restore(); - } - - // Clear the bufferSamples if in Paused - if (playbackState == PlaybackState.Paused) - { - Array.Clear(samples, 0, samples.Length); - } - else - { - // Read data from stream (Should this be inserted between the lock / unlock?) - bytesRead = waveStream.Read(samples, 0, bytesToCopy); - - if (bytesRead == 0) - { - Array.Clear(samples, 0, samples.Length); - return 0; - } - } - - // Lock a portion of the SecondaryBuffer (starting from 0 or 1/2 the buffer) - IntPtr wavBuffer1; - int nbSamples1; - IntPtr wavBuffer2; - int nbSamples2; - secondaryBuffer.Lock(nextSamplesWriteIndex, (uint)bytesRead, // (uint)bytesToCopy, - out wavBuffer1, out nbSamples1, - out wavBuffer2, out nbSamples2, - DirectSoundBufferLockFlag.None); - - // Copy back to the SecondaryBuffer - if (wavBuffer1 != IntPtr.Zero) - { - Marshal.Copy(samples, 0, wavBuffer1, nbSamples1); - if (wavBuffer2 != IntPtr.Zero) - { - Marshal.Copy(samples, 0, wavBuffer1, nbSamples1); - } - } - - // Unlock the SecondaryBuffer - secondaryBuffer.Unlock(wavBuffer1, nbSamples1, wavBuffer2, nbSamples2); - - return bytesRead; - } - - - //---------------------------------------------------------------------------------------------- - // Minimal Native DirectSound COM interop interfaces - //---------------------------------------------------------------------------------------------- - #region Native DirectSound COM Interface - - [StructLayout(LayoutKind.Sequential, Pack = 2)] - internal class BufferDescription - { - public int dwSize; - [MarshalAs(UnmanagedType.U4)] - public DirectSoundBufferCaps dwFlags; - public uint dwBufferBytes; - public int dwReserved; - public IntPtr lpwfxFormat; - public Guid guidAlgo; - } - - [StructLayout(LayoutKind.Sequential, Pack = 2)] - internal class BufferCaps - { - public int dwSize; - public int dwFlags; - public int dwBufferBytes; - public int dwUnlockTransferRate; - public int dwPlayCpuOverhead; - } - - internal enum DirectSoundCooperativeLevel : uint - { - DSSCL_NORMAL = 0x00000001, - DSSCL_PRIORITY = 0x00000002, - DSSCL_EXCLUSIVE = 0x00000003, - DSSCL_WRITEPRIMARY = 0x00000004 - } - - [FlagsAttribute] - internal enum DirectSoundPlayFlags : uint - { - DSBPLAY_LOOPING = 0x00000001, - DSBPLAY_LOCHARDWARE = 0x00000002, - DSBPLAY_LOCSOFTWARE = 0x00000004, - DSBPLAY_TERMINATEBY_TIME = 0x00000008, - DSBPLAY_TERMINATEBY_DISTANCE = 0x000000010, - DSBPLAY_TERMINATEBY_PRIORITY = 0x000000020 - } - - internal enum DirectSoundBufferLockFlag : uint - { - None = 0, - FromWriteCursor = 0x00000001, - EntireBuffer = 0x00000002 - } - - [FlagsAttribute] - internal enum DirectSoundBufferStatus : uint - { - DSBSTATUS_PLAYING = 0x00000001, - DSBSTATUS_BUFFERLOST = 0x00000002, - DSBSTATUS_LOOPING = 0x00000004, - DSBSTATUS_LOCHARDWARE = 0x00000008, - DSBSTATUS_LOCSOFTWARE = 0x00000010, - DSBSTATUS_TERMINATED = 0x00000020 - } - - [FlagsAttribute] - internal enum DirectSoundBufferCaps : uint - { - DSBCAPS_PRIMARYBUFFER = 0x00000001, - DSBCAPS_STATIC = 0x00000002, - DSBCAPS_LOCHARDWARE = 0x00000004, - DSBCAPS_LOCSOFTWARE = 0x00000008, - DSBCAPS_CTRL3D = 0x00000010, - DSBCAPS_CTRLFREQUENCY = 0x00000020, - DSBCAPS_CTRLPAN = 0x00000040, - DSBCAPS_CTRLVOLUME = 0x00000080, - DSBCAPS_CTRLPOSITIONNOTIFY = 0x00000100, - DSBCAPS_CTRLFX = 0x00000200, - DSBCAPS_STICKYFOCUS = 0x00004000, - DSBCAPS_GLOBALFOCUS = 0x00008000, - DSBCAPS_GETCURRENTPOSITION2 = 0x00010000, - DSBCAPS_MUTE3DATMAXDISTANCE = 0x00020000, - DSBCAPS_LOCDEFER = 0x00040000 - } - - [StructLayout(LayoutKind.Sequential)] - internal struct DirectSoundBufferPositionNotify - { - public UInt32 dwOffset; - public IntPtr hEventNotify; - } - - /// - /// IDirectSound interface - /// - [ComImport, - Guid("279AFA83-4981-11CE-A521-0020AF0BE560"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown), - SuppressUnmanagedCodeSecurity] - internal interface IDirectSound - { - //STDMETHOD(CreateSoundBuffer) (THIS_ LPCDSBUFFERDESC pcDSBufferDesc, LPDIRECTSOUNDBUFFER *ppDSBuffer, LPUNKNOWN pUnkOuter) PURE; - void CreateSoundBuffer([In] BufferDescription desc, [Out, MarshalAs(UnmanagedType.Interface)] out object dsDSoundBuffer, IntPtr pUnkOuter); - //STDMETHOD(GetCaps) (THIS_ LPDSCAPS pDSCaps) PURE; - void GetCaps(IntPtr caps); - //STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER pDSBufferOriginal, LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE; - void DuplicateSoundBuffer([In, MarshalAs(UnmanagedType.Interface)] IDirectSoundBuffer bufferOriginal, [In, MarshalAs(UnmanagedType.Interface)] IDirectSoundBuffer bufferDuplicate); - //STDMETHOD(SetCooperativeLevel) (THIS_ HWND hwnd, DWORD dwLevel) PURE; - void SetCooperativeLevel(IntPtr HWND, [In, MarshalAs(UnmanagedType.U4)] DirectSoundCooperativeLevel dwLevel); - //STDMETHOD(Compact) (THIS) PURE; - void Compact(); - //STDMETHOD(GetSpeakerConfig) (THIS_ LPDWORD pdwSpeakerConfig) PURE; - void GetSpeakerConfig(IntPtr pdwSpeakerConfig); - //STDMETHOD(SetSpeakerConfig) (THIS_ DWORD dwSpeakerConfig) PURE; - void SetSpeakerConfig(uint pdwSpeakerConfig); - //STDMETHOD(Initialize) (THIS_ LPCGUID pcGuidDevice) PURE; - void Initialize([In, MarshalAs(UnmanagedType.LPStruct)] Guid guid); - } - - /// - /// IDirectSoundBuffer interface - /// - [ComImport, - Guid("279AFA85-4981-11CE-A521-0020AF0BE560"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown), - SuppressUnmanagedCodeSecurity] - internal interface IDirectSoundBuffer - { - // STDMETHOD(GetCaps) (THIS_ LPDSBCAPS pDSBufferCaps) PURE; - void GetCaps([MarshalAs(UnmanagedType.LPStruct)] BufferCaps pBufferCaps); - // STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD pdwCurrentPlayCursor, LPDWORD pdwCurrentWriteCursor) PURE; - void GetCurrentPosition([Out] out uint currentPlayCursor, [Out] out uint currentWriteCursor); - // STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE; - void GetFormat(); - // STDMETHOD(GetVolume) (THIS_ LPLONG plVolume) PURE; - [return: MarshalAs(UnmanagedType.I4)] - int GetVolume(); - // STDMETHOD(GetPan) (THIS_ LPLONG plPan) PURE; - void GetPan([Out] out uint pan); - // STDMETHOD(GetFrequency) (THIS_ LPDWORD pdwFrequency) PURE; - [return: MarshalAs(UnmanagedType.I4)] - int GetFrequency(); - // STDMETHOD(GetStatus) (THIS_ LPDWORD pdwStatus) PURE; - [return: MarshalAs(UnmanagedType.U4)] - DirectSoundBufferStatus GetStatus(); - // STDMETHOD(Initialize) (THIS_ LPDIRECTSOUND pDirectSound, LPCDSBUFFERDESC pcDSBufferDesc) PURE; - void Initialize([In, MarshalAs(UnmanagedType.Interface)] IDirectSound directSound, [In] BufferDescription desc); - // STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, - // LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; - void Lock(int dwOffset, uint dwBytes, [Out] out IntPtr audioPtr1, [Out] out int audioBytes1, [Out] out IntPtr audioPtr2, [Out] out int audioBytes2, [MarshalAs(UnmanagedType.U4)] DirectSoundBufferLockFlag dwFlags); - // STDMETHOD(Play) (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE; - void Play(uint dwReserved1, uint dwPriority, [In, MarshalAs(UnmanagedType.U4)] DirectSoundPlayFlags dwFlags); - // STDMETHOD(SetCurrentPosition) (THIS_ DWORD dwNewPosition) PURE; - void SetCurrentPosition(uint dwNewPosition); - // STDMETHOD(SetFormat) (THIS_ LPCWAVEFORMATEX pcfxFormat) PURE; - void SetFormat([In] WaveFormat pcfxFormat); - // STDMETHOD(SetVolume) (THIS_ LONG lVolume) PURE; - void SetVolume(int volume); - // STDMETHOD(SetPan) (THIS_ LONG lPan) PURE; - void SetPan(uint pan); - // STDMETHOD(SetFrequency) (THIS_ DWORD dwFrequency) PURE; - void SetFrequency(uint frequency); - // STDMETHOD(Stop) (THIS) PURE; - void Stop(); - // STDMETHOD(Unlock) (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE; - void Unlock(IntPtr pvAudioPtr1, int dwAudioBytes1, IntPtr pvAudioPtr2, int dwAudioBytes2); - // STDMETHOD(Restore) (THIS) PURE; - void Restore(); - } - - /// - /// IDirectSoundNotify interface - /// - [ComImport, - Guid("b0210783-89cd-11d0-af08-00a0c925cd16"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown), - SuppressUnmanagedCodeSecurity] - internal interface IDirectSoundNotify - { - void SetNotificationPositions(UInt32 dwPositionNotifies, [In, MarshalAs(UnmanagedType.LPArray)] DirectSoundBufferPositionNotify[] pcPositionNotifies); - } - - /// - /// Instanciate DirectSound from the DLL - /// - /// The GUID. - /// The direct sound. - /// The p unk outer. - [DllImport("dsound.dll", EntryPoint = "DirectSoundCreate", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] - static extern void DirectSoundCreate(ref Guid GUID, [Out, MarshalAs(UnmanagedType.Interface)] out IDirectSound directSound, IntPtr pUnkOuter); - - - /// - /// DirectSound default playback device GUID - /// - public static readonly Guid DSDEVID_DefaultPlayback = new Guid("DEF00000-9C6D-47ED-AAF1-4DDA8F2B5C03"); - - /// - /// DirectSound default capture device GUID - /// - public static readonly Guid DSDEVID_DefaultCapture = new Guid("DEF00001-9C6D-47ED-AAF1-4DDA8F2B5C03"); - - /// - /// DirectSound default device for voice playback - /// - public static readonly Guid DSDEVID_DefaultVoicePlayback = new Guid("DEF00002-9C6D-47ED-AAF1-4DDA8F2B5C03"); - - /// - /// DirectSound default device for voice capture - /// - public static readonly Guid DSDEVID_DefaultVoiceCapture = new Guid("DEF00003-9C6D-47ED-AAF1-4DDA8F2B5C03"); - - /// - /// The DSEnumCallback function is an application-defined callback function that enumerates the DirectSound drivers. - /// The system calls this function in response to the application's call to the DirectSoundEnumerate or DirectSoundCaptureEnumerate function. - /// - /// Address of the GUID that identifies the device being enumerated, or NULL for the primary device. This value can be passed to the DirectSoundCreate8 or DirectSoundCaptureCreate8 function to create a device object for that driver. - /// Address of a null-terminated string that provides a textual description of the DirectSound device. - /// Address of a null-terminated string that specifies the module name of the DirectSound driver corresponding to this device. - /// Address of application-defined data. This is the pointer passed to DirectSoundEnumerate or DirectSoundCaptureEnumerate as the lpContext parameter. - /// Returns TRUE to continue enumerating drivers, or FALSE to stop. - delegate bool DSEnumCallback(IntPtr lpGuid, IntPtr lpcstrDescription, IntPtr lpcstrModule, IntPtr lpContext); - - /// - /// The DirectSoundEnumerate function enumerates the DirectSound drivers installed in the system. - /// - /// callback function - /// User context - [DllImport("dsound.dll", EntryPoint = "DirectSoundEnumerateA", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] - static extern void DirectSoundEnumerate(DSEnumCallback lpDSEnumCallback, IntPtr lpContext); - - /// - /// Gets the HANDLE of the desktop window. - /// - /// HANDLE of the Desktop window - [DllImport("user32.dll")] - private static extern IntPtr GetDesktopWindow(); - #endregion - } - - /// - /// Class for enumerating DirectSound devices - /// - public class DirectSoundDeviceInfo - { - /// - /// The device identifier - /// - public Guid Guid { get; set; } - /// - /// Device description - /// - public string Description { get; set; } - /// - /// Device module name - /// - public string ModuleName { get; set; } - } - -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/DirectSoundOut.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/DirectSoundOut.cs.meta deleted file mode 100644 index 57e7a98..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/DirectSoundOut.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a8fecf0673ea19649940938d7ad396e1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveBuffer.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveBuffer.cs deleted file mode 100644 index 3b841e9..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveBuffer.cs +++ /dev/null @@ -1,70 +0,0 @@ -namespace NAudio.Wave -{ - /// - /// IWaveBuffer interface use to store wave datas. - /// Data can be manipulated with arrays (,, - /// , ) that are pointing to the same memory buffer. - /// This is a requirement for all subclasses. - /// - /// Use the associated Count property based on the type of buffer to get the number of data in the - /// buffer. - /// - /// for the standard implementation using C# unions. - /// - public interface IWaveBuffer - { - /// - /// Gets the byte buffer. - /// - /// The byte buffer. - byte[] ByteBuffer { get; } - - /// - /// Gets the float buffer. - /// - /// The float buffer. - float[] FloatBuffer { get; } - - /// - /// Gets the short buffer. - /// - /// The short buffer. - short[] ShortBuffer { get; } - - /// - /// Gets the int buffer. - /// - /// The int buffer. - int[] IntBuffer { get; } - - /// - /// Gets the max size in bytes of the byte buffer.. - /// - /// Maximum number of bytes in the buffer. - int MaxSize { get; } - - /// - /// Gets the byte buffer count. - /// - /// The byte buffer count. - int ByteBufferCount { get; } - - /// - /// Gets the float buffer count. - /// - /// The float buffer count. - int FloatBufferCount { get;} - - /// - /// Gets the short buffer count. - /// - /// The short buffer count. - int ShortBufferCount { get; } - - /// - /// Gets the int buffer count. - /// - /// The int buffer count. - int IntBufferCount { get; } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveBuffer.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveBuffer.cs.meta deleted file mode 100644 index a391ebb..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveBuffer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8e4c0cf4d09ecd0438d6838c676f0908 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWavePlayer.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWavePlayer.cs deleted file mode 100644 index 2c71645..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWavePlayer.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Represents the interface to a device that can play a WaveFile - /// - public interface IWavePlayer : IDisposable - { - /// - /// Begin playback - /// - void Play(); - - /// - /// Stop playback - /// - void Stop(); - - /// - /// Pause Playback - /// - void Pause(); - - /// - /// Initialise playback - /// - /// The waveprovider to be played - void Init(IWaveProvider waveProvider); - - /// - /// Current playback state - /// - PlaybackState PlaybackState { get; } - - /// - /// The volume - /// 1.0f is full scale - /// Note that not all implementations necessarily support volume changes - /// - float Volume { get; set; } - - /// - /// Indicates that playback has gone into a stopped state due to - /// reaching the end of the input stream or an error has been encountered during playback - /// - event EventHandler PlaybackStopped; - } - - /// - /// Interface for IWavePlayers that can report position - /// - public interface IWavePosition - { - /// - /// Position (in terms of bytes played - does not necessarily translate directly to the position within the source audio file) - /// - /// Position in bytes - long GetPosition(); - - /// - /// Gets a instance indicating the format the hardware is using. - /// - WaveFormat OutputWaveFormat { get; } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWavePlayer.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWavePlayer.cs.meta deleted file mode 100644 index 91ccc04..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWavePlayer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f202a142c9f301642a0bd86c70304753 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProvider.cs deleted file mode 100644 index 99469bf..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProvider.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace NAudio.Wave -{ - /// - /// Generic interface for all WaveProviders. - /// - public interface IWaveProvider - { - /// - /// Gets the WaveFormat of this WaveProvider. - /// - /// The wave format. - WaveFormat WaveFormat { get; } - - /// - /// Fill the specified buffer with wave data. - /// - /// The buffer to fill of wave data. - /// Offset into buffer - /// The number of bytes to read - /// the number of bytes written to the buffer. - int Read(byte[] buffer, int offset, int count); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProvider.cs.meta deleted file mode 100644 index 4d9b9a1..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8131cffce12ca004e97bdedf78ae1552 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProviderFloat.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProviderFloat.cs deleted file mode 100644 index db88a9d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProviderFloat.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Like IWaveProvider, but makes it much simpler to put together a 32 bit floating - /// point mixing engine - /// - public interface ISampleProvider - { - /// - /// Gets the WaveFormat of this Sample Provider. - /// - /// The wave format. - WaveFormat WaveFormat { get; } - - /// - /// Fill the specified buffer with 32 bit floating point samples - /// - /// The buffer to fill with samples. - /// Offset into buffer - /// The number of samples to read - /// the number of samples written to the buffer. - int Read(float[] buffer, int offset, int count); - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProviderFloat.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProviderFloat.cs.meta deleted file mode 100644 index 333f22e..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/IWaveProviderFloat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3ccbe9c700240b041b6ba932e6681562 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/MediaFoundationEncoder.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/MediaFoundationEncoder.cs deleted file mode 100644 index 075e3a6..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/MediaFoundationEncoder.cs +++ /dev/null @@ -1,306 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using NAudio.MediaFoundation; -using NAudio.Utils; - -namespace NAudio.Wave -{ - /// - /// Media Foundation Encoder class allows you to use Media Foundation to encode an IWaveProvider - /// to any supported encoding format - /// - public class MediaFoundationEncoder : IDisposable - { - /// - /// Queries the available bitrates for a given encoding output type, sample rate and number of channels - /// - /// Audio subtype - a value from the AudioSubtypes class - /// The sample rate of the PCM to encode - /// The number of channels of the PCM to encode - /// An array of available bitrates in average bits per second - public static int[] GetEncodeBitrates(Guid audioSubtype, int sampleRate, int channels) - { - return GetOutputMediaTypes(audioSubtype) - .Where(mt => mt.SampleRate == sampleRate && mt.ChannelCount == channels) - .Select(mt => mt.AverageBytesPerSecond*8) - .Distinct() - .OrderBy(br => br) - .ToArray(); - } - - /// - /// Gets all the available media types for a particular - /// - /// Audio subtype - a value from the AudioSubtypes class - /// An array of available media types that can be encoded with this subtype - public static MediaType[] GetOutputMediaTypes(Guid audioSubtype) - { - IMFCollection availableTypes; - try - { - MediaFoundationInterop.MFTranscodeGetAudioOutputAvailableTypes( - audioSubtype, _MFT_ENUM_FLAG.MFT_ENUM_FLAG_ALL, null, out availableTypes); - } - catch (COMException c) - { - if (c.GetHResult() == MediaFoundationErrors.MF_E_NOT_FOUND) - { - // Don't worry if we didn't find any - just means no encoder available for this type - return new MediaType[0]; - } - else - { - throw; - } - } - int count; - availableTypes.GetElementCount(out count); - var mediaTypes = new List(count); - for (int n = 0; n < count; n++) - { - object mediaTypeObject; - availableTypes.GetElement(n, out mediaTypeObject); - var mediaType = (IMFMediaType)mediaTypeObject; - mediaTypes.Add(new MediaType(mediaType)); - } - Marshal.ReleaseComObject(availableTypes); - return mediaTypes.ToArray(); - } - - /// - /// Helper function to simplify encoding Window Media Audio - /// Should be supported on Vista and above (not tested) - /// - /// Input provider, must be PCM - /// Output file path, should end with .wma - /// Desired bitrate. Use GetEncodeBitrates to find the possibilities for your input type - public static void EncodeToWma(IWaveProvider inputProvider, string outputFile, int desiredBitRate = 192000) - { - var mediaType = SelectMediaType(AudioSubtypes.MFAudioFormat_WMAudioV8, inputProvider.WaveFormat, desiredBitRate); - if (mediaType == null) throw new InvalidOperationException("No suitable WMA encoders available"); - using (var encoder = new MediaFoundationEncoder(mediaType)) - { - encoder.Encode(outputFile, inputProvider); - } - } - - /// - /// Helper function to simplify encoding to MP3 - /// By default, will only be available on Windows 8 and above - /// - /// Input provider, must be PCM - /// Output file path, should end with .mp3 - /// Desired bitrate. Use GetEncodeBitrates to find the possibilities for your input type - public static void EncodeToMp3(IWaveProvider inputProvider, string outputFile, int desiredBitRate = 192000) - { - var mediaType = SelectMediaType(AudioSubtypes.MFAudioFormat_MP3, inputProvider.WaveFormat, desiredBitRate); - if (mediaType == null) throw new InvalidOperationException("No suitable MP3 encoders available"); - using (var encoder = new MediaFoundationEncoder(mediaType)) - { - encoder.Encode(outputFile, inputProvider); - } - } - - /// - /// Helper function to simplify encoding to AAC - /// By default, will only be available on Windows 7 and above - /// - /// Input provider, must be PCM - /// Output file path, should end with .mp4 (or .aac on Windows 8) - /// Desired bitrate. Use GetEncodeBitrates to find the possibilities for your input type - public static void EncodeToAac(IWaveProvider inputProvider, string outputFile, int desiredBitRate = 192000) - { - // Information on configuring an AAC media type can be found here: - // http://msdn.microsoft.com/en-gb/library/windows/desktop/dd742785%28v=vs.85%29.aspx - var mediaType = SelectMediaType(AudioSubtypes.MFAudioFormat_AAC, inputProvider.WaveFormat, desiredBitRate); - if (mediaType == null) throw new InvalidOperationException("No suitable AAC encoders available"); - using (var encoder = new MediaFoundationEncoder(mediaType)) - { - // should AAC container have ADTS, or is that just for ADTS? - // http://www.hydrogenaudio.org/forums/index.php?showtopic=97442 - encoder.Encode(outputFile, inputProvider); - } - } - - /// - /// Tries to find the encoding media type with the closest bitrate to that specified - /// - /// Audio subtype, a value from AudioSubtypes - /// Your encoder input format (used to check sample rate and channel count) - /// Your desired bitrate - /// The closest media type, or null if none available - public static MediaType SelectMediaType(Guid audioSubtype, WaveFormat inputFormat, int desiredBitRate) - { - return GetOutputMediaTypes(audioSubtype) - .Where(mt => mt.SampleRate == inputFormat.SampleRate && mt.ChannelCount == inputFormat.Channels) - .Select(mt => new { MediaType = mt, Delta = Math.Abs(desiredBitRate - mt.AverageBytesPerSecond * 8) } ) - .OrderBy(mt => mt.Delta) - .Select(mt => mt.MediaType) - .FirstOrDefault(); - } - - private readonly MediaType outputMediaType; - private bool disposed; - - /// - /// Creates a new encoder that encodes to the specified output media type - /// - /// Desired output media type - public MediaFoundationEncoder(MediaType outputMediaType) - { - if (outputMediaType == null) throw new ArgumentNullException("outputMediaType"); - this.outputMediaType = outputMediaType; - } - - /// - /// Encodes a file - /// - /// Output filename (container type is deduced from the filename) - /// Input provider (should be PCM, some encoders will also allow IEEE float) - public void Encode(string outputFile, IWaveProvider inputProvider) - { - if (inputProvider.WaveFormat.Encoding != WaveFormatEncoding.Pcm && inputProvider.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - { - throw new ArgumentException("Encode input format must be PCM or IEEE float"); - } - - var inputMediaType = new MediaType(inputProvider.WaveFormat); - - var writer = CreateSinkWriter(outputFile); - try - { - int streamIndex; - writer.AddStream(outputMediaType.MediaFoundationObject, out streamIndex); - - // n.b. can get 0xC00D36B4 - MF_E_INVALIDMEDIATYPE here - writer.SetInputMediaType(streamIndex, inputMediaType.MediaFoundationObject, null); - - PerformEncode(writer, streamIndex, inputProvider); - } - finally - { - Marshal.ReleaseComObject(writer); - Marshal.ReleaseComObject(inputMediaType.MediaFoundationObject); - } - } - - private static IMFSinkWriter CreateSinkWriter(string outputFile) - { - // n.b. could try specifying the container type using attributes, but I think - // it does a decent job of working it out from the file extension - // n.b. AAC encode on Win 8 can have AAC extension, but use MP4 in win 7 - // http://msdn.microsoft.com/en-gb/library/windows/desktop/dd389284%28v=vs.85%29.aspx - IMFSinkWriter writer; - var attributes = MediaFoundationApi.CreateAttributes(1); - attributes.SetUINT32(MediaFoundationAttributes.MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, 1); - try - { - MediaFoundationInterop.MFCreateSinkWriterFromURL(outputFile, null, attributes, out writer); - } - catch (COMException e) - { - if (e.GetHResult() == MediaFoundationErrors.MF_E_NOT_FOUND) - { - throw new ArgumentException("Was not able to create a sink writer for this file extension"); - } - throw; - } - finally - { - Marshal.ReleaseComObject(attributes); - } - return writer; - } - - private void PerformEncode(IMFSinkWriter writer, int streamIndex, IWaveProvider inputProvider) - { - int maxLength = inputProvider.WaveFormat.AverageBytesPerSecond * 4; - var managedBuffer = new byte[maxLength]; - - writer.BeginWriting(); - - long position = 0; - long duration = 0; - do - { - duration = ConvertOneBuffer(writer, streamIndex, inputProvider, position, managedBuffer); - position += duration; - } while (duration > 0); - - writer.DoFinalize(); - } - - private static long BytesToNsPosition(int bytes, WaveFormat waveFormat) - { - long nsPosition = (10000000L * bytes) / waveFormat.AverageBytesPerSecond; - return nsPosition; - } - - private long ConvertOneBuffer(IMFSinkWriter writer, int streamIndex, IWaveProvider inputProvider, long position, byte[] managedBuffer) - { - long durationConverted = 0; - int maxLength; - IMFMediaBuffer buffer = MediaFoundationApi.CreateMemoryBuffer(managedBuffer.Length); - buffer.GetMaxLength(out maxLength); - - IMFSample sample = MediaFoundationApi.CreateSample(); - sample.AddBuffer(buffer); - - IntPtr ptr; - int currentLength; - buffer.Lock(out ptr, out maxLength, out currentLength); - int read = inputProvider.Read(managedBuffer, 0, maxLength); - if (read > 0) - { - durationConverted = BytesToNsPosition(read, inputProvider.WaveFormat); - Marshal.Copy(managedBuffer, 0, ptr, read); - buffer.SetCurrentLength(read); - buffer.Unlock(); - sample.SetSampleTime(position); - sample.SetSampleDuration(durationConverted); - writer.WriteSample(streamIndex, sample); - //writer.Flush(streamIndex); - } - else - { - buffer.Unlock(); - } - - Marshal.ReleaseComObject(sample); - Marshal.ReleaseComObject(buffer); - return durationConverted; - } - - /// - /// Disposes this instance - /// - /// - protected void Dispose(bool disposing) - { - Marshal.ReleaseComObject(outputMediaType.MediaFoundationObject); - } - - /// - /// Disposes this instance - /// - public void Dispose() - { - if (!disposed) - { - disposed = true; - Dispose(true); - } - GC.SuppressFinalize(this); - } - - /// - /// Finalizer - /// - ~MediaFoundationEncoder() - { - Dispose(false); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/MediaFoundationEncoder.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/MediaFoundationEncoder.cs.meta deleted file mode 100644 index 057c684..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/MediaFoundationEncoder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b1eb0a55d609902448306295f4fe4efe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/PlaybackState.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/PlaybackState.cs deleted file mode 100644 index 7989f20..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/PlaybackState.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Playback State - /// - public enum PlaybackState - { - /// - /// Stopped - /// - Stopped, - /// - /// Playing - /// - Playing, - /// - /// Paused - /// - Paused - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/PlaybackState.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/PlaybackState.cs.meta deleted file mode 100644 index f23bf87..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/PlaybackState.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 70c219a608a7ab64ebdf304bb7d16195 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/StoppedEventArgs.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/StoppedEventArgs.cs deleted file mode 100644 index 9b883f7..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/StoppedEventArgs.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Stopped Event Args - /// - public class StoppedEventArgs : EventArgs - { - private readonly Exception exception; - - /// - /// Initializes a new instance of StoppedEventArgs - /// - /// An exception to report (null if no exception) - public StoppedEventArgs(Exception exception = null) - { - this.exception = exception; - } - - /// - /// An exception. Will be null if the playback or record operation stopped due to - /// the user requesting stop or reached the end of the input audio - /// - public Exception Exception => exception; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/StoppedEventArgs.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/StoppedEventArgs.cs.meta deleted file mode 100644 index 473a2b8..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/StoppedEventArgs.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1af891e2347bb2046a78024d625bcd7e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WasapiOut.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WasapiOut.cs deleted file mode 100644 index 1535f4a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WasapiOut.cs +++ /dev/null @@ -1,466 +0,0 @@ -using System; -using NAudio.CoreAudioApi; -using System.Threading; -using System.Runtime.InteropServices; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Support for playback using Wasapi - /// - public class WasapiOut : IWavePlayer, IWavePosition - { - private AudioClient audioClient; - private readonly MMDevice mmDevice; - private readonly AudioClientShareMode shareMode; - private AudioRenderClient renderClient; - private IWaveProvider sourceProvider; - private int latencyMilliseconds; - private int bufferFrameCount; - private int bytesPerFrame; - private readonly bool isUsingEventSync; - private EventWaitHandle frameEventWaitHandle; - private byte[] readBuffer; - private volatile PlaybackState playbackState; - private Thread playThread; - private WaveFormat outputFormat; - private bool dmoResamplerNeeded; - private readonly SynchronizationContext syncContext; - - /// - /// Playback Stopped - /// - public event EventHandler PlaybackStopped; - - /// - /// WASAPI Out shared mode, defauult - /// - public WasapiOut() : - this(GetDefaultAudioEndpoint(), AudioClientShareMode.Shared, true, 200) - { - - } - - /// - /// WASAPI Out using default audio endpoint - /// - /// ShareMode - shared or exclusive - /// Desired latency in milliseconds - public WasapiOut(AudioClientShareMode shareMode, int latency) : - this(GetDefaultAudioEndpoint(), shareMode, true, latency) - { - - } - - /// - /// WASAPI Out using default audio endpoint - /// - /// ShareMode - shared or exclusive - /// true if sync is done with event. false use sleep. - /// Desired latency in milliseconds - public WasapiOut(AudioClientShareMode shareMode, bool useEventSync, int latency) : - this(GetDefaultAudioEndpoint(), shareMode, useEventSync, latency) - { - - } - - /// - /// Creates a new WASAPI Output - /// - /// Device to use - /// - /// true if sync is done with event. false use sleep. - /// Desired latency in milliseconds - public WasapiOut(MMDevice device, AudioClientShareMode shareMode, bool useEventSync, int latency) - { - audioClient = device.AudioClient; - mmDevice = device; - this.shareMode = shareMode; - isUsingEventSync = useEventSync; - latencyMilliseconds = latency; - syncContext = SynchronizationContext.Current; - outputFormat = audioClient.MixFormat; // allow the user to query the default format for shared mode streams - } - - static MMDevice GetDefaultAudioEndpoint() - { - if (Environment.OSVersion.Version.Major < 6) - { - throw new NotSupportedException("WASAPI supported only on Windows Vista and above"); - } - var enumerator = new MMDeviceEnumerator(); - return enumerator.GetDefaultAudioEndpoint(DataFlow.Render, Role.Console); - } - - private void PlayThread() - { - ResamplerDmoStream resamplerDmoStream = null; - IWaveProvider playbackProvider = sourceProvider; - Exception exception = null; - try - { - if (dmoResamplerNeeded) - { - resamplerDmoStream = new ResamplerDmoStream(sourceProvider, outputFormat); - playbackProvider = resamplerDmoStream; - } - - // fill a whole buffer - bufferFrameCount = audioClient.BufferSize; - bytesPerFrame = outputFormat.Channels * outputFormat.BitsPerSample / 8; - readBuffer = new byte[bufferFrameCount * bytesPerFrame]; - FillBuffer(playbackProvider, bufferFrameCount); - - // Create WaitHandle for sync - var waitHandles = new WaitHandle[] { frameEventWaitHandle }; - - audioClient.Start(); - - while (playbackState != PlaybackState.Stopped) - { - // If using Event Sync, Wait for notification from AudioClient or Sleep half latency - int indexHandle = 0; - if (isUsingEventSync) - { - indexHandle = WaitHandle.WaitAny(waitHandles, 3 * latencyMilliseconds, false); - } - else - { - Thread.Sleep(latencyMilliseconds / 2); - } - - // If still playing and notification is ok - if (playbackState == PlaybackState.Playing && indexHandle != WaitHandle.WaitTimeout) - { - // See how much buffer space is available. - int numFramesPadding; - if (isUsingEventSync) - { - // In exclusive mode, always ask the max = bufferFrameCount = audioClient.BufferSize - numFramesPadding = (shareMode == AudioClientShareMode.Shared) ? audioClient.CurrentPadding : 0; - } - else - { - numFramesPadding = audioClient.CurrentPadding; - } - int numFramesAvailable = bufferFrameCount - numFramesPadding; - if (numFramesAvailable > 10) // see https://naudio.codeplex.com/workitem/16363 - { - FillBuffer(playbackProvider, numFramesAvailable); - } - } - } - Thread.Sleep(latencyMilliseconds / 2); - audioClient.Stop(); - if (playbackState == PlaybackState.Stopped) - { - audioClient.Reset(); - } - } - catch (Exception e) - { - exception = e; - } - finally - { - if (resamplerDmoStream != null) - { - resamplerDmoStream.Dispose(); - } - RaisePlaybackStopped(exception); - } - } - - private void RaisePlaybackStopped(Exception e) - { - var handler = PlaybackStopped; - if (handler != null) - { - if (syncContext == null) - { - handler(this, new StoppedEventArgs(e)); - } - else - { - syncContext.Post(state => handler(this, new StoppedEventArgs(e)), null); - } - } - } - - private void FillBuffer(IWaveProvider playbackProvider, int frameCount) - { - var buffer = renderClient.GetBuffer(frameCount); - var readLength = frameCount * bytesPerFrame; - int read = playbackProvider.Read(readBuffer, 0, readLength); - if (read == 0) - { - playbackState = PlaybackState.Stopped; - } - Marshal.Copy(readBuffer,0,buffer,read); - int actualFrameCount = read / bytesPerFrame; - /*if (actualFrameCount != frameCount) - { - Debug.WriteLine(String.Format("WASAPI wanted {0} frames, supplied {1}", frameCount, actualFrameCount )); - }*/ - renderClient.ReleaseBuffer(actualFrameCount, AudioClientBufferFlags.None); - } - - /// - /// Gets the current position in bytes from the wave output device. - /// (n.b. this is not the same thing as the position within your reader - /// stream) - /// - /// Position in bytes - public long GetPosition() - { - if (playbackState == PlaybackState.Stopped) - { - return 0; - } - return (long)audioClient.AudioClockClient.AdjustedPosition; - } - - /// - /// Gets a instance indicating the format the hardware is using. - /// - public WaveFormat OutputWaveFormat - { - get { return outputFormat; } - } - - #region IWavePlayer Members - - /// - /// Begin Playback - /// - public void Play() - { - if (playbackState != PlaybackState.Playing) - { - if (playbackState == PlaybackState.Stopped) - { - playThread = new Thread(PlayThread); - playbackState = PlaybackState.Playing; - playThread.Start(); - } - else - { - playbackState = PlaybackState.Playing; - } - } - } - - /// - /// Stop playback and flush buffers - /// - public void Stop() - { - if (playbackState != PlaybackState.Stopped) - { - playbackState = PlaybackState.Stopped; - playThread.Join(); - playThread = null; - } - } - - /// - /// Stop playback without flushing buffers - /// - public void Pause() - { - if (playbackState == PlaybackState.Playing) - { - playbackState = PlaybackState.Paused; - } - - } - - /// - /// Initialize for playing the specified wave stream - /// - /// IWaveProvider to play - public void Init(IWaveProvider waveProvider) - { - long latencyRefTimes = latencyMilliseconds * 10000; - outputFormat = waveProvider.WaveFormat; - // first attempt uses the WaveFormat from the WaveStream - WaveFormatExtensible closestSampleRateFormat; - if (!audioClient.IsFormatSupported(shareMode, outputFormat, out closestSampleRateFormat)) - { - // Use closesSampleRateFormat (in sharedMode, it equals usualy to the audioClient.MixFormat) - // See documentation : http://msdn.microsoft.com/en-us/library/ms678737(VS.85).aspx - // They say : "In shared mode, the audio engine always supports the mix format" - // The MixFormat is more likely to be a WaveFormatExtensible. - if (closestSampleRateFormat == null) - { - WaveFormat correctSampleRateFormat = audioClient.MixFormat; - /*WaveFormat.CreateIeeeFloatWaveFormat( - audioClient.MixFormat.SampleRate, - audioClient.MixFormat.Channels);*/ - - if (!audioClient.IsFormatSupported(shareMode, correctSampleRateFormat)) - { - // Iterate from Worst to Best Format - WaveFormatExtensible[] bestToWorstFormats = { - new WaveFormatExtensible( - outputFormat.SampleRate, 32, - outputFormat.Channels), - new WaveFormatExtensible( - outputFormat.SampleRate, 24, - outputFormat.Channels), - new WaveFormatExtensible( - outputFormat.SampleRate, 16, - outputFormat.Channels), - }; - - // Check from best Format to worst format ( Float32, Int24, Int16 ) - for (int i = 0; i < bestToWorstFormats.Length; i++ ) - { - correctSampleRateFormat = bestToWorstFormats[i]; - if ( audioClient.IsFormatSupported(shareMode, correctSampleRateFormat) ) - { - break; - } - correctSampleRateFormat = null; - } - - // If still null, then test on the PCM16, 2 channels - if (correctSampleRateFormat == null) - { - // Last Last Last Chance (Thanks WASAPI) - correctSampleRateFormat = new WaveFormatExtensible(outputFormat.SampleRate, 16, 2); - if (!audioClient.IsFormatSupported(shareMode, correctSampleRateFormat)) - { - throw new NotSupportedException("Can't find a supported format to use"); - } - } - } - outputFormat = correctSampleRateFormat; - } - else - { - outputFormat = closestSampleRateFormat; - } - - // just check that we can make it. - using (new ResamplerDmoStream(waveProvider, outputFormat)) - { - } - dmoResamplerNeeded = true; - } - else - { - dmoResamplerNeeded = false; - } - sourceProvider = waveProvider; - - // If using EventSync, setup is specific with shareMode - if (isUsingEventSync) - { - // Init Shared or Exclusive - if (shareMode == AudioClientShareMode.Shared) - { - // With EventCallBack and Shared, both latencies must be set to 0 (update - not sure this is true anymore) - // - audioClient.Initialize(shareMode, AudioClientStreamFlags.EventCallback, latencyRefTimes, 0, - outputFormat, Guid.Empty); - - // Windows 10 returns 0 from stream latency, resulting in maxing out CPU usage later - var streamLatency = audioClient.StreamLatency; - if (streamLatency != 0) - { - // Get back the effective latency from AudioClient - latencyMilliseconds = (int)(streamLatency / 10000); - } - } - else - { - // With EventCallBack and Exclusive, both latencies must equals - audioClient.Initialize(shareMode, AudioClientStreamFlags.EventCallback, latencyRefTimes, latencyRefTimes, - outputFormat, Guid.Empty); - } - - // Create the Wait Event Handle - frameEventWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset); - audioClient.SetEventHandle(frameEventWaitHandle.SafeWaitHandle.DangerousGetHandle()); - } - else - { - // Normal setup for both sharedMode - audioClient.Initialize(shareMode, AudioClientStreamFlags.None, latencyRefTimes, 0, - outputFormat, Guid.Empty); - } - - // Get the RenderClient - renderClient = audioClient.AudioRenderClient; - } - - /// - /// Playback State - /// - public PlaybackState PlaybackState - { - get { return playbackState; } - } - - /// - /// Volume - /// - public float Volume - { - get - { - return mmDevice.AudioEndpointVolume.MasterVolumeLevelScalar; - } - set - { - if (value < 0) throw new ArgumentOutOfRangeException("value", "Volume must be between 0.0 and 1.0"); - if (value > 1) throw new ArgumentOutOfRangeException("value", "Volume must be between 0.0 and 1.0"); - mmDevice.AudioEndpointVolume.MasterVolumeLevelScalar = value; - } - } - - /// - /// Retrieve the AudioStreamVolume object for this audio stream - /// - /// - /// This returns the AudioStreamVolume object ONLY for shared audio streams. - /// - /// - /// This is thrown when an exclusive audio stream is being used. - /// - public AudioStreamVolume AudioStreamVolume - { - get - { - if (shareMode == AudioClientShareMode.Exclusive) - { - throw new InvalidOperationException("AudioStreamVolume is ONLY supported for shared audio streams."); - } - return audioClient.AudioStreamVolume; - } - } - - #endregion - - #region IDisposable Members - - /// - /// Dispose - /// - public void Dispose() - { - if (audioClient != null) - { - Stop(); - - audioClient.Dispose(); - audioClient = null; - renderClient = null; - } - } - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WasapiOut.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WasapiOut.cs.meta deleted file mode 100644 index 0140114..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WasapiOut.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 490186c1ee097364aa8d2711dab5e37b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveBuffer.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveBuffer.cs deleted file mode 100644 index 7e5ea99..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveBuffer.cs +++ /dev/null @@ -1,242 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave -{ - /// - /// WaveBuffer class use to store wave datas. Data can be manipulated with arrays - /// (,,, ) that are pointing to the - /// same memory buffer. Use the associated Count property based on the type of buffer to get the number of - /// data in the buffer. - /// Implicit casting is now supported to float[], byte[], int[], short[]. - /// You must not use Length on returned arrays. - /// - /// n.b. FieldOffset is 8 now to allow it to work natively on 64 bit - /// - [StructLayout(LayoutKind.Explicit, Pack = 2)] - public class WaveBuffer : IWaveBuffer - { - /// - /// Number of Bytes - /// - [FieldOffset(0)] - public int numberOfBytes; - [FieldOffset(8)] - private byte[] byteBuffer; - [FieldOffset(8)] - private float[] floatBuffer; - [FieldOffset(8)] - private short[] shortBuffer; - [FieldOffset(8)] - private int[] intBuffer; - - /// - /// Initializes a new instance of the class. - /// - /// The number of bytes. The size of the final buffer will be aligned on 4 Bytes (upper bound) - public WaveBuffer(int sizeToAllocateInBytes) - { - int aligned4Bytes = sizeToAllocateInBytes%4; - sizeToAllocateInBytes = (aligned4Bytes == 0) ? sizeToAllocateInBytes : sizeToAllocateInBytes + 4 - aligned4Bytes; - // Allocating the byteBuffer is co-allocating the floatBuffer and the intBuffer - byteBuffer = new byte[sizeToAllocateInBytes]; - numberOfBytes = 0; - } - - /// - /// Initializes a new instance of the class binded to a specific byte buffer. - /// - /// A byte buffer to bound the WaveBuffer to. - public WaveBuffer(byte[] bufferToBoundTo) - { - BindTo(bufferToBoundTo); - } - - /// - /// Binds this WaveBuffer instance to a specific byte buffer. - /// - /// A byte buffer to bound the WaveBuffer to. - public void BindTo(byte[] bufferToBoundTo) - { - /* WaveBuffer assumes the caller knows what they are doing. We will let this pass - * if ( (bufferToBoundTo.Length % 4) != 0 ) - { - throw new ArgumentException("The byte buffer to bound must be 4 bytes aligned"); - }*/ - byteBuffer = bufferToBoundTo; - numberOfBytes = 0; - } - - /// - /// Performs an implicit conversion from to . - /// - /// The wave buffer. - /// The result of the conversion. - public static implicit operator byte[](WaveBuffer waveBuffer) - { - return waveBuffer.byteBuffer; - } - - /// - /// Performs an implicit conversion from to . - /// - /// The wave buffer. - /// The result of the conversion. - public static implicit operator float[](WaveBuffer waveBuffer) - { - return waveBuffer.floatBuffer; - } - - /// - /// Performs an implicit conversion from to . - /// - /// The wave buffer. - /// The result of the conversion. - public static implicit operator int[](WaveBuffer waveBuffer) - { - return waveBuffer.intBuffer; - } - - /// - /// Performs an implicit conversion from to . - /// - /// The wave buffer. - /// The result of the conversion. - public static implicit operator short[](WaveBuffer waveBuffer) - { - return waveBuffer.shortBuffer; - } - - /// - /// Gets the byte buffer. - /// - /// The byte buffer. - public byte[] ByteBuffer - { - get { return byteBuffer; } - } - - /// - /// Gets the float buffer. - /// - /// The float buffer. - public float[] FloatBuffer - { - get { return floatBuffer; } - } - - /// - /// Gets the short buffer. - /// - /// The short buffer. - public short[] ShortBuffer - { - get { return shortBuffer; } - } - - /// - /// Gets the int buffer. - /// - /// The int buffer. - public int[] IntBuffer - { - get { return intBuffer; } - } - - - /// - /// Gets the max size in bytes of the byte buffer.. - /// - /// Maximum number of bytes in the buffer. - public int MaxSize - { - get { return byteBuffer.Length; } - } - - /// - /// Gets or sets the byte buffer count. - /// - /// The byte buffer count. - public int ByteBufferCount - { - get { return numberOfBytes; } - set - { - numberOfBytes = CheckValidityCount("ByteBufferCount", value, 1); - } - } - /// - /// Gets or sets the float buffer count. - /// - /// The float buffer count. - public int FloatBufferCount - { - get { return numberOfBytes / 4; } - set - { - numberOfBytes = CheckValidityCount("FloatBufferCount", value, 4); - } - } - /// - /// Gets or sets the short buffer count. - /// - /// The short buffer count. - public int ShortBufferCount - { - get { return numberOfBytes / 2; } - set - { - numberOfBytes = CheckValidityCount("ShortBufferCount", value, 2); - } - } - /// - /// Gets or sets the int buffer count. - /// - /// The int buffer count. - public int IntBufferCount - { - get { return numberOfBytes / 4; } - set - { - numberOfBytes = CheckValidityCount("IntBufferCount", value, 4); - } - } - - /// - /// Clears the associated buffer. - /// - public void Clear() - { - Array.Clear(byteBuffer, 0, byteBuffer.Length); - } - - /// - /// Copy this WaveBuffer to a destination buffer up to ByteBufferCount bytes. - /// - public void Copy(Array destinationArray) - { - Array.Copy(byteBuffer, destinationArray, numberOfBytes); - } - - /// - /// Checks the validity of the count parameters. - /// - /// Name of the arg. - /// The value. - /// The size of value. - private int CheckValidityCount(string argName, int value, int sizeOfValue) - { - int newNumberOfBytes = value * sizeOfValue; - if ( (newNumberOfBytes % 4) != 0 ) - { - throw new ArgumentOutOfRangeException(argName, String.Format("{0} cannot set a count ({1}) that is not 4 bytes aligned ", argName, newNumberOfBytes)); - } - - if (value < 0 || value > (byteBuffer.Length / sizeOfValue)) - { - throw new ArgumentOutOfRangeException(argName, String.Format("{0} cannot set a count that exceed max count {1}", argName, byteBuffer.Length / sizeOfValue)); - } - return newNumberOfBytes; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveBuffer.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveBuffer.cs.meta deleted file mode 100644 index d476f9c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveBuffer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a81b74598eb440246ad15f57274caf00 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveFileWriter.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveFileWriter.cs deleted file mode 100644 index 4862d82..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveFileWriter.cs +++ /dev/null @@ -1,443 +0,0 @@ -using System; -using System.IO; -using NAudio.Wave.SampleProviders; -using NAudio.Utils; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// This class writes WAV data to a .wav file on disk - /// - public class WaveFileWriter : Stream - { - private Stream outStream; - private readonly BinaryWriter writer; - private long dataSizePos; - private long factSampleCountPos; - private long dataChunkSize; - private readonly WaveFormat format; - private readonly string filename; - - /// - /// Creates a 16 bit Wave File from an ISampleProvider - /// BEWARE: the source provider must not return data indefinitely - /// - /// The filename to write to - /// The source sample provider - public static void CreateWaveFile16(string filename, ISampleProvider sourceProvider) - { - CreateWaveFile(filename, new SampleToWaveProvider16(sourceProvider)); - } - - /// - /// Creates a Wave file by reading all the data from a WaveProvider - /// BEWARE: the WaveProvider MUST return 0 from its Read method when it is finished, - /// or the Wave File will grow indefinitely. - /// - /// The filename to use - /// The source WaveProvider - public static void CreateWaveFile(string filename, IWaveProvider sourceProvider) - { - using (var writer = new WaveFileWriter(filename, sourceProvider.WaveFormat)) - { - var buffer = new byte[sourceProvider.WaveFormat.AverageBytesPerSecond * 4]; - while (true) - { - int bytesRead = sourceProvider.Read(buffer, 0, buffer.Length); - if (bytesRead == 0) - { - // end of source provider - break; - } - // Write will throw exception if WAV file becomes too large - writer.Write(buffer, 0, bytesRead); - } - } - } - - /// - /// Writes to a stream by reading all the data from a WaveProvider - /// BEWARE: the WaveProvider MUST return 0 from its Read method when it is finished, - /// or the Wave File will grow indefinitely. - /// - /// The stream the method will output to - /// The source WaveProvider - public static void WriteWavFileToStream(Stream outStream, IWaveProvider sourceProvider) - { - using (var writer = new WaveFileWriter(new IgnoreDisposeStream(outStream), sourceProvider.WaveFormat)) - { - var buffer = new byte[sourceProvider.WaveFormat.AverageBytesPerSecond * 4]; - while(true) - { - var bytesRead = sourceProvider.Read(buffer, 0, buffer.Length); - if (bytesRead == 0) - { - // end of source provider - outStream.Flush(); - break; - } - - writer.Write(buffer, 0, bytesRead); - } - } - } - - /// - /// WaveFileWriter that actually writes to a stream - /// - /// Stream to be written to - /// Wave format to use - public WaveFileWriter(Stream outStream, WaveFormat format) - { - this.outStream = outStream; - this.format = format; - writer = new BinaryWriter(outStream, System.Text.Encoding.UTF8); - writer.Write(System.Text.Encoding.UTF8.GetBytes("RIFF")); - writer.Write((int)0); // placeholder - writer.Write(System.Text.Encoding.UTF8.GetBytes("WAVE")); - - writer.Write(System.Text.Encoding.UTF8.GetBytes("fmt ")); - format.Serialize(writer); - - CreateFactChunk(); - WriteDataChunkHeader(); - } - - /// - /// Creates a new WaveFileWriter - /// - /// The filename to write to - /// The Wave Format of the output data - public WaveFileWriter(string filename, WaveFormat format) - : this(new FileStream(filename, FileMode.Create, FileAccess.Write, FileShare.Read), format) - { - this.filename = filename; - } - - private void WriteDataChunkHeader() - { - writer.Write(System.Text.Encoding.UTF8.GetBytes("data")); - dataSizePos = outStream.Position; - writer.Write((int)0); // placeholder - } - - private void CreateFactChunk() - { - if (HasFactChunk()) - { - writer.Write(System.Text.Encoding.UTF8.GetBytes("fact")); - writer.Write((int)4); - factSampleCountPos = outStream.Position; - writer.Write((int)0); // number of samples - } - } - - private bool HasFactChunk() - { - return format.Encoding != WaveFormatEncoding.Pcm && - format.BitsPerSample != 0; - } - - /// - /// The wave file name or null if not applicable - /// - public string Filename => filename; - - /// - /// Number of bytes of audio in the data chunk - /// - public override long Length => dataChunkSize; - - /// - /// Total time (calculated from Length and average bytes per second) - /// - public TimeSpan TotalTime => TimeSpan.FromSeconds((double)Length / WaveFormat.AverageBytesPerSecond); - - /// - /// WaveFormat of this wave file - /// - public WaveFormat WaveFormat => format; - - /// - /// Returns false: Cannot read from a WaveFileWriter - /// - public override bool CanRead => false; - - /// - /// Returns true: Can write to a WaveFileWriter - /// - public override bool CanWrite => true; - - /// - /// Returns false: Cannot seek within a WaveFileWriter - /// - public override bool CanSeek => false; - - /// - /// Read is not supported for a WaveFileWriter - /// - public override int Read(byte[] buffer, int offset, int count) - { - throw new InvalidOperationException("Cannot read from a WaveFileWriter"); - } - - /// - /// Seek is not supported for a WaveFileWriter - /// - public override long Seek(long offset, SeekOrigin origin) - { - throw new InvalidOperationException("Cannot seek within a WaveFileWriter"); - } - - /// - /// SetLength is not supported for WaveFileWriter - /// - /// - public override void SetLength(long value) - { - throw new InvalidOperationException("Cannot set length of a WaveFileWriter"); - } - - /// - /// Gets the Position in the WaveFile (i.e. number of bytes written so far) - /// - public override long Position - { - get => dataChunkSize; - set => throw new InvalidOperationException("Repositioning a WaveFileWriter is not supported"); - } - - /// - /// Appends bytes to the WaveFile (assumes they are already in the correct format) - /// - /// the buffer containing the wave data - /// the offset from which to start writing - /// the number of bytes to write - [Obsolete("Use Write instead")] - public void WriteData(byte[] data, int offset, int count) - { - Write(data, offset, count); - } - - /// - /// Appends bytes to the WaveFile (assumes they are already in the correct format) - /// - /// the buffer containing the wave data - /// the offset from which to start writing - /// the number of bytes to write - public override void Write(byte[] data, int offset, int count) - { - if (outStream.Length + count > UInt32.MaxValue) - throw new ArgumentException("WAV file too large", nameof(count)); - outStream.Write(data, offset, count); - dataChunkSize += count; - } - - private readonly byte[] value24 = new byte[3]; // keep this around to save us creating it every time - - /// - /// Writes a single sample to the Wave file - /// - /// the sample to write (assumed floating point with 1.0f as max value) - public void WriteSample(float sample) - { - if (WaveFormat.BitsPerSample == 16) - { - writer.Write((Int16)(Int16.MaxValue * sample)); - dataChunkSize += 2; - } - else if (WaveFormat.BitsPerSample == 24) - { - var value = BitConverter.GetBytes((Int32)(Int32.MaxValue * sample)); - value24[0] = value[1]; - value24[1] = value[2]; - value24[2] = value[3]; - writer.Write(value24); - dataChunkSize += 3; - } - else if (WaveFormat.BitsPerSample == 32 && WaveFormat.Encoding == WaveFormatEncoding.Extensible) - { - writer.Write(UInt16.MaxValue * (Int32)sample); - dataChunkSize += 4; - } - else if (WaveFormat.Encoding == WaveFormatEncoding.IeeeFloat) - { - writer.Write(sample); - dataChunkSize += 4; - } - else - { - throw new InvalidOperationException("Only 16, 24 or 32 bit PCM or IEEE float audio data supported"); - } - } - - /// - /// Writes 32 bit floating point samples to the Wave file - /// They will be converted to the appropriate bit depth depending on the WaveFormat of the WAV file - /// - /// The buffer containing the floating point samples - /// The offset from which to start writing - /// The number of floating point samples to write - public void WriteSamples(float[] samples, int offset, int count) - { - for (int n = 0; n < count; n++) - { - WriteSample(samples[offset + n]); - } - } - - /// - /// Writes 16 bit samples to the Wave file - /// - /// The buffer containing the 16 bit samples - /// The offset from which to start writing - /// The number of 16 bit samples to write - [Obsolete("Use WriteSamples instead")] - public void WriteData(short[] samples, int offset, int count) - { - WriteSamples(samples, offset, count); - } - - - /// - /// Writes 16 bit samples to the Wave file - /// - /// The buffer containing the 16 bit samples - /// The offset from which to start writing - /// The number of 16 bit samples to write - public void WriteSamples(short[] samples, int offset, int count) - { - // 16 bit PCM data - if (WaveFormat.BitsPerSample == 16) - { - for (int sample = 0; sample < count; sample++) - { - writer.Write(samples[sample + offset]); - } - dataChunkSize += (count * 2); - } - // 24 bit PCM data - else if (WaveFormat.BitsPerSample == 24) - { - for (int sample = 0; sample < count; sample++) - { - var value = BitConverter.GetBytes(UInt16.MaxValue * (Int32)samples[sample + offset]); - value24[0] = value[1]; - value24[1] = value[2]; - value24[2] = value[3]; - writer.Write(value24); - } - dataChunkSize += (count * 3); - } - // 32 bit PCM data - else if (WaveFormat.BitsPerSample == 32 && WaveFormat.Encoding == WaveFormatEncoding.Extensible) - { - for (int sample = 0; sample < count; sample++) - { - writer.Write(UInt16.MaxValue * (Int32)samples[sample + offset]); - } - dataChunkSize += (count * 4); - } - // IEEE float data - else if (WaveFormat.BitsPerSample == 32 && WaveFormat.Encoding == WaveFormatEncoding.IeeeFloat) - { - for (int sample = 0; sample < count; sample++) - { - writer.Write((float)samples[sample + offset] / (float)(Int16.MaxValue + 1)); - } - dataChunkSize += (count * 4); - } - else - { - throw new InvalidOperationException("Only 16, 24 or 32 bit PCM or IEEE float audio data supported"); - } - } - - /// - /// Ensures data is written to disk - /// Also updates header, so that WAV file will be valid up to the point currently written - /// - public override void Flush() - { - var pos = writer.BaseStream.Position; - UpdateHeader(writer); - writer.BaseStream.Position = pos; - } - - #region IDisposable Members - - /// - /// Actually performs the close,making sure the header contains the correct data - /// - /// True if called from Dispose - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (outStream != null) - { - try - { - UpdateHeader(writer); - } - finally - { - // in a finally block as we don't want the FileStream to run its disposer in - // the GC thread if the code above caused an IOException (e.g. due to disk full) - outStream.Close(); // will close the underlying base stream - outStream = null; - } - } - } - } - - /// - /// Updates the header with file size information - /// - protected virtual void UpdateHeader(BinaryWriter writer) - { - writer.Flush(); - UpdateRiffChunk(writer); - UpdateFactChunk(writer); - UpdateDataChunk(writer); - } - - private void UpdateDataChunk(BinaryWriter writer) - { - writer.Seek((int)dataSizePos, SeekOrigin.Begin); - writer.Write((UInt32)dataChunkSize); - } - - private void UpdateRiffChunk(BinaryWriter writer) - { - writer.Seek(4, SeekOrigin.Begin); - writer.Write((UInt32)(outStream.Length - 8)); - } - - private void UpdateFactChunk(BinaryWriter writer) - { - if (HasFactChunk()) - { - int bitsPerSample = (format.BitsPerSample * format.Channels); - if (bitsPerSample != 0) - { - writer.Seek((int)factSampleCountPos, SeekOrigin.Begin); - - writer.Write((int)((dataChunkSize * 8) / bitsPerSample)); - } - } - } - - /// - /// Finaliser - should only be called if the user forgot to close this WaveFileWriter - /// - ~WaveFileWriter() - { - System.Diagnostics.Debug.Assert(false, "WaveFileWriter was not disposed"); - Dispose(false); - } - - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveFileWriter.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveFileWriter.cs.meta deleted file mode 100644 index 90e5a69..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveFileWriter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8195c9da6bd4df842937a2e090876e09 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOut.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOut.cs deleted file mode 100644 index 7ba33f5..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOut.cs +++ /dev/null @@ -1,425 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Threading; - -namespace NAudio.Wave -{ - /// - /// Represents a wave out device - /// - public class WaveOut : IWavePlayer, IWavePosition - { - private IntPtr hWaveOut; - private WaveOutBuffer[] buffers; - private IWaveProvider waveStream; - private volatile PlaybackState playbackState; - private readonly WaveInterop.WaveCallback callback; - private float volume = 1; - private readonly WaveCallbackInfo callbackInfo; - private readonly object waveOutLock; - private int queuedBuffers; - private readonly SynchronizationContext syncContext; - - /// - /// Indicates playback has stopped automatically - /// - public event EventHandler PlaybackStopped; - - /// - /// Retrieves the capabilities of a waveOut device - /// - /// Device to test - /// The WaveOut device capabilities - public static WaveOutCapabilities GetCapabilities(int devNumber) - { - var caps = new WaveOutCapabilities(); - var structSize = Marshal.SizeOf(caps); - MmException.Try(WaveInterop.waveOutGetDevCaps((IntPtr)devNumber, out caps, structSize), "waveOutGetDevCaps"); - return caps; - } - - /// - /// Returns the number of Wave Out devices available in the system - /// - public static Int32 DeviceCount => WaveInterop.waveOutGetNumDevs(); - - /// - /// Gets or sets the desired latency in milliseconds - /// Should be set before a call to Init - /// - public int DesiredLatency { get; set; } - - /// - /// Gets or sets the number of buffers used - /// Should be set before a call to Init - /// - public int NumberOfBuffers { get; set; } - - /// - /// Gets or sets the device number - /// Should be set before a call to Init - /// This must be between -1 and DeviceCount - 1. - /// -1 means stick to default device even default device is changed - /// - public int DeviceNumber { get; set; } = -1; - - - /// - /// Creates a default WaveOut device - /// Will use window callbacks if called from a GUI thread, otherwise function - /// callbacks - /// - public WaveOut() - : this(SynchronizationContext.Current == null ? WaveCallbackInfo.FunctionCallback() : WaveCallbackInfo.NewWindow()) - { - } - - /// - /// Creates a WaveOut device using the specified window handle for callbacks - /// - /// A valid window handle - public WaveOut(IntPtr windowHandle) - : this(WaveCallbackInfo.ExistingWindow(windowHandle)) - { - - } - - /// - /// Opens a WaveOut device - /// - public WaveOut(WaveCallbackInfo callbackInfo) - { - syncContext = SynchronizationContext.Current; - // set default values up - DesiredLatency = 300; - NumberOfBuffers = 2; - - callback = Callback; - waveOutLock = new object(); - this.callbackInfo = callbackInfo; - callbackInfo.Connect(callback); - } - - /// - /// Initialises the WaveOut device - /// - /// WaveProvider to play - public void Init(IWaveProvider waveProvider) - { - waveStream = waveProvider; - int bufferSize = waveProvider.WaveFormat.ConvertLatencyToByteSize((DesiredLatency + NumberOfBuffers - 1) / NumberOfBuffers); - - MmResult result; - lock (waveOutLock) - { - result = callbackInfo.WaveOutOpen(out hWaveOut, DeviceNumber, waveStream.WaveFormat, callback); - } - MmException.Try(result, "waveOutOpen"); - - buffers = new WaveOutBuffer[NumberOfBuffers]; - playbackState = PlaybackState.Stopped; - for (int n = 0; n < NumberOfBuffers; n++) - { - buffers[n] = new WaveOutBuffer(hWaveOut, bufferSize, waveStream, waveOutLock); - } - } - - /// - /// Start playing the audio from the WaveStream - /// - public void Play() - { - if (playbackState == PlaybackState.Stopped) - { - playbackState = PlaybackState.Playing; - Debug.Assert(queuedBuffers == 0, "Buffers already queued on play"); - EnqueueBuffers(); - } - else if (playbackState == PlaybackState.Paused) - { - EnqueueBuffers(); - Resume(); - playbackState = PlaybackState.Playing; - } - } - - private void EnqueueBuffers() - { - for (int n = 0; n < NumberOfBuffers; n++) - { - if (!buffers[n].InQueue) - { - if (buffers[n].OnDone()) - { - Interlocked.Increment(ref queuedBuffers); - } - else - { - playbackState = PlaybackState.Stopped; - break; - } - //Debug.WriteLine(String.Format("Resume from Pause: Buffer [{0}] requeued", n)); - } - else - { - //Debug.WriteLine(String.Format("Resume from Pause: Buffer [{0}] already queued", n)); - } - } - } - - /// - /// Pause the audio - /// - public void Pause() - { - if (playbackState == PlaybackState.Playing) - { - MmResult result; - playbackState = PlaybackState.Paused; // set this here, to avoid a deadlock with some drivers - lock (waveOutLock) - { - result = WaveInterop.waveOutPause(hWaveOut); - } - if (result != MmResult.NoError) - { - throw new MmException(result, "waveOutPause"); - } - } - } - - /// - /// Resume playing after a pause from the same position - /// - public void Resume() - { - if (playbackState == PlaybackState.Paused) - { - MmResult result; - lock (waveOutLock) - { - result = WaveInterop.waveOutRestart(hWaveOut); - } - if (result != MmResult.NoError) - { - throw new MmException(result, "waveOutRestart"); - } - playbackState = PlaybackState.Playing; - } - } - - /// - /// Stop and reset the WaveOut device - /// - public void Stop() - { - if (playbackState != PlaybackState.Stopped) - { - - // in the call to waveOutReset with function callbacks - // some drivers will block here until OnDone is called - // for every buffer - playbackState = PlaybackState.Stopped; // set this here to avoid a problem with some drivers whereby - MmResult result; - lock (waveOutLock) - { - result = WaveInterop.waveOutReset(hWaveOut); - } - if (result != MmResult.NoError) - { - throw new MmException(result, "waveOutReset"); - } - - // with function callbacks, waveOutReset will call OnDone, - // and so PlaybackStopped must not be raised from the handler - // we know playback has definitely stopped now, so raise callback - if (callbackInfo.Strategy == WaveCallbackStrategy.FunctionCallback) - { - RaisePlaybackStoppedEvent(null); - } - } - } - - /// - /// Gets the current position in bytes from the wave output device. - /// (n.b. this is not the same thing as the position within your reader - /// stream - it calls directly into waveOutGetPosition) - /// - /// Position in bytes - public long GetPosition() - { - lock (waveOutLock) - { - MmTime mmTime = new MmTime(); - mmTime.wType = MmTime.TIME_BYTES; // request results in bytes, TODO: perhaps make this a little more flexible and support the other types? - MmException.Try(WaveInterop.waveOutGetPosition(hWaveOut, out mmTime, Marshal.SizeOf(mmTime)), "waveOutGetPosition"); - - if (mmTime.wType != MmTime.TIME_BYTES) - throw new Exception(string.Format("waveOutGetPosition: wType -> Expected {0}, Received {1}", MmTime.TIME_BYTES, mmTime.wType)); - - return mmTime.cb; - } - } - - /// - /// Gets a instance indicating the format the hardware is using. - /// - public WaveFormat OutputWaveFormat => waveStream.WaveFormat; - - /// - /// Playback State - /// - public PlaybackState PlaybackState => playbackState; - - /// - /// Volume for this device 1.0 is full scale - /// - public float Volume - { - get => volume; - set - { - SetWaveOutVolume(value, hWaveOut, waveOutLock); - volume = value; - } - } - - internal static void SetWaveOutVolume(float value, IntPtr hWaveOut, object lockObject) - { - if (value < 0) throw new ArgumentOutOfRangeException(nameof(value), "Volume must be between 0.0 and 1.0"); - if (value > 1) throw new ArgumentOutOfRangeException(nameof(value), "Volume must be between 0.0 and 1.0"); - float left = value; - float right = value; - - int stereoVolume = (int) (left*0xFFFF) + ((int) (right*0xFFFF) << 16); - MmResult result; - lock (lockObject) - { - result = WaveInterop.waveOutSetVolume(hWaveOut, stereoVolume); - } - MmException.Try(result, "waveOutSetVolume"); - } - - #region Dispose Pattern - - /// - /// Closes this WaveOut device - /// - public void Dispose() - { - GC.SuppressFinalize(this); - Dispose(true); - } - - /// - /// Closes the WaveOut device and disposes of buffers - /// - /// True if called from Dispose - protected void Dispose(bool disposing) - { - Stop(); - - if (disposing) - { - if (buffers != null) - { - for (int n = 0; n < buffers.Length; n++) - { - if (buffers[n] != null) - { - buffers[n].Dispose(); - } - } - buffers = null; - } - } - - lock (waveOutLock) - { - WaveInterop.waveOutClose(hWaveOut); - } - if (disposing) - { - callbackInfo.Disconnect(); - } - } - - /// - /// Finalizer. Only called when user forgets to call Dispose - /// - ~WaveOut() - { - System.Diagnostics.Debug.Assert(false, "WaveOut device was not closed"); - Dispose(false); - } - - #endregion - - // made non-static so that playing can be stopped here - private void Callback(IntPtr hWaveOut, WaveInterop.WaveMessage uMsg, IntPtr dwInstance, WaveHeader wavhdr, IntPtr dwReserved) - { - if (uMsg == WaveInterop.WaveMessage.WaveOutDone) - { - GCHandle hBuffer = (GCHandle)wavhdr.userData; - WaveOutBuffer buffer = (WaveOutBuffer)hBuffer.Target; - Interlocked.Decrement(ref queuedBuffers); - Exception exception = null; - // check that we're not here through pressing stop - if (PlaybackState == PlaybackState.Playing) - { - // to avoid deadlocks in Function callback mode, - // we lock round this whole thing, which will include the - // reading from the stream. - // this protects us from calling waveOutReset on another - // thread while a WaveOutWrite is in progress - lock (waveOutLock) - { - try - { - if (buffer.OnDone()) - { - Interlocked.Increment(ref queuedBuffers); - } - } - catch (Exception e) - { - // one likely cause is soundcard being unplugged - exception = e; - } - } - } - if (queuedBuffers == 0) - { - if (callbackInfo.Strategy == WaveCallbackStrategy.FunctionCallback && playbackState == Wave.PlaybackState.Stopped) - { - // the user has pressed stop - // DO NOT raise the playback stopped event from here - // since on the main thread we are still in the waveOutReset function - // Playback stopped will be raised elsewhere - } - else - { - playbackState = PlaybackState.Stopped; // set explicitly for when we reach the end of the audio - RaisePlaybackStoppedEvent(exception); - } - } - } - } - - private void RaisePlaybackStoppedEvent(Exception e) - { - var handler = PlaybackStopped; - if (handler != null) - { - if (syncContext == null) - { - handler(this, new StoppedEventArgs(e)); - } - else - { - syncContext.Post(state => handler(this, new StoppedEventArgs(e)), null); - } - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOut.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOut.cs.meta deleted file mode 100644 index 07b0267..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOut.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9b80d563b50f0ff42b9fd1667b7e45f5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOutEvent.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOutEvent.cs deleted file mode 100644 index 54c84a9..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOutEvent.cs +++ /dev/null @@ -1,379 +0,0 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Runtime.InteropServices; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Alternative WaveOut class, making use of the Event callback - /// - public class WaveOutEvent : IWavePlayer, IWavePosition - { - private readonly object waveOutLock; - private readonly SynchronizationContext syncContext; - private IntPtr hWaveOut; // WaveOut handle - private WaveOutBuffer[] buffers; - private IWaveProvider waveStream; - private volatile PlaybackState playbackState; - private AutoResetEvent callbackEvent; - private float volume = 1.0f; - - /// - /// Indicates playback has stopped automatically - /// - public event EventHandler PlaybackStopped; - - /// - /// Gets or sets the desired latency in milliseconds - /// Should be set before a call to Init - /// - public int DesiredLatency { get; set; } - - /// - /// Gets or sets the number of buffers used - /// Should be set before a call to Init - /// - public int NumberOfBuffers { get; set; } - - /// - /// Gets or sets the device number - /// Should be set before a call to Init - /// This must be between -1 and DeviceCount - 1. - /// -1 means stick to default device even default device is changed - /// - public int DeviceNumber { get; set; } = -1; - - /// - /// Opens a WaveOut device - /// - public WaveOutEvent() - { - syncContext = SynchronizationContext.Current; - if (syncContext != null && - ((syncContext.GetType().Name == "LegacyAspNetSynchronizationContext") || - (syncContext.GetType().Name == "AspNetSynchronizationContext"))) - { - syncContext = null; - } - - // set default values up - DesiredLatency = 300; - NumberOfBuffers = 2; - - waveOutLock = new object(); - } - - /// - /// Initialises the WaveOut device - /// - /// WaveProvider to play - public void Init(IWaveProvider waveProvider) - { - if (playbackState != PlaybackState.Stopped) - { - throw new InvalidOperationException("Can't re-initialize during playback"); - } - if (hWaveOut != IntPtr.Zero) - { - // normally we don't allow calling Init twice, but as experiment, see if we can clean up and go again - // try to allow reuse of this waveOut device - // n.b. risky if Playback thread has not exited - DisposeBuffers(); - CloseWaveOut(); - } - - callbackEvent = new AutoResetEvent(false); - - waveStream = waveProvider; - int bufferSize = waveProvider.WaveFormat.ConvertLatencyToByteSize((DesiredLatency + NumberOfBuffers - 1) / NumberOfBuffers); - - MmResult result; - lock (waveOutLock) - { - result = WaveInterop.waveOutOpenWindow(out hWaveOut, (IntPtr)DeviceNumber, waveStream.WaveFormat, callbackEvent.SafeWaitHandle.DangerousGetHandle(), IntPtr.Zero, WaveInterop.WaveInOutOpenFlags.CallbackEvent); - } - MmException.Try(result, "waveOutOpen"); - - buffers = new WaveOutBuffer[NumberOfBuffers]; - playbackState = PlaybackState.Stopped; - for (var n = 0; n < NumberOfBuffers; n++) - { - buffers[n] = new WaveOutBuffer(hWaveOut, bufferSize, waveStream, waveOutLock); - } - } - - /// - /// Start playing the audio from the WaveStream - /// - public void Play() - { - if (buffers == null || waveStream == null) - { - throw new InvalidOperationException("Must call Init first"); - } - if (playbackState == PlaybackState.Stopped) - { - playbackState = PlaybackState.Playing; - callbackEvent.Set(); // give the thread a kick - ThreadPool.QueueUserWorkItem(state => PlaybackThread(), null); - } - else if (playbackState == PlaybackState.Paused) - { - Resume(); - callbackEvent.Set(); // give the thread a kick - } - } - - private void PlaybackThread() - { - Exception exception = null; - try - { - DoPlayback(); - } - catch (Exception e) - { - exception = e; - } - finally - { - playbackState = PlaybackState.Stopped; - // we're exiting our background thread - RaisePlaybackStoppedEvent(exception); - } - } - - private void DoPlayback() - { - while (playbackState != PlaybackState.Stopped) - { - if (!callbackEvent.WaitOne(DesiredLatency)) - { - if (playbackState == PlaybackState.Playing) - { - Debug.WriteLine("WARNING: WaveOutEvent callback event timeout"); - } - } - - - // requeue any buffers returned to us - if (playbackState == PlaybackState.Playing) - { - int queued = 0; - foreach (var buffer in buffers) - { - if (buffer.InQueue || buffer.OnDone()) - { - queued++; - } - } - if (queued == 0) - { - // we got to the end - playbackState = PlaybackState.Stopped; - callbackEvent.Set(); - } - } - } - } - - /// - /// Pause the audio - /// - public void Pause() - { - if (playbackState == PlaybackState.Playing) - { - MmResult result; - playbackState = PlaybackState.Paused; // set this here to avoid a deadlock problem with some drivers - lock (waveOutLock) - { - result = WaveInterop.waveOutPause(hWaveOut); - } - if (result != MmResult.NoError) - { - throw new MmException(result, "waveOutPause"); - } - } - } - - /// - /// Resume playing after a pause from the same position - /// - private void Resume() - { - if (playbackState == PlaybackState.Paused) - { - MmResult result; - lock (waveOutLock) - { - result = WaveInterop.waveOutRestart(hWaveOut); - } - if (result != MmResult.NoError) - { - throw new MmException(result, "waveOutRestart"); - } - playbackState = PlaybackState.Playing; - } - } - - /// - /// Stop and reset the WaveOut device - /// - public void Stop() - { - if (playbackState != PlaybackState.Stopped) - { - // in the call to waveOutReset with function callbacks - // some drivers will block here until OnDone is called - // for every buffer - playbackState = PlaybackState.Stopped; // set this here to avoid a problem with some drivers whereby - MmResult result; - lock (waveOutLock) - { - result = WaveInterop.waveOutReset(hWaveOut); - } - if (result != MmResult.NoError) - { - throw new MmException(result, "waveOutReset"); - } - callbackEvent.Set(); // give the thread a kick, make sure we exit - } - } - - /// - /// Gets the current position in bytes from the wave output device. - /// (n.b. this is not the same thing as the position within your reader - /// stream - it calls directly into waveOutGetPosition) - /// - /// Position in bytes - public long GetPosition() - { - lock (waveOutLock) - { - var mmTime = new MmTime(); - mmTime.wType = MmTime.TIME_BYTES; // request results in bytes, TODO: perhaps make this a little more flexible and support the other types? - MmException.Try(WaveInterop.waveOutGetPosition(hWaveOut, out mmTime, Marshal.SizeOf(mmTime)), "waveOutGetPosition"); - - if (mmTime.wType != MmTime.TIME_BYTES) - throw new Exception(string.Format("waveOutGetPosition: wType -> Expected {0}, Received {1}", MmTime.TIME_BYTES, mmTime.wType)); - - return mmTime.cb; - } - } - - /// - /// Gets a instance indicating the format the hardware is using. - /// - public WaveFormat OutputWaveFormat - { - get { return waveStream.WaveFormat; } - } - - /// - /// Playback State - /// - public PlaybackState PlaybackState - { - get { return playbackState; } - } - - /// - /// Obsolete property - /// - public float Volume - { - get { return volume; } - set - { - WaveOut.SetWaveOutVolume(value, hWaveOut, waveOutLock); - volume = value; - } - } - - #region Dispose Pattern - - /// - /// Closes this WaveOut device - /// - public void Dispose() - { - GC.SuppressFinalize(this); - Dispose(true); - } - - /// - /// Closes the WaveOut device and disposes of buffers - /// - /// True if called from Dispose - protected void Dispose(bool disposing) - { - Stop(); - - if (disposing) - { - DisposeBuffers(); - } - - CloseWaveOut(); - } - - private void CloseWaveOut() - { - if (callbackEvent != null) - { - callbackEvent.Close(); - callbackEvent = null; - } - lock (waveOutLock) - { - if (hWaveOut != IntPtr.Zero) - { - WaveInterop.waveOutClose(hWaveOut); - hWaveOut= IntPtr.Zero; - } - } - } - - private void DisposeBuffers() - { - if (buffers != null) - { - foreach (var buffer in buffers) - { - buffer.Dispose(); - } - buffers = null; - } - } - - /// - /// Finalizer. Only called when user forgets to call Dispose - /// - ~WaveOutEvent() - { - Dispose(false); - Debug.Assert(false, "WaveOutEvent device was not closed"); - } - - #endregion - - private void RaisePlaybackStoppedEvent(Exception e) - { - var handler = PlaybackStopped; - if (handler != null) - { - if (syncContext == null) - { - handler(this, new StoppedEventArgs(e)); - } - else - { - syncContext.Post(state => handler(this, new StoppedEventArgs(e)), null); - } - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOutEvent.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOutEvent.cs.meta deleted file mode 100644 index 404b512..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveOutputs/WaveOutEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 390f414213159ee4a9ce7e2296de4571 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders.meta deleted file mode 100644 index b8e2f60..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a6a8e472e1ff7ae4b9e8023d544ca58c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/BufferedWaveProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/BufferedWaveProvider.cs deleted file mode 100644 index bcba8d9..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/BufferedWaveProvider.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using NAudio.Utils; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Provides a buffered store of samples - /// Read method will return queued samples or fill buffer with zeroes - /// Now backed by a circular buffer - /// - public class BufferedWaveProvider : IWaveProvider - { - private CircularBuffer circularBuffer; - private readonly WaveFormat waveFormat; - - /// - /// Creates a new buffered WaveProvider - /// - /// WaveFormat - public BufferedWaveProvider(WaveFormat waveFormat) - { - this.waveFormat = waveFormat; - BufferLength = waveFormat.AverageBytesPerSecond * 5; - ReadFully = true; - } - - /// - /// If true, always read the amount of data requested, padding with zeroes if necessary - /// By default is set to true - /// - public bool ReadFully { get; set; } - - /// - /// Buffer length in bytes - /// - public int BufferLength { get; set; } - - /// - /// Buffer duration - /// - public TimeSpan BufferDuration - { - get - { - return TimeSpan.FromSeconds((double)BufferLength / WaveFormat.AverageBytesPerSecond); - } - set - { - BufferLength = (int)(value.TotalSeconds * WaveFormat.AverageBytesPerSecond); - } - } - - /// - /// If true, when the buffer is full, start throwing away data - /// if false, AddSamples will throw an exception when buffer is full - /// - public bool DiscardOnBufferOverflow { get; set; } - - /// - /// The number of buffered bytes - /// - public int BufferedBytes - { - get - { - return circularBuffer == null ? 0 : circularBuffer.Count; - } - } - - /// - /// Buffered Duration - /// - public TimeSpan BufferedDuration - { - get { return TimeSpan.FromSeconds((double)BufferedBytes / WaveFormat.AverageBytesPerSecond); } - } - - /// - /// Gets the WaveFormat - /// - public WaveFormat WaveFormat - { - get { return waveFormat; } - } - - /// - /// Adds samples. Takes a copy of buffer, so that buffer can be reused if necessary - /// - public void AddSamples(byte[] buffer, int offset, int count) - { - // create buffer here to allow user to customise buffer length - if (circularBuffer == null) - { - circularBuffer = new CircularBuffer(BufferLength); - } - - var written = circularBuffer.Write(buffer, offset, count); - if (written < count && !DiscardOnBufferOverflow) - { - throw new InvalidOperationException("Buffer full"); - } - } - - /// - /// Reads from this WaveProvider - /// Will always return count bytes, since we will zero-fill the buffer if not enough available - /// - public int Read(byte[] buffer, int offset, int count) - { - int read = 0; - if (circularBuffer != null) // not yet created - { - read = circularBuffer.Read(buffer, offset, count); - } - if (ReadFully && read < count) - { - // zero the end of the buffer - Array.Clear(buffer, offset + read, count - read); - read = count; - } - return read; - } - - /// - /// Discards all audio from the buffer - /// - public void ClearBuffer() - { - if (circularBuffer != null) - { - circularBuffer.Reset(); - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/BufferedWaveProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/BufferedWaveProvider.cs.meta deleted file mode 100644 index badb579..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/BufferedWaveProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6836cd455f22046429749d58c5a00bae -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MediaFoundationResampler.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MediaFoundationResampler.cs deleted file mode 100644 index 4cfc7cf..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MediaFoundationResampler.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using NAudio.Dmo; -using NAudio.MediaFoundation; - -namespace NAudio.Wave -{ - /// - /// The Media Foundation Resampler Transform - /// - public class MediaFoundationResampler : MediaFoundationTransform - { - private int resamplerQuality; - - private static bool IsPcmOrIeeeFloat(WaveFormat waveFormat) - { - var wfe = waveFormat as WaveFormatExtensible; - return waveFormat.Encoding == WaveFormatEncoding.Pcm || - waveFormat.Encoding == WaveFormatEncoding.IeeeFloat || - (wfe != null && (wfe.SubFormat == AudioSubtypes.MFAudioFormat_PCM - || wfe.SubFormat == AudioSubtypes.MFAudioFormat_Float)); - } - - /// - /// Creates the Media Foundation Resampler, allowing modifying of sample rate, bit depth and channel count - /// - /// Source provider, must be PCM - /// Output format, must also be PCM - public MediaFoundationResampler(IWaveProvider sourceProvider, WaveFormat outputFormat) - : base(sourceProvider, outputFormat) - { - if (!IsPcmOrIeeeFloat(sourceProvider.WaveFormat)) - throw new ArgumentException("Input must be PCM or IEEE float", "sourceProvider"); - if (!IsPcmOrIeeeFloat(outputFormat)) - throw new ArgumentException("Output must be PCM or IEEE float", "outputFormat"); - MediaFoundationApi.Startup(); - ResamplerQuality = 60; // maximum quality - - // n.b. we will create the resampler COM object on demand in the Read method, - // to avoid threading issues but just - // so we can check it exists on the system we'll make one so it will throw an - // exception if not exists - var comObject = CreateResamplerComObject(); - FreeComObject(comObject); - } - - private static readonly Guid ResamplerClsid = new Guid("f447b69e-1884-4a7e-8055-346f74d6edb3"); - private static readonly Guid IMFTransformIid = new Guid("bf94c121-5b05-4e6f-8000-ba598961414d"); - private IMFActivate activate; - - private void FreeComObject(object comObject) - { - if (activate != null) activate.ShutdownObject(); - Marshal.ReleaseComObject(comObject); - } - - private object CreateResamplerComObject() - { -#if NETFX_CORE - return CreateResamplerComObjectUsingActivator(); -#else - return new ResamplerMediaComObject(); -#endif - } - - private object CreateResamplerComObjectUsingActivator() - { - var transformActivators = MediaFoundationApi.EnumerateTransforms(MediaFoundationTransformCategories.AudioEffect); - foreach (var activator in transformActivators) - { - Guid clsid; - activator.GetGUID(MediaFoundationAttributes.MFT_TRANSFORM_CLSID_Attribute, out clsid); - if (clsid.Equals(ResamplerClsid)) - { - object comObject; - activator.ActivateObject(IMFTransformIid, out comObject); - activate = activator; - return comObject; - } - } - return null; - } - - /// - /// Creates a resampler with a specified target output sample rate - /// - /// Source provider - /// Output sample rate - public MediaFoundationResampler(IWaveProvider sourceProvider, int outputSampleRate) - : this(sourceProvider, CreateOutputFormat(sourceProvider.WaveFormat, outputSampleRate)) - { - - } - - /// - /// Creates and configures the actual Resampler transform - /// - /// A newly created and configured resampler MFT - protected override IMFTransform CreateTransform() - { - var comObject = CreateResamplerComObject();// new ResamplerMediaComObject(); - var resamplerTransform = (IMFTransform)comObject; - - var inputMediaFormat = MediaFoundationApi.CreateMediaTypeFromWaveFormat(sourceProvider.WaveFormat); - resamplerTransform.SetInputType(0, inputMediaFormat, 0); - Marshal.ReleaseComObject(inputMediaFormat); - - var outputMediaFormat = MediaFoundationApi.CreateMediaTypeFromWaveFormat(outputWaveFormat); - resamplerTransform.SetOutputType(0, outputMediaFormat, 0); - Marshal.ReleaseComObject(outputMediaFormat); - - //MFT_OUTPUT_STREAM_INFO pStreamInfo; - //resamplerTransform.GetOutputStreamInfo(0, out pStreamInfo); - // if pStreamInfo.dwFlags is 0, then it means we have to provide samples - - // setup quality - var resamplerProps = (IWMResamplerProps)comObject; - // 60 is the best quality, 1 is linear interpolation - resamplerProps.SetHalfFilterLength(ResamplerQuality); - // may also be able to set this using MFPKEY_WMRESAMP_CHANNELMTX on the - // IPropertyStore interface. - // looks like we can also adjust the LPF with MFPKEY_WMRESAMP_LOWPASS_BANDWIDTH - return resamplerTransform; - } - - /// - /// Gets or sets the Resampler quality. n.b. set the quality before starting to resample. - /// 1 is lowest quality (linear interpolation) and 60 is best quality - /// - public int ResamplerQuality - { - get { return resamplerQuality; } - set - { - if (value < 1 || value > 60) - throw new ArgumentOutOfRangeException("Resampler Quality must be between 1 and 60"); - resamplerQuality = value; - } - } - - private static WaveFormat CreateOutputFormat(WaveFormat inputFormat, int outputSampleRate) - { - WaveFormat outputFormat; - if (inputFormat.Encoding == WaveFormatEncoding.Pcm) - { - outputFormat = new WaveFormat(outputSampleRate, - inputFormat.BitsPerSample, - inputFormat.Channels); - } - else if (inputFormat.Encoding == WaveFormatEncoding.IeeeFloat) - { - outputFormat = WaveFormat.CreateIeeeFloatWaveFormat(outputSampleRate, - inputFormat.Channels); - } - else - { - throw new ArgumentException("Can only resample PCM or IEEE float"); - } - return outputFormat; - } - - /// - /// Disposes this resampler - /// - protected override void Dispose(bool disposing) - { - if (activate != null) - { - activate.ShutdownObject(); - activate = null; - } - - base.Dispose(disposing); - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MediaFoundationResampler.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MediaFoundationResampler.cs.meta deleted file mode 100644 index 676217d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MediaFoundationResampler.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f3f9b6725fd1ef34797ae41193ba50d6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MixingWaveProvider32.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MixingWaveProvider32.cs deleted file mode 100644 index 45a32f5..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MixingWaveProvider32.cs +++ /dev/null @@ -1,154 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// WaveProvider that can mix together multiple 32 bit floating point input provider - /// All channels must have the same number of inputs and same sample rate - /// n.b. Work in Progress - not tested yet - /// - public class MixingWaveProvider32 : IWaveProvider - { - private List inputs; - private WaveFormat waveFormat; - private int bytesPerSample; - - /// - /// Creates a new MixingWaveProvider32 - /// - public MixingWaveProvider32() - { - this.waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(44100, 2); - this.bytesPerSample = 4; - this.inputs = new List(); - } - - /// - /// Creates a new 32 bit MixingWaveProvider32 - /// - /// inputs - must all have the same format. - /// Thrown if the input streams are not 32 bit floating point, - /// or if they have different formats to each other - public MixingWaveProvider32(IEnumerable inputs) - : this() - { - foreach (var input in inputs) - { - AddInputStream(input); - } - } - - /// - /// Add a new input to the mixer - /// - /// The wave input to add - public void AddInputStream(IWaveProvider waveProvider) - { - if (waveProvider.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - throw new ArgumentException("Must be IEEE floating point", "waveProvider.WaveFormat"); - if (waveProvider.WaveFormat.BitsPerSample != 32) - throw new ArgumentException("Only 32 bit audio currently supported", "waveProvider.WaveFormat"); - - if (inputs.Count == 0) - { - // first one - set the format - int sampleRate = waveProvider.WaveFormat.SampleRate; - int channels = waveProvider.WaveFormat.Channels; - this.waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(sampleRate, channels); - } - else - { - if (!waveProvider.WaveFormat.Equals(waveFormat)) - throw new ArgumentException("All incoming channels must have the same format", "waveProvider.WaveFormat"); - } - - lock (inputs) - { - this.inputs.Add(waveProvider); - } - } - - /// - /// Remove an input from the mixer - /// - /// waveProvider to remove - public void RemoveInputStream(IWaveProvider waveProvider) - { - lock (inputs) - { - this.inputs.Remove(waveProvider); - } - } - - /// - /// The number of inputs to this mixer - /// - public int InputCount - { - get { return this.inputs.Count; } - } - - /// - /// Reads bytes from this wave stream - /// - /// buffer to read into - /// offset into buffer - /// number of bytes required - /// Number of bytes read. - /// Thrown if an invalid number of bytes requested - public int Read(byte[] buffer, int offset, int count) - { - if (count % bytesPerSample != 0) - throw new ArgumentException("Must read an whole number of samples", "count"); - - // blank the buffer - Array.Clear(buffer, offset, count); - int bytesRead = 0; - - // sum the channels in - byte[] readBuffer = new byte[count]; - lock (inputs) - { - foreach (var input in inputs) - { - int readFromThisStream = input.Read(readBuffer, 0, count); - // don't worry if input stream returns less than we requested - may indicate we have got to the end - bytesRead = Math.Max(bytesRead, readFromThisStream); - if (readFromThisStream > 0) - { - Sum32BitAudio(buffer, offset, readBuffer, readFromThisStream); - } - } - } - return bytesRead; - } - - /// - /// Actually performs the mixing - /// - static unsafe void Sum32BitAudio(byte[] destBuffer, int offset, byte[] sourceBuffer, int bytesRead) - { - fixed (byte* pDestBuffer = &destBuffer[offset], - pSourceBuffer = &sourceBuffer[0]) - { - float* pfDestBuffer = (float*)pDestBuffer; - float* pfReadBuffer = (float*)pSourceBuffer; - int samplesRead = bytesRead / 4; - for (int n = 0; n < samplesRead; n++) - { - pfDestBuffer[n] += pfReadBuffer[n]; - } - } - } - - /// - /// - /// - public WaveFormat WaveFormat - { - get { return this.waveFormat; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MixingWaveProvider32.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MixingWaveProvider32.cs.meta deleted file mode 100644 index 95209bb..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MixingWaveProvider32.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2e1199d4eebd45d4983cf3b3c1572afb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MonoToStereoProvider16.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MonoToStereoProvider16.cs deleted file mode 100644 index 65cb32c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MonoToStereoProvider16.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using NAudio.Utils; - -namespace NAudio.Wave -{ - /// - /// Converts from mono to stereo, allowing freedom to route all, some, or none of the incoming signal to left or right channels - /// - public class MonoToStereoProvider16 : IWaveProvider - { - private readonly IWaveProvider sourceProvider; - private byte[] sourceBuffer; - - /// - /// Creates a new stereo waveprovider based on a mono input - /// - /// Mono 16 bit PCM input - public MonoToStereoProvider16(IWaveProvider sourceProvider) - { - if (sourceProvider.WaveFormat.Encoding != WaveFormatEncoding.Pcm) - { - throw new ArgumentException("Source must be PCM"); - } - if (sourceProvider.WaveFormat.Channels != 1) - { - throw new ArgumentException("Source must be Mono"); - } - if (sourceProvider.WaveFormat.BitsPerSample != 16) - { - throw new ArgumentException("Source must be 16 bit"); - } - this.sourceProvider = sourceProvider; - WaveFormat = new WaveFormat(sourceProvider.WaveFormat.SampleRate, 2); - RightVolume = 1.0f; - LeftVolume = 1.0f; - } - - /// - /// 1.0 to copy the mono stream to the left channel without adjusting volume - /// - public float LeftVolume { get; set; } - - /// - /// 1.0 to copy the mono stream to the right channel without adjusting volume - /// - public float RightVolume { get; set; } - - /// - /// Output Wave Format - /// - public WaveFormat WaveFormat { get; } - - /// - /// Reads bytes from this WaveProvider - /// - public int Read(byte[] buffer, int offset, int count) - { - var sourceBytesRequired = count / 2; - sourceBuffer = BufferHelpers.Ensure(this.sourceBuffer, sourceBytesRequired); - var sourceWaveBuffer = new WaveBuffer(sourceBuffer); - var destWaveBuffer = new WaveBuffer(buffer); - - var sourceBytesRead = sourceProvider.Read(sourceBuffer, 0, sourceBytesRequired); - var samplesRead = sourceBytesRead / 2; - var destOffset = offset / 2; - for (var sample = 0; sample < samplesRead; sample++) - { - short sampleVal = sourceWaveBuffer.ShortBuffer[sample]; - destWaveBuffer.ShortBuffer[destOffset++] = (short)(LeftVolume * sampleVal); - destWaveBuffer.ShortBuffer[destOffset++] = (short)(RightVolume * sampleVal); - } - return samplesRead * 4; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MonoToStereoProvider16.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MonoToStereoProvider16.cs.meta deleted file mode 100644 index bd0c9ef..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MonoToStereoProvider16.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 08d1115fba58c764885b5443ba087dff -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MultiplexingWaveProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MultiplexingWaveProvider.cs deleted file mode 100644 index 7edf6bf..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MultiplexingWaveProvider.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NAudio.Utils; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Allows any number of inputs to be patched to outputs - /// Uses could include swapping left and right channels, turning mono into stereo, - /// feeding different input sources to different soundcard outputs etc - /// - public class MultiplexingWaveProvider : IWaveProvider - { - private readonly IList inputs; - private readonly int outputChannelCount; - private readonly int inputChannelCount; - private readonly List mappings; - private readonly int bytesPerSample; - - /// - /// Creates a multiplexing wave provider, allowing re-patching of input channels to different - /// output channels. Number of outputs is equal to total number of channels in inputs - /// - /// Input wave providers. Must all be of the same format, but can have any number of channels - public MultiplexingWaveProvider(IEnumerable inputs) : this(inputs, -1) - { - - } - - /// - /// Creates a multiplexing wave provider, allowing re-patching of input channels to different - /// output channels - /// - /// Input wave providers. Must all be of the same format, but can have any number of channels - /// Desired number of output channels. (-1 means use total number of input channels) - public MultiplexingWaveProvider(IEnumerable inputs, int numberOfOutputChannels) - { - this.inputs = new List(inputs); - - outputChannelCount = numberOfOutputChannels == -1 ? this.inputs.Sum(i => i.WaveFormat.Channels) : numberOfOutputChannels; - - if (this.inputs.Count == 0) - { - throw new ArgumentException("You must provide at least one input"); - } - if (outputChannelCount < 1) - { - throw new ArgumentException("You must provide at least one output"); - } - foreach (var input in this.inputs) - { - if (WaveFormat == null) - { - if (input.WaveFormat.Encoding == WaveFormatEncoding.Pcm) - { - WaveFormat = new WaveFormat(input.WaveFormat.SampleRate, input.WaveFormat.BitsPerSample, outputChannelCount); - } - else if (input.WaveFormat.Encoding == WaveFormatEncoding.IeeeFloat) - { - WaveFormat = WaveFormat.CreateIeeeFloatWaveFormat(input.WaveFormat.SampleRate, outputChannelCount); - } - else - { - throw new ArgumentException("Only PCM and 32 bit float are supported"); - } - } - else - { - if (input.WaveFormat.BitsPerSample != WaveFormat.BitsPerSample) - { - throw new ArgumentException("All inputs must have the same bit depth"); - } - if (input.WaveFormat.SampleRate != WaveFormat.SampleRate) - { - throw new ArgumentException("All inputs must have the same sample rate"); - } - } - inputChannelCount += input.WaveFormat.Channels; - } - bytesPerSample = WaveFormat.BitsPerSample / 8; - - mappings = new List(); - for (int n = 0; n < outputChannelCount; n++) - { - mappings.Add(n % inputChannelCount); - } - } - - /// - /// persistent temporary buffer to prevent creating work for garbage collector - /// - private byte[] inputBuffer; - - /// - /// Reads data from this WaveProvider - /// - /// Buffer to be filled with sample data - /// Offset to write to within buffer, usually 0 - /// Number of bytes required - /// Number of bytes read - public int Read(byte[] buffer, int offset, int count) - { - int outputBytesPerFrame = bytesPerSample * outputChannelCount; - int sampleFramesRequested = count / outputBytesPerFrame; - int inputOffset = 0; - int sampleFramesRead = 0; - // now we must read from all inputs, even if we don't need their data, so they stay in sync - foreach (var input in inputs) - { - int inputBytesPerFrame = bytesPerSample * input.WaveFormat.Channels; - int bytesRequired = sampleFramesRequested * inputBytesPerFrame; - inputBuffer = BufferHelpers.Ensure(inputBuffer, bytesRequired); - int bytesRead = input.Read(inputBuffer, 0, bytesRequired); - sampleFramesRead = Math.Max(sampleFramesRead, bytesRead / inputBytesPerFrame); - - for (int n = 0; n < input.WaveFormat.Channels; n++) - { - int inputIndex = inputOffset + n; - for (int outputIndex = 0; outputIndex < outputChannelCount; outputIndex++) - { - if (mappings[outputIndex] == inputIndex) - { - int inputBufferOffset = n * bytesPerSample; - int outputBufferOffset = offset + outputIndex * bytesPerSample; - int sample = 0; - while (sample < sampleFramesRequested && inputBufferOffset < bytesRead) - { - Array.Copy(inputBuffer, inputBufferOffset, buffer, outputBufferOffset, bytesPerSample); - outputBufferOffset += outputBytesPerFrame; - inputBufferOffset += inputBytesPerFrame; - sample++; - } - // clear the end - while (sample < sampleFramesRequested) - { - Array.Clear(buffer, outputBufferOffset, bytesPerSample); - outputBufferOffset += outputBytesPerFrame; - sample++; - } - } - } - } - inputOffset += input.WaveFormat.Channels; - } - - return sampleFramesRead * outputBytesPerFrame; - } - - /// - /// The WaveFormat of this WaveProvider - /// - public WaveFormat WaveFormat { get; } - - /// - /// Connects a specified input channel to an output channel - /// - /// Input Channel index (zero based). Must be less than InputChannelCount - /// Output Channel index (zero based). Must be less than OutputChannelCount - public void ConnectInputToOutput(int inputChannel, int outputChannel) - { - if (inputChannel < 0 || inputChannel >= InputChannelCount) - { - throw new ArgumentException("Invalid input channel"); - } - if (outputChannel < 0 || outputChannel >= OutputChannelCount) - { - throw new ArgumentException("Invalid output channel"); - } - mappings[outputChannel] = inputChannel; - } - - /// - /// The number of input channels. Note that this is not the same as the number of input wave providers. If you pass in - /// one stereo and one mono input provider, the number of input channels is three. - /// - public int InputChannelCount => inputChannelCount; - - /// - /// The number of output channels, as specified in the constructor. - /// - public int OutputChannelCount => outputChannelCount; - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MultiplexingWaveProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MultiplexingWaveProvider.cs.meta deleted file mode 100644 index 3c3cffd..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/MultiplexingWaveProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e0203f2d5f242c445acbac2fcd84e36e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/SilenceWaveProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/SilenceWaveProvider.cs deleted file mode 100644 index 1e18794..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/SilenceWaveProvider.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Linq; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Silence producing wave provider - /// Useful for playing silence when doing a WASAPI Loopback Capture - /// - public class SilenceProvider : IWaveProvider - { - /// - /// Creates a new silence producing wave provider - /// - /// Desired WaveFormat (should be PCM / IEE float - public SilenceProvider(WaveFormat wf) { WaveFormat = wf; } - - /// - /// Read silence from into the buffer - /// - public int Read(byte[] buffer, int offset, int count) - { - Array.Clear(buffer, offset, count); - return count; - } - - /// - /// WaveFormat of this silence producing wave provider - /// - public WaveFormat WaveFormat { get; private set; } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/SilenceWaveProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/SilenceWaveProvider.cs.meta deleted file mode 100644 index 9770aca..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/SilenceWaveProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7d3f8090e2e102c4f897b0243d45bf1b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/StereoToMonoProvider16.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/StereoToMonoProvider16.cs deleted file mode 100644 index eca352e..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/StereoToMonoProvider16.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using NAudio.Utils; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Takes a stereo 16 bit input and turns it mono, allowing you to select left or right channel only or mix them together - /// - public class StereoToMonoProvider16 : IWaveProvider - { - private readonly IWaveProvider sourceProvider; - private byte[] sourceBuffer; - - /// - /// Creates a new mono waveprovider based on a stereo input - /// - /// Stereo 16 bit PCM input - public StereoToMonoProvider16(IWaveProvider sourceProvider) - { - LeftVolume = 0.5f; - RightVolume = 0.5f; - if (sourceProvider.WaveFormat.Encoding != WaveFormatEncoding.Pcm) - { - throw new ArgumentException("Source must be PCM"); - } - if (sourceProvider.WaveFormat.Channels != 2) - { - throw new ArgumentException("Source must be stereo"); - } - if (sourceProvider.WaveFormat.BitsPerSample != 16) - { - throw new ArgumentException("Source must be 16 bit"); - } - this.sourceProvider = sourceProvider; - WaveFormat = new WaveFormat(sourceProvider.WaveFormat.SampleRate, 1); - } - - /// - /// 1.0 to mix the mono source entirely to the left channel - /// - public float LeftVolume { get; set; } - - /// - /// 1.0 to mix the mono source entirely to the right channel - /// - public float RightVolume { get; set; } - - /// - /// Output Wave Format - /// - public WaveFormat WaveFormat { get; private set; } - - /// - /// Reads bytes from this WaveProvider - /// - public int Read(byte[] buffer, int offset, int count) - { - int sourceBytesRequired = count * 2; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - WaveBuffer sourceWaveBuffer = new WaveBuffer(sourceBuffer); - WaveBuffer destWaveBuffer = new WaveBuffer(buffer); - - int sourceBytesRead = sourceProvider.Read(sourceBuffer, 0, sourceBytesRequired); - int samplesRead = sourceBytesRead / 2; - int destOffset = offset / 2; - for (int sample = 0; sample < samplesRead; sample+=2) - { - short left = sourceWaveBuffer.ShortBuffer[sample]; - short right = sourceWaveBuffer.ShortBuffer[sample+1]; - float outSample = (left * LeftVolume) + (right * RightVolume); - // hard limiting - if (outSample > Int16.MaxValue) outSample = Int16.MaxValue; - if (outSample < Int16.MinValue) outSample = Int16.MinValue; - - destWaveBuffer.ShortBuffer[destOffset++] = (short)outSample; - } - return sourceBytesRead / 2; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/StereoToMonoProvider16.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/StereoToMonoProvider16.cs.meta deleted file mode 100644 index eaf48f3..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/StereoToMonoProvider16.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dbe450db8efd66e428a08ce0bc34b5aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/VolumeWaveProvider16.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/VolumeWaveProvider16.cs deleted file mode 100644 index 2a9650c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/VolumeWaveProvider16.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Helper class allowing us to modify the volume of a 16 bit stream without converting to IEEE float - /// - public class VolumeWaveProvider16 : IWaveProvider - { - private readonly IWaveProvider sourceProvider; - private float volume; - - /// - /// Constructs a new VolumeWaveProvider16 - /// - /// Source provider, must be 16 bit PCM - public VolumeWaveProvider16(IWaveProvider sourceProvider) - { - this.Volume = 1.0f; - this.sourceProvider = sourceProvider; - if (sourceProvider.WaveFormat.Encoding != WaveFormatEncoding.Pcm) - throw new ArgumentException("Expecting PCM input"); - if (sourceProvider.WaveFormat.BitsPerSample != 16) - throw new ArgumentException("Expecting 16 bit"); - } - - /// - /// Gets or sets volume. - /// 1.0 is full scale, 0.0 is silence, anything over 1.0 will amplify but potentially clip - /// - public float Volume - { - get { return volume; } - set { volume = value; } - } - - /// - /// WaveFormat of this WaveProvider - /// - public WaveFormat WaveFormat - { - get { return sourceProvider.WaveFormat; } - } - - /// - /// Read bytes from this WaveProvider - /// - /// Buffer to read into - /// Offset within buffer to read to - /// Bytes desired - /// Bytes read - public int Read(byte[] buffer, int offset, int count) - { - // always read from the source - int bytesRead = sourceProvider.Read(buffer, offset, count); - if (this.volume == 0.0f) - { - for (int n = 0; n < bytesRead; n++) - { - buffer[offset++] = 0; - } - } - else if (this.volume != 1.0f) - { - for (int n = 0; n < bytesRead; n += 2) - { - short sample = (short)((buffer[offset + 1] << 8) | buffer[offset]); - var newSample = sample * this.volume; - sample = (short)newSample; - // clip if necessary - if (this.Volume > 1.0f) - { - if (newSample > Int16.MaxValue) sample = Int16.MaxValue; - else if (newSample < Int16.MinValue) sample = Int16.MinValue; - } - - buffer[offset++] = (byte)(sample & 0xFF); - buffer[offset++] = (byte)(sample >> 8); - } - } - return bytesRead; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/VolumeWaveProvider16.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/VolumeWaveProvider16.cs.meta deleted file mode 100644 index 8d2de66..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/VolumeWaveProvider16.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f6ed785806edbf24390b84a2aac18e3f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/Wave16toFloatProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/Wave16toFloatProvider.cs deleted file mode 100644 index dd8e249..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/Wave16toFloatProvider.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Wave; -using NAudio.Utils; - -namespace NAudio.Wave -{ - /// - /// Converts 16 bit PCM to IEEE float, optionally adjusting volume along the way - /// - public class Wave16ToFloatProvider : IWaveProvider - { - private IWaveProvider sourceProvider; - private readonly WaveFormat waveFormat; - private volatile float volume; - private byte[] sourceBuffer; - - /// - /// Creates a new Wave16toFloatProvider - /// - /// the source provider - public Wave16ToFloatProvider(IWaveProvider sourceProvider) - { - if (sourceProvider.WaveFormat.Encoding != WaveFormatEncoding.Pcm) - throw new ArgumentException("Only PCM supported"); - if (sourceProvider.WaveFormat.BitsPerSample != 16) - throw new ArgumentException("Only 16 bit audio supported"); - - waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(sourceProvider.WaveFormat.SampleRate, sourceProvider.WaveFormat.Channels); - - this.sourceProvider = sourceProvider; - this.volume = 1.0f; - } - - /// - /// Reads bytes from this wave stream - /// - /// The destination buffer - /// Offset into the destination buffer - /// Number of bytes read - /// Number of bytes read. - public int Read(byte[] destBuffer, int offset, int numBytes) - { - int sourceBytesRequired = numBytes / 2; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - int sourceBytesRead = sourceProvider.Read(sourceBuffer, offset, sourceBytesRequired); - WaveBuffer sourceWaveBuffer = new WaveBuffer(sourceBuffer); - WaveBuffer destWaveBuffer = new WaveBuffer(destBuffer); - - int sourceSamples = sourceBytesRead / 2; - int destOffset = offset / 4; - for (int sample = 0; sample < sourceSamples; sample++) - { - destWaveBuffer.FloatBuffer[destOffset++] = (sourceWaveBuffer.ShortBuffer[sample] / 32768f) * volume; - } - - return sourceSamples * 4; - } - - /// - /// - /// - public WaveFormat WaveFormat - { - get { return waveFormat; } - } - - /// - /// Volume of this channel. 1.0 = full scale - /// - public float Volume - { - get { return volume; } - set { volume = value; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/Wave16toFloatProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/Wave16toFloatProvider.cs.meta deleted file mode 100644 index 98a7d13..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/Wave16toFloatProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 992a8cd31665e9846b4bc32946387918 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveFloatTo16Provider.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveFloatTo16Provider.cs deleted file mode 100644 index 6e3f6e5..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveFloatTo16Provider.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Wave; -using NAudio.Utils; - -namespace NAudio.Wave -{ - /// - /// Converts IEEE float to 16 bit PCM, optionally clipping and adjusting volume along the way - /// - public class WaveFloatTo16Provider : IWaveProvider - { - private readonly IWaveProvider sourceProvider; - private readonly WaveFormat waveFormat; - private volatile float volume; - private byte[] sourceBuffer; - - /// - /// Creates a new WaveFloatTo16Provider - /// - /// the source provider - public WaveFloatTo16Provider(IWaveProvider sourceProvider) - { - if (sourceProvider.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - throw new ArgumentException("Input wave provider must be IEEE float", "sourceProvider"); - if (sourceProvider.WaveFormat.BitsPerSample != 32) - throw new ArgumentException("Input wave provider must be 32 bit", "sourceProvider"); - - waveFormat = new WaveFormat(sourceProvider.WaveFormat.SampleRate, 16, sourceProvider.WaveFormat.Channels); - - this.sourceProvider = sourceProvider; - this.volume = 1.0f; - } - - /// - /// Reads bytes from this wave stream - /// - /// The destination buffer - /// Offset into the destination buffer - /// Number of bytes read - /// Number of bytes read. - public int Read(byte[] destBuffer, int offset, int numBytes) - { - int sourceBytesRequired = numBytes * 2; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, sourceBytesRequired); - int sourceBytesRead = sourceProvider.Read(sourceBuffer, 0, sourceBytesRequired); - WaveBuffer sourceWaveBuffer = new WaveBuffer(sourceBuffer); - WaveBuffer destWaveBuffer = new WaveBuffer(destBuffer); - - int sourceSamples = sourceBytesRead / 4; - int destOffset = offset / 2; - for (int sample = 0; sample < sourceSamples; sample++) - { - // adjust volume - float sample32 = sourceWaveBuffer.FloatBuffer[sample] * volume; - // clip - if (sample32 > 1.0f) - sample32 = 1.0f; - if (sample32 < -1.0f) - sample32 = -1.0f; - destWaveBuffer.ShortBuffer[destOffset++] = (short)(sample32 * 32767); - } - - return sourceSamples * 2; - } - - /// - /// - /// - public WaveFormat WaveFormat - { - get { return waveFormat; } - } - - /// - /// Volume of this channel. 1.0 = full scale - /// - public float Volume - { - get { return volume; } - set { volume = value; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveFloatTo16Provider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveFloatTo16Provider.cs.meta deleted file mode 100644 index 67b2f00..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveFloatTo16Provider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 298dc5e109df035448de1d95deacf5c5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveInProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveInProvider.cs deleted file mode 100644 index 3d981c0..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveInProvider.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NAudio.Wave; - -namespace NAudio.Wave -{ - /// - /// Buffered WaveProvider taking source data from WaveIn - /// - public class WaveInProvider : IWaveProvider - { - IWaveIn waveIn; - BufferedWaveProvider bufferedWaveProvider; - - /// - /// Creates a new WaveInProvider - /// n.b. Should make sure the WaveFormat is set correctly on IWaveIn before calling - /// - /// The source of wave data - public WaveInProvider(IWaveIn waveIn) - { - this.waveIn = waveIn; - waveIn.DataAvailable += waveIn_DataAvailable; - bufferedWaveProvider = new BufferedWaveProvider(this.WaveFormat); - } - - void waveIn_DataAvailable(object sender, WaveInEventArgs e) - { - bufferedWaveProvider.AddSamples(e.Buffer, 0, e.BytesRecorded); - } - - /// - /// Reads data from the WaveInProvider - /// - public int Read(byte[] buffer, int offset, int count) - { - return bufferedWaveProvider.Read(buffer, 0, count); - } - - /// - /// The WaveFormat - /// - public WaveFormat WaveFormat - { - get { return waveIn.WaveFormat; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveInProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveInProvider.cs.meta deleted file mode 100644 index 539c291..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveInProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 206e69c66e17e3c4f995987d5e8d8cba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider16.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider16.cs deleted file mode 100644 index af9f678..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider16.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Base class for creating a 16 bit wave provider - /// - public abstract class WaveProvider16 : IWaveProvider - { - private WaveFormat waveFormat; - - /// - /// Initializes a new instance of the WaveProvider16 class - /// defaulting to 44.1kHz mono - /// - public WaveProvider16() - : this(44100, 1) - { - } - - /// - /// Initializes a new instance of the WaveProvider16 class with the specified - /// sample rate and number of channels - /// - public WaveProvider16(int sampleRate, int channels) - { - SetWaveFormat(sampleRate, channels); - } - - /// - /// Allows you to specify the sample rate and channels for this WaveProvider - /// (should be initialised before you pass it to a wave player) - /// - public void SetWaveFormat(int sampleRate, int channels) - { - this.waveFormat = new WaveFormat(sampleRate, 16, channels); - } - - /// - /// Implements the Read method of IWaveProvider by delegating to the abstract - /// Read method taking a short array - /// - public int Read(byte[] buffer, int offset, int count) - { - WaveBuffer waveBuffer = new WaveBuffer(buffer); - int samplesRequired = count / 2; - int samplesRead = Read(waveBuffer.ShortBuffer, offset / 2, samplesRequired); - return samplesRead * 2; - } - - /// - /// Method to override in derived classes - /// Supply the requested number of samples into the buffer - /// - public abstract int Read(short[] buffer, int offset, int sampleCount); - - /// - /// The Wave Format - /// - public WaveFormat WaveFormat - { - get { return waveFormat; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider16.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider16.cs.meta deleted file mode 100644 index d34d9d4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider16.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 70ff4abfba424c346add8c7cba39bae2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider32.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider32.cs deleted file mode 100644 index b9d9e07..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider32.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Base class for creating a 32 bit floating point wave provider - /// Can also be used as a base class for an ISampleProvider that can - /// be plugged straight into anything requiring an IWaveProvider - /// - public abstract class WaveProvider32 : IWaveProvider, ISampleProvider - { - private WaveFormat waveFormat; - - /// - /// Initializes a new instance of the WaveProvider32 class - /// defaulting to 44.1kHz mono - /// - public WaveProvider32() - : this(44100, 1) - { - } - - /// - /// Initializes a new instance of the WaveProvider32 class with the specified - /// sample rate and number of channels - /// - public WaveProvider32(int sampleRate, int channels) - { - SetWaveFormat(sampleRate, channels); - } - - /// - /// Allows you to specify the sample rate and channels for this WaveProvider - /// (should be initialised before you pass it to a wave player) - /// - public void SetWaveFormat(int sampleRate, int channels) - { - this.waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(sampleRate, channels); - } - - /// - /// Implements the Read method of IWaveProvider by delegating to the abstract - /// Read method taking a float array - /// - public int Read(byte[] buffer, int offset, int count) - { - WaveBuffer waveBuffer = new WaveBuffer(buffer); - int samplesRequired = count / 4; - int samplesRead = Read(waveBuffer.FloatBuffer, offset / 4, samplesRequired); - return samplesRead * 4; - } - - /// - /// Method to override in derived classes - /// Supply the requested number of samples into the buffer - /// - public abstract int Read(float[] buffer, int offset, int sampleCount); - - /// - /// The Wave Format - /// - public WaveFormat WaveFormat - { - get { return waveFormat; } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider32.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider32.cs.meta deleted file mode 100644 index a156872..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveProvider32.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f64fb3beceb9af349aa8e3e2410b3687 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveRecorder.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveRecorder.cs deleted file mode 100644 index 442ef43..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveRecorder.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NAudio.Wave -{ - /// - /// Utility class to intercept audio from an IWaveProvider and - /// save it to disk - /// - public class WaveRecorder : IWaveProvider, IDisposable - { - private WaveFileWriter writer; - private IWaveProvider source; - - /// - /// Constructs a new WaveRecorder - /// - /// The location to write the WAV file to - /// The Source Wave Provider - public WaveRecorder(IWaveProvider source, string destination) - { - this.source = source; - this.writer = new WaveFileWriter(destination, source.WaveFormat); - } - - /// - /// Read simply returns what the source returns, but writes to disk along the way - /// - public int Read(byte[] buffer, int offset, int count) - { - int bytesRead = source.Read(buffer, offset, count); - writer.Write(buffer, offset, bytesRead); - return bytesRead; - } - - /// - /// The WaveFormat - /// - public WaveFormat WaveFormat - { - get { return source.WaveFormat; } - } - - /// - /// Closes the WAV file - /// - public void Dispose() - { - if (writer != null) - { - writer.Dispose(); - writer = null; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveRecorder.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveRecorder.cs.meta deleted file mode 100644 index b8ffe5d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveProviders/WaveRecorder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 25be19f7ebc2aaf4d872d5927a680fec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams.meta deleted file mode 100644 index db2a271..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b717e873be6b2bd4eaba01b17d0c956c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AiffFileReader.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AiffFileReader.cs deleted file mode 100644 index 3c87abf..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AiffFileReader.cs +++ /dev/null @@ -1,324 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using NAudio.Utils; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// A read-only stream of AIFF data based on an aiff file - /// with an associated WaveFormat - /// originally contributed to NAudio by Giawa - /// - public class AiffFileReader : WaveStream - { - private readonly WaveFormat waveFormat; - private readonly bool ownInput; - private readonly long dataPosition; - private readonly int dataChunkLength; - private readonly List chunks = new List(); - private Stream waveStream; - private readonly object lockObject = new object(); - - /// Supports opening a AIF file - /// The AIF is of similar nastiness to the WAV format. - /// This supports basic reading of uncompressed PCM AIF files, - /// with 8, 16, 24 and 32 bit PCM data. - /// - public AiffFileReader(String aiffFile) : - this(File.OpenRead(aiffFile)) - { - ownInput = true; - } - - /// - /// Creates an Aiff File Reader based on an input stream - /// - /// The input stream containing a AIF file including header - public AiffFileReader(Stream inputStream) - { - waveStream = inputStream; - ReadAiffHeader(waveStream, out waveFormat, out dataPosition, out dataChunkLength, chunks); - Position = 0; - } - - /// - /// Ensures valid AIFF header and then finds data offset. - /// - /// The stream, positioned at the start of audio data - /// The format found - /// The position of the data chunk - /// The length of the data chunk - /// Additional chunks found - public static void ReadAiffHeader(Stream stream, out WaveFormat format, out long dataChunkPosition, out int dataChunkLength, List chunks) - { - dataChunkPosition = -1; - format = null; - BinaryReader br = new BinaryReader(stream); - - if (ReadChunkName(br) != "FORM") - { - throw new FormatException("Not an AIFF file - no FORM header."); - } - uint fileSize = ConvertInt(br.ReadBytes(4)); - string formType = ReadChunkName(br); - if (formType != "AIFC" && formType != "AIFF") - { - throw new FormatException("Not an AIFF file - no AIFF/AIFC header."); - } - - dataChunkLength = 0; - - while (br.BaseStream.Position < br.BaseStream.Length) - { - AiffChunk nextChunk = ReadChunkHeader(br); - if (nextChunk.ChunkName == "\0\0\0\0") break; - - if (br.BaseStream.Position + nextChunk.ChunkLength > br.BaseStream.Length) - { - break; - } - if (nextChunk.ChunkName == "COMM") - { - short numChannels = ConvertShort(br.ReadBytes(2)); - uint numSampleFrames = ConvertInt(br.ReadBytes(4)); - short sampleSize = ConvertShort(br.ReadBytes(2)); - double sampleRate = IEEE.ConvertFromIeeeExtended(br.ReadBytes(10)); - - format = new WaveFormat((int)sampleRate, (int)sampleSize, (int)numChannels); - - if (nextChunk.ChunkLength > 18 && formType == "AIFC") - { - // In an AIFC file, the compression format is tacked on to the COMM chunk - string compress = new string(br.ReadChars(4)).ToLower(); - if (compress != "none") throw new FormatException("Compressed AIFC is not supported."); - br.ReadBytes((int)nextChunk.ChunkLength - 22); - } - else br.ReadBytes((int)nextChunk.ChunkLength - 18); - } - else if (nextChunk.ChunkName == "SSND") - { - uint offset = ConvertInt(br.ReadBytes(4)); - uint blockSize = ConvertInt(br.ReadBytes(4)); - dataChunkPosition = nextChunk.ChunkStart + 16 + offset; - dataChunkLength = (int)nextChunk.ChunkLength - 8; - br.BaseStream.Position += (nextChunk.ChunkLength - 8); - } - else - { - if (chunks != null) - { - chunks.Add(nextChunk); - } - br.BaseStream.Position += nextChunk.ChunkLength; - } - - - } - - if (format == null) - { - throw new FormatException("Invalid AIFF file - No COMM chunk found."); - } - if (dataChunkPosition == -1) - { - throw new FormatException("Invalid AIFF file - No SSND chunk found."); - } - } - - /// - /// Cleans up the resources associated with this AiffFileReader - /// - protected override void Dispose(bool disposing) - { - if (disposing) - { - // Release managed resources. - if (waveStream != null) - { - // only dispose our source if we created it - if (ownInput) - { - waveStream.Close(); - } - waveStream = null; - } - } - else - { - System.Diagnostics.Debug.Assert(false, "AiffFileReader was not disposed"); - } - // Release unmanaged resources. - // Set large fields to null. - // Call Dispose on your base class. - base.Dispose(disposing); - } - - /// - /// - /// - public override WaveFormat WaveFormat => waveFormat; - - /// - /// - /// - public override long Length => dataChunkLength; - - /// - /// Number of Samples (if possible to calculate) - /// - public long SampleCount - { - get - { - if (waveFormat.Encoding == WaveFormatEncoding.Pcm || - waveFormat.Encoding == WaveFormatEncoding.Extensible || - waveFormat.Encoding == WaveFormatEncoding.IeeeFloat) - { - return dataChunkLength / BlockAlign; - } - else - { - throw new FormatException("Sample count is calculated only for the standard encodings"); - } - } - } - - /// - /// Position in the AIFF file - /// - /// - public override long Position - { - get - { - return waveStream.Position - dataPosition; - } - set - { - lock (lockObject) - { - value = Math.Min(value, Length); - // make sure we don't get out of sync - value -= (value % waveFormat.BlockAlign); - waveStream.Position = value + dataPosition; - } - } - } - - - /// - /// Reads bytes from the AIFF File - /// - /// - public override int Read(byte[] array, int offset, int count) - { - if (count % waveFormat.BlockAlign != 0) - { - throw new ArgumentException( - $"Must read complete blocks: requested {count}, block align is {WaveFormat.BlockAlign}"); - } - lock (lockObject) - { - // sometimes there is more junk at the end of the file past the data chunk - if (Position + count > dataChunkLength) - { - count = dataChunkLength - (int) Position; - } - - // Need to fix the endianness since intel expect little endian, and apple is big endian. - byte[] buffer = new byte[count]; - int length = waveStream.Read(buffer, offset, count); - - int bytesPerSample = WaveFormat.BitsPerSample/8; - for (int i = 0; i < length; i += bytesPerSample) - { - if (WaveFormat.BitsPerSample == 8) - { - array[i] = buffer[i]; - } - else if (WaveFormat.BitsPerSample == 16) - { - array[i + 0] = buffer[i + 1]; - array[i + 1] = buffer[i]; - } - else if (WaveFormat.BitsPerSample == 24) - { - array[i + 0] = buffer[i + 2]; - array[i + 1] = buffer[i + 1]; - array[i + 2] = buffer[i + 0]; - } - else if (WaveFormat.BitsPerSample == 32) - { - array[i + 0] = buffer[i + 3]; - array[i + 1] = buffer[i + 2]; - array[i + 2] = buffer[i + 1]; - array[i + 3] = buffer[i + 0]; - } - else throw new FormatException("Unsupported PCM format."); - } - - return length; - } - } - - #region Endian Helpers - private static uint ConvertInt(byte[] buffer) - { - if (buffer.Length != 4) throw new Exception("Incorrect length for long."); - return (uint)((buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3]); - } - - private static short ConvertShort(byte[] buffer) - { - if (buffer.Length != 2) throw new Exception("Incorrect length for int."); - return (short)((buffer[0] << 8) | buffer[1]); - } - #endregion - - - #region AiffChunk - /// - /// AIFF Chunk - /// - public struct AiffChunk - { - /// - /// Chunk Name - /// - public string ChunkName; - - /// - /// Chunk Length - /// - public uint ChunkLength; - - /// - /// Chunk start - /// - public uint ChunkStart; - - /// - /// Creates a new AIFF Chunk - /// - public AiffChunk(uint start, string name, uint length) - { - ChunkStart = start; - ChunkName = name; - ChunkLength = length + (uint)(length % 2 == 1 ? 1 : 0); - } - } - - private static AiffChunk ReadChunkHeader(BinaryReader br) - { - var chunk = new AiffChunk((uint)br.BaseStream.Position, ReadChunkName(br), ConvertInt(br.ReadBytes(4))); - return chunk; - } - - private static string ReadChunkName(BinaryReader br) - { - return new string(br.ReadChars(4)); - } - #endregion - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AiffFileReader.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AiffFileReader.cs.meta deleted file mode 100644 index e34f44f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AiffFileReader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d234e3828ffbcb04cbdea9a7482f9d02 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AudioFileReader.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AudioFileReader.cs deleted file mode 100644 index 4439507..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AudioFileReader.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using NAudio.Wave.SampleProviders; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// AudioFileReader simplifies opening an audio file in NAudio - /// Simply pass in the filename, and it will attempt to open the - /// file and set up a conversion path that turns into PCM IEEE float. - /// ACM codecs will be used for conversion. - /// It provides a volume property and implements both WaveStream and - /// ISampleProvider, making it possibly the only stage in your audio - /// pipeline necessary for simple playback scenarios - /// - public class AudioFileReader : WaveStream, ISampleProvider - { - private WaveStream readerStream; // the waveStream which we will use for all positioning - private readonly SampleChannel sampleChannel; // sample provider that gives us most stuff we need - private readonly int destBytesPerSample; - private readonly int sourceBytesPerSample; - private readonly long length; - private readonly object lockObject; - - /// - /// Initializes a new instance of AudioFileReader - /// - /// The file to open - public AudioFileReader(string fileName) - { - lockObject = new object(); - FileName = fileName; - CreateReaderStream(fileName); - sourceBytesPerSample = (readerStream.WaveFormat.BitsPerSample / 8) * readerStream.WaveFormat.Channels; - sampleChannel = new SampleChannel(readerStream, false); - destBytesPerSample = 4*sampleChannel.WaveFormat.Channels; - length = SourceToDest(readerStream.Length); - } - - /// - /// Creates the reader stream, supporting all filetypes in the core NAudio library, - /// and ensuring we are in PCM format - /// - /// File Name - private void CreateReaderStream(string fileName) - { - if (fileName.EndsWith(".wav", StringComparison.OrdinalIgnoreCase)) - { - readerStream = new WaveFileReader(fileName); - if (readerStream.WaveFormat.Encoding != WaveFormatEncoding.Pcm && readerStream.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - { - readerStream = WaveFormatConversionStream.CreatePcmStream(readerStream); - readerStream = new BlockAlignReductionStream(readerStream); - } - } - else if (fileName.EndsWith(".mp3", StringComparison.OrdinalIgnoreCase)) - { - readerStream = new Mp3FileReader(fileName); - } - else if (fileName.EndsWith(".aiff", StringComparison.OrdinalIgnoreCase) || fileName.EndsWith(".aif", StringComparison.OrdinalIgnoreCase)) - { - readerStream = new AiffFileReader(fileName); - } - else - { - // fall back to media foundation reader, see if that can play it - readerStream = new MediaFoundationReader(fileName); - } - } - /// - /// File Name - /// - public string FileName { get; } - - /// - /// WaveFormat of this stream - /// - public override WaveFormat WaveFormat => sampleChannel.WaveFormat; - - /// - /// Length of this stream (in bytes) - /// - public override long Length => length; - - /// - /// Position of this stream (in bytes) - /// - public override long Position - { - get { return SourceToDest(readerStream.Position); } - set { lock (lockObject) { readerStream.Position = DestToSource(value); } } - } - - /// - /// Reads from this wave stream - /// - /// Audio buffer - /// Offset into buffer - /// Number of bytes required - /// Number of bytes read - public override int Read(byte[] buffer, int offset, int count) - { - var waveBuffer = new WaveBuffer(buffer); - int samplesRequired = count / 4; - int samplesRead = Read(waveBuffer.FloatBuffer, offset / 4, samplesRequired); - return samplesRead * 4; - } - - /// - /// Reads audio from this sample provider - /// - /// Sample buffer - /// Offset into sample buffer - /// Number of samples required - /// Number of samples read - public int Read(float[] buffer, int offset, int count) - { - lock (lockObject) - { - return sampleChannel.Read(buffer, offset, count); - } - } - - /// - /// Gets or Sets the Volume of this AudioFileReader. 1.0f is full volume - /// - public float Volume - { - get { return sampleChannel.Volume; } - set { sampleChannel.Volume = value; } - } - - /// - /// Helper to convert source to dest bytes - /// - private long SourceToDest(long sourceBytes) - { - return destBytesPerSample * (sourceBytes / sourceBytesPerSample); - } - - /// - /// Helper to convert dest to source bytes - /// - private long DestToSource(long destBytes) - { - return sourceBytesPerSample * (destBytes / destBytesPerSample); - } - - /// - /// Disposes this AudioFileReader - /// - /// True if called from Dispose - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (readerStream != null) { - readerStream.Dispose(); - readerStream = null; - } - } - base.Dispose(disposing); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AudioFileReader.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AudioFileReader.cs.meta deleted file mode 100644 index de9986d..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/AudioFileReader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: abfac5a11a05af94abb15a7ba80dc8a5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/BlockAlignReductionStream.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/BlockAlignReductionStream.cs deleted file mode 100644 index 08a2881..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/BlockAlignReductionStream.cs +++ /dev/null @@ -1,173 +0,0 @@ -using System; -using NAudio.Utils; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Helper stream that lets us read from compressed audio files with large block alignment - /// as though we could read any amount and reposition anywhere - /// - public class BlockAlignReductionStream : WaveStream - { - private WaveStream sourceStream; - private long position; - private readonly CircularBuffer circularBuffer; - private long bufferStartPosition; - private byte[] sourceBuffer; - private readonly object lockObject = new object(); - - /// - /// Creates a new BlockAlignReductionStream - /// - /// the input stream - public BlockAlignReductionStream(WaveStream sourceStream) - { - this.sourceStream = sourceStream; - circularBuffer = new CircularBuffer(sourceStream.WaveFormat.AverageBytesPerSecond * 4); - } - - private byte[] GetSourceBuffer(int size) - { - if (sourceBuffer == null || sourceBuffer.Length < size) - { - // let's give ourselves some leeway - sourceBuffer = new byte[size * 2]; - } - return sourceBuffer; - } - - /// - /// Block alignment of this stream - /// - public override int BlockAlign - { - get - { - // can position to sample level - return (WaveFormat.BitsPerSample / 8) * WaveFormat.Channels; - } - } - - /// - /// Wave Format - /// - public override WaveFormat WaveFormat - { - get { return sourceStream.WaveFormat; } - } - - /// - /// Length of this Stream - /// - public override long Length - { - get { return sourceStream.Length; } - } - - /// - /// Current position within stream - /// - public override long Position - { - get - { - return position; - } - set - { - lock (lockObject) - { - if (position != value) - { - if (position % BlockAlign != 0) - throw new ArgumentException("Position must be block aligned"); - long sourcePosition = value - (value % sourceStream.BlockAlign); - if (sourceStream.Position != sourcePosition) - { - sourceStream.Position = sourcePosition; - circularBuffer.Reset(); - bufferStartPosition = sourceStream.Position; - } - position = value; - } - } - } - } - - private long BufferEndPosition - { - get - { - - return bufferStartPosition + circularBuffer.Count; - } - } - - /// - /// Disposes this WaveStream - /// - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (sourceStream != null) - { - sourceStream.Dispose(); - sourceStream = null; - } - } - else - { - System.Diagnostics.Debug.Assert(false, "BlockAlignReductionStream was not Disposed"); - } - base.Dispose(disposing); - } - - /// - /// Reads data from this stream - /// - /// - /// - /// - /// - public override int Read(byte[] buffer, int offset, int count) - { - lock (lockObject) - { - // 1. attempt to fill the circular buffer with enough data to meet our request - while (BufferEndPosition < position + count) - { - int sourceReadCount = count; - if (sourceReadCount % sourceStream.BlockAlign != 0) - { - sourceReadCount = (count + sourceStream.BlockAlign) - (count % sourceStream.BlockAlign); - } - - int sourceRead = sourceStream.Read(GetSourceBuffer(sourceReadCount), 0, sourceReadCount); - circularBuffer.Write(GetSourceBuffer(sourceReadCount), 0, sourceRead); - if (sourceRead == 0) - { - // assume we have run out of data - break; - } - } - - // 2. discard any unnecessary stuff from the start - if (bufferStartPosition < position) - { - circularBuffer.Advance((int)(position - bufferStartPosition)); - bufferStartPosition = position; - } - - // 3. now whatever is in the buffer we can return - int bytesRead = circularBuffer.Read(buffer, offset, count); - position += bytesRead; - // anything left in buffer is at start position - bufferStartPosition = position; - - return bytesRead; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/BlockAlignReductionStream.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/BlockAlignReductionStream.cs.meta deleted file mode 100644 index 73cc7ca..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/BlockAlignReductionStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e4d085ff6f516d24c85c9b40bdcd1072 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ComStream.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ComStream.cs deleted file mode 100644 index 34c10d4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ComStream.cs +++ /dev/null @@ -1,163 +0,0 @@ -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; - -namespace NAudio.Wave -{ - /// - /// Implementation of Com IStream - /// - class ComStream : Stream, IStream - { - private Stream stream; - - public override bool CanRead => stream.CanRead; - - public override bool CanSeek => stream.CanSeek; - - public override bool CanWrite => stream.CanWrite; - - public override long Length => stream.Length; - - public override long Position - { - get { return stream.Position; } - set { stream.Position = value; } - } - - public ComStream(Stream stream) - : this(stream, true) - { - } - - internal ComStream(Stream stream, bool synchronizeStream) - { - if (stream == null) - throw new ArgumentNullException(nameof(stream)); - if (synchronizeStream) - stream = Synchronized(stream); - this.stream = stream; - } - - void IStream.Clone(out IStream ppstm) - { - ppstm = null; - } - - void IStream.Commit(int grfCommitFlags) - { - stream.Flush(); - } - - void IStream.CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten) - { - } - - void IStream.LockRegion(long libOffset, long cb, int dwLockType) - { - } - - void IStream.Read(byte[] pv, int cb, IntPtr pcbRead) - { - if (!CanRead) - throw new InvalidOperationException("Stream is not readable."); - int val = Read(pv, 0, cb); - if (pcbRead != IntPtr.Zero) - Marshal.WriteInt32(pcbRead, val); - } - - void IStream.Revert() - { - } - - void IStream.Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition) - { - SeekOrigin origin = (SeekOrigin) dwOrigin; - long val = Seek(dlibMove, origin); - if (plibNewPosition != IntPtr.Zero) - Marshal.WriteInt64(plibNewPosition, val); - } - - void IStream.SetSize(long libNewSize) - { - SetLength(libNewSize); - } - - void IStream.Stat(out System.Runtime.InteropServices.ComTypes.STATSTG pstatstg, int grfStatFlag) - { - const int STGM_READ = 0x00000000; - const int STGM_WRITE = 0x00000001; - const int STGM_READWRITE = 0x00000002; - - var tmp = new System.Runtime.InteropServices.ComTypes.STATSTG { type = 2, cbSize = Length, grfMode = 0 }; - - if (CanWrite && CanRead) - tmp.grfMode |= STGM_READWRITE; - else if (CanRead) - tmp.grfMode |= STGM_READ; - else if (CanWrite) - tmp.grfMode |= STGM_WRITE; - else - throw new ObjectDisposedException("Stream"); - - pstatstg = tmp; - } - - void IStream.UnlockRegion(long libOffset, long cb, int dwLockType) - { - } - - void IStream.Write(byte[] pv, int cb, IntPtr pcbWritten) - { - if (!CanWrite) - throw new InvalidOperationException("Stream is not writeable."); - Write(pv, 0, cb); - if (pcbWritten != IntPtr.Zero) - Marshal.WriteInt32(pcbWritten, cb); - } - - public override void Flush() - { - stream.Flush(); - } - - public override int Read(byte[] buffer, int offset, int count) - { - return stream.Read(buffer, offset, count); - } - - public override long Seek(long offset, SeekOrigin origin) - { - return stream.Seek(offset, origin); - } - - public override void SetLength(long value) - { - stream.SetLength(value); - } - - public override void Write(byte[] buffer, int offset, int count) - { - stream.Write(buffer, offset, count); - } - - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (stream == null) - return; - stream.Dispose(); - stream = null; - } - - public override void Close() - { - base.Close(); - if (stream == null) - return; - stream.Close(); - stream = null; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ComStream.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ComStream.cs.meta deleted file mode 100644 index 628839e..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ComStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 446ed299490add843afdbe38e372db81 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueList.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueList.cs deleted file mode 100644 index 0d257ed..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueList.cs +++ /dev/null @@ -1,282 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using NAudio.Utils; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Holds information on a cue: a labeled position within a Wave file - /// - public class Cue - { - /// - /// Cue position in samples - /// - public int Position { get; } - /// - /// Label of the cue - /// - public string Label { get; } - - /// - /// Creates a Cue based on a sample position and label - /// - /// - /// - public Cue(int position, string label) - { - Position = position; - if (label == null) - { - label = ""; - } - Label = Regex.Replace(label, @"[^\u0000-\u00FF]", ""); - } - } - - /// - /// Holds a list of cues - /// - /// - /// The specs for reading and writing cues from the cue and list RIFF chunks - /// are from http://www.sonicspot.com/guide/wavefiles.html and http://www.wotsit.org/ - /// ------------------------------ - /// The cues are stored like this: - /// ------------------------------ - /// struct CuePoint - /// { - /// Int32 dwIdentifier; - /// Int32 dwPosition; - /// Int32 fccChunk; - /// Int32 dwChunkStart; - /// Int32 dwBlockStart; - /// Int32 dwSampleOffset; - /// } - /// - /// struct CueChunk - /// { - /// Int32 chunkID; - /// Int32 chunkSize; - /// Int32 dwCuePoints; - /// CuePoint[] points; - /// } - /// ------------------------------ - /// Labels look like this: - /// ------------------------------ - /// struct ListHeader - /// { - /// Int32 listID; /* 'list' */ - /// Int32 chunkSize; /* includes the Type ID below */ - /// Int32 typeID; /* 'adtl' */ - /// } - /// - /// struct LabelChunk - /// { - /// Int32 chunkID; - /// Int32 chunkSize; - /// Int32 dwIdentifier; - /// Char[] dwText; /* Encoded with extended ASCII */ - /// } LabelChunk; - /// - public class CueList - { - private readonly List cues = new List(); - /// - /// Creates an empty cue list - /// - public CueList() - { - - } - - /// - /// Adds an item to the list - /// - /// Cue - public void Add(Cue cue) - { - cues.Add(cue); - } - - /// - /// Gets sample positions for the embedded cues - /// - /// Array containing the cue positions - public int[] CuePositions - { - get - { - int[] positions = new int[cues.Count]; - for (int i = 0; i < cues.Count; i++) - { - positions[i] = cues[i].Position; - } - return positions; - } - } - - /// - /// Gets labels for the embedded cues - /// - /// Array containing the labels - public string[] CueLabels - { - get - { - string[] labels = new string[cues.Count]; - for (int i = 0; i < cues.Count; i++) - { - labels[i] = cues[i].Label; - } - return labels; - } - } - - /// - /// Creates a cue list from the cue RIFF chunk and the list RIFF chunk - /// - /// The data contained in the cue chunk - /// The data contained in the list chunk - internal CueList(byte[] cueChunkData, byte[] listChunkData) - { - int cueCount = BitConverter.ToInt32(cueChunkData, 0); - Dictionary cueIndex = new Dictionary(); - int[] positions = new int[cueCount]; - int cue = 0; - - for (int p = 4; cueChunkData.Length - p >= 24; p += 24, cue++) - { - cueIndex[BitConverter.ToInt32(cueChunkData, p)] = cue; - positions[cue] = BitConverter.ToInt32(cueChunkData, p + 20); - } - - string[] labels = new string[cueCount]; - int labelLength = 0; - - var labelChunkId = ChunkIdentifier.ChunkIdentifierToInt32("labl"); - for (int p = 4; listChunkData.Length - p >= 16; p += labelLength + labelLength % 2 + 12) - { - if (BitConverter.ToInt32(listChunkData, p) == labelChunkId) - { - labelLength = BitConverter.ToInt32(listChunkData, p + 4) - 4; - var cueId = BitConverter.ToInt32(listChunkData, p + 8); - cue = cueIndex[cueId]; - labels[cue] = Encoding.Default.GetString(listChunkData, p + 12, labelLength - 1); - } - } - - for (int i = 0; i < cueCount; i++) - { - cues.Add(new Cue(positions[i], labels[i])); - } - } - - /// - /// Gets the cues as the concatenated cue and list RIFF chunks. - /// - /// RIFF chunks containing the cue data - internal byte[] GetRiffChunks() - { - if (Count == 0) - { - return null; - } - var cueChunkLength = 12 + 24 * Count; - var listChunkLength = 12; - for (int i = 0; i < Count; i++) - { - var labelChunkLength = this[i].Label.Length + 1; - listChunkLength += labelChunkLength + labelChunkLength % 2 + 12; - } - - byte[] chunks = new byte[cueChunkLength + listChunkLength]; - var cueChunkId = ChunkIdentifier.ChunkIdentifierToInt32("cue "); - int dataChunkId = ChunkIdentifier.ChunkIdentifierToInt32("data"); - int listChunkId = ChunkIdentifier.ChunkIdentifierToInt32("LIST"); - int adtlTypeId = ChunkIdentifier.ChunkIdentifierToInt32("adtl"); - int labelChunkId = ChunkIdentifier.ChunkIdentifierToInt32("labl"); - - using (var stream = new MemoryStream(chunks)) - { - using (var writer = new BinaryWriter(stream)) - { - writer.Write(cueChunkId); - writer.Write(cueChunkLength - 8); - writer.Write(Count); - for (int cue = 0; cue < Count; cue++) - { - int position = this[cue].Position; - - writer.Write(cue); - writer.Write(position); - writer.Write(dataChunkId); - writer.Seek(8, SeekOrigin.Current); - writer.Write(position); - } - writer.Write(listChunkId); - writer.Write(listChunkLength - 8); - writer.Write(adtlTypeId); - for (int cue = 0; cue < Count; cue++) - { - writer.Write(labelChunkId); - writer.Write(this[cue].Label.Length + 1 + 4); - writer.Write(cue); - writer.Write(Encoding.Default.GetBytes(this[cue].Label.ToCharArray())); - if (this[cue].Label.Length % 2 == 0) - { - writer.Seek(2, SeekOrigin.Current); - } - else - { - writer.Seek(1, SeekOrigin.Current); - } - } - } - } - return chunks; - } - - /// - /// Number of cues - /// - public int Count => cues.Count; - - /// - /// Accesses the cue at the specified index - /// - /// - /// - public Cue this[int index] => cues[index]; - - /// - /// Checks if the cue and list chunks exist and if so, creates a cue list - /// - internal static CueList FromChunks(WaveFileReader reader) - { - CueList cueList = null; - byte[] cueChunkData = null; - byte[] listChunkData = null; - - foreach (RiffChunk chunk in reader.ExtraChunks) - { - if (chunk.IdentifierAsString.ToLower() == "cue ") - { - cueChunkData = reader.GetChunkData(chunk); - } - else if (chunk.IdentifierAsString.ToLower() == "list") - { - listChunkData = reader.GetChunkData(chunk); - } - } - if (cueChunkData != null && listChunkData != null) - { - cueList = new CueList(cueChunkData, listChunkData); - } - return cueList; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueList.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueList.cs.meta deleted file mode 100644 index c055c40..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a0d1d9ed68b976e4aba5e5f12b1f37ca -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueWaveFileReader.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueWaveFileReader.cs deleted file mode 100644 index 282aa46..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueWaveFileReader.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// A wave file reader supporting cue reading - /// - public class CueWaveFileReader : WaveFileReader - { - private CueList cues; - - /// - /// Loads a wavefile and supports reading cues - /// - /// - public CueWaveFileReader(string fileName) - : base(fileName) - { - } - - /// - /// Cue List (can be null if cues not present) - /// - public CueList Cues - { - get - { - if (cues == null) - { - cues = CueList.FromChunks(this); - } - return cues; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueWaveFileReader.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueWaveFileReader.cs.meta deleted file mode 100644 index 272ba15..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/CueWaveFileReader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6d15524586b3a674a9a58f620804d2bd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ISampleNotifier.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ISampleNotifier.cs deleted file mode 100644 index 7e76e2e..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ISampleNotifier.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// An interface for WaveStreams which can report notification of individual samples - /// - public interface ISampleNotifier - { - /// - /// A sample has been detected - /// - event EventHandler Sample; - } - - /// - /// Sample event arguments - /// - public class SampleEventArgs : EventArgs - { - /// - /// Left sample - /// - public float Left { get; set; } - /// - /// Right sample - /// - public float Right { get; set; } - - /// - /// Constructor - /// - public SampleEventArgs(float left, float right) - { - Left = left; - Right = right; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ISampleNotifier.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ISampleNotifier.cs.meta deleted file mode 100644 index 20e3119..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ISampleNotifier.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3a228a95df02c4d49920d1f354176c9c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/MediaFoundationReader.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/MediaFoundationReader.cs deleted file mode 100644 index 73b2dc4..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/MediaFoundationReader.cs +++ /dev/null @@ -1,392 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Runtime.InteropServices; -using NAudio.CoreAudioApi.Interfaces; -using NAudio.MediaFoundation; -using NAudio.Utils; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Class for reading any file that Media Foundation can play - /// Will only work in Windows Vista and above - /// Automatically converts to PCM - /// If it is a video file with multiple audio streams, it will pick out the first audio stream - /// - public class MediaFoundationReader : WaveStream - { - private WaveFormat waveFormat; - private long length; - private MediaFoundationReaderSettings settings; - private readonly string file; - private IMFSourceReader pReader; - - private long position; - - /// - /// Allows customisation of this reader class - /// - public class MediaFoundationReaderSettings - { - /// - /// Sets up the default settings for MediaFoundationReader - /// - public MediaFoundationReaderSettings() - { - RepositionInRead = true; - } - - /// - /// Allows us to request IEEE float output (n.b. no guarantee this will be accepted) - /// - public bool RequestFloatOutput { get; set; } - /// - /// If true, the reader object created in the constructor is used in Read - /// Should only be set to true if you are working entirely on an STA thread, or - /// entirely with MTA threads. - /// - public bool SingleReaderObject { get; set; } - /// - /// If true, the reposition does not happen immediately, but waits until the - /// next call to read to be processed. - /// - public bool RepositionInRead { get; set; } - } - - /// - /// Default constructor - /// - protected MediaFoundationReader() - { - } - - /// - /// Creates a new MediaFoundationReader based on the supplied file - /// - /// Filename (can also be a URL e.g. http:// mms:// file://) - public MediaFoundationReader(string file) - : this(file, null) - { - } - - - /// - /// Creates a new MediaFoundationReader based on the supplied file - /// - /// Filename - /// Advanced settings - public MediaFoundationReader(string file, MediaFoundationReaderSettings settings) - { - this.file = file; - Init(settings); - } - - /// - /// Initializes - /// - protected void Init(MediaFoundationReaderSettings initialSettings) - { - MediaFoundationApi.Startup(); - settings = initialSettings ?? new MediaFoundationReaderSettings(); - var reader = CreateReader(settings); - - waveFormat = GetCurrentWaveFormat(reader); - - reader.SetStreamSelection(MediaFoundationInterop.MF_SOURCE_READER_FIRST_AUDIO_STREAM, true); - length = GetLength(reader); - - if (settings.SingleReaderObject) - { - pReader = reader; - } - else - { - Marshal.ReleaseComObject(reader); - } - } - - private WaveFormat GetCurrentWaveFormat(IMFSourceReader reader) - { - IMFMediaType uncompressedMediaType; - reader.GetCurrentMediaType(MediaFoundationInterop.MF_SOURCE_READER_FIRST_AUDIO_STREAM, out uncompressedMediaType); - - // Two ways to query it, first is to ask for properties (second is to convert into WaveFormatEx using MFCreateWaveFormatExFromMFMediaType) - var outputMediaType = new MediaType(uncompressedMediaType); - Guid actualMajorType = outputMediaType.MajorType; - Debug.Assert(actualMajorType == MediaTypes.MFMediaType_Audio); - Guid audioSubType = outputMediaType.SubType; - int channels = outputMediaType.ChannelCount; - int bits = outputMediaType.BitsPerSample; - int sampleRate = outputMediaType.SampleRate; - - if (audioSubType == AudioSubtypes.MFAudioFormat_PCM) - return new WaveFormat(sampleRate, bits, channels); - if (audioSubType == AudioSubtypes.MFAudioFormat_Float) - return WaveFormat.CreateIeeeFloatWaveFormat(sampleRate, channels); - var subTypeDescription = FieldDescriptionHelper.Describe(typeof (AudioSubtypes), audioSubType); - throw new InvalidDataException(String.Format("Unsupported audio sub Type {0}", subTypeDescription)); - } - - private static MediaType GetCurrentMediaType(IMFSourceReader reader) - { - IMFMediaType mediaType; - reader.GetCurrentMediaType(MediaFoundationInterop.MF_SOURCE_READER_FIRST_AUDIO_STREAM, out mediaType); - return new MediaType(mediaType); - } - - /// - /// Creates the reader (overridable by ) - /// - protected virtual IMFSourceReader CreateReader(MediaFoundationReaderSettings settings) - { - IMFSourceReader reader; - MediaFoundationInterop.MFCreateSourceReaderFromURL(file, null, out reader); - reader.SetStreamSelection(MediaFoundationInterop.MF_SOURCE_READER_ALL_STREAMS, false); - reader.SetStreamSelection(MediaFoundationInterop.MF_SOURCE_READER_FIRST_AUDIO_STREAM, true); - - // Create a partial media type indicating that we want uncompressed PCM audio - - var partialMediaType = new MediaType(); - partialMediaType.MajorType = MediaTypes.MFMediaType_Audio; - partialMediaType.SubType = settings.RequestFloatOutput ? AudioSubtypes.MFAudioFormat_Float : AudioSubtypes.MFAudioFormat_PCM; - - var currentMediaType = GetCurrentMediaType(reader); - - // mono, low sample rate files can go wrong on Windows 10 unless we specify here - partialMediaType.ChannelCount = currentMediaType.ChannelCount; - partialMediaType.SampleRate = currentMediaType.SampleRate; - - try - { - // set the media type - // can return MF_E_INVALIDMEDIATYPE if not supported - reader.SetCurrentMediaType(MediaFoundationInterop.MF_SOURCE_READER_FIRST_AUDIO_STREAM, IntPtr.Zero, partialMediaType.MediaFoundationObject); - } - catch (COMException ex) when (ex.GetHResult() == MediaFoundationErrors.MF_E_INVALIDMEDIATYPE) - { - // HE-AAC (and v2) seems to halve the samplerate - if (currentMediaType.SubType == AudioSubtypes.MFAudioFormat_AAC && currentMediaType.ChannelCount == 1) - { - partialMediaType.SampleRate = currentMediaType.SampleRate *= 2; - partialMediaType.ChannelCount = currentMediaType.ChannelCount *= 2; - reader.SetCurrentMediaType(MediaFoundationInterop.MF_SOURCE_READER_FIRST_AUDIO_STREAM, IntPtr.Zero, partialMediaType.MediaFoundationObject); - } - else { throw; } - } - - Marshal.ReleaseComObject(currentMediaType.MediaFoundationObject); - return reader; - } - - private long GetLength(IMFSourceReader reader) - { - var variantPtr = Marshal.AllocHGlobal(MarshalHelpers.SizeOf()); - try - { - - // http://msdn.microsoft.com/en-gb/library/windows/desktop/dd389281%28v=vs.85%29.aspx#getting_file_duration - int hResult = reader.GetPresentationAttribute(MediaFoundationInterop.MF_SOURCE_READER_MEDIASOURCE, - MediaFoundationAttributes.MF_PD_DURATION, variantPtr); - if (hResult == MediaFoundationErrors.MF_E_ATTRIBUTENOTFOUND) - { - // this doesn't support telling us its duration (might be streaming) - return 0; - } - if (hResult != 0) - { - Marshal.ThrowExceptionForHR(hResult); - } - var variant = MarshalHelpers.PtrToStructure(variantPtr); - - var lengthInBytes = (((long)variant.Value) * waveFormat.AverageBytesPerSecond) / 10000000L; - return lengthInBytes; - } - finally - { - PropVariant.Clear(variantPtr); - Marshal.FreeHGlobal(variantPtr); - } - } - - private byte[] decoderOutputBuffer; - private int decoderOutputOffset; - private int decoderOutputCount; - - private void EnsureBuffer(int bytesRequired) - { - if (decoderOutputBuffer == null || decoderOutputBuffer.Length < bytesRequired) - { - decoderOutputBuffer = new byte[bytesRequired]; - } - } - - /// - /// Reads from this wave stream - /// - /// Buffer to read into - /// Offset in buffer - /// Bytes required - /// Number of bytes read; 0 indicates end of stream - public override int Read(byte[] buffer, int offset, int count) - { - if (pReader == null) - { - pReader = CreateReader(settings); - } - if (repositionTo != -1) - { - Reposition(repositionTo); - } - - int bytesWritten = 0; - // read in any leftovers from last time - if (decoderOutputCount > 0) - { - bytesWritten += ReadFromDecoderBuffer(buffer, offset, count - bytesWritten); - } - - while (bytesWritten < count) - { - IMFSample pSample; - MF_SOURCE_READER_FLAG dwFlags; - ulong timestamp; - int actualStreamIndex; - pReader.ReadSample(MediaFoundationInterop.MF_SOURCE_READER_FIRST_AUDIO_STREAM, 0, out actualStreamIndex, out dwFlags, out timestamp, out pSample); - if ((dwFlags & MF_SOURCE_READER_FLAG.MF_SOURCE_READERF_ENDOFSTREAM) != 0) - { - // reached the end of the stream - break; - } - else if ((dwFlags & MF_SOURCE_READER_FLAG.MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED) != 0) - { - waveFormat = GetCurrentWaveFormat(pReader); - OnWaveFormatChanged(); - // carry on, but user must handle the change of format - } - else if (dwFlags != 0) - { - throw new InvalidOperationException(String.Format("MediaFoundationReadError {0}", dwFlags)); - } - - IMFMediaBuffer pBuffer; - pSample.ConvertToContiguousBuffer(out pBuffer); - IntPtr pAudioData; - int cbBuffer; - int pcbMaxLength; - pBuffer.Lock(out pAudioData, out pcbMaxLength, out cbBuffer); - EnsureBuffer(cbBuffer); - Marshal.Copy(pAudioData, decoderOutputBuffer, 0, cbBuffer); - decoderOutputOffset = 0; - decoderOutputCount = cbBuffer; - - bytesWritten += ReadFromDecoderBuffer(buffer, offset + bytesWritten, count - bytesWritten); - - - pBuffer.Unlock(); - Marshal.ReleaseComObject(pBuffer); - Marshal.ReleaseComObject(pSample); - } - position += bytesWritten; - return bytesWritten; - } - - private int ReadFromDecoderBuffer(byte[] buffer, int offset, int needed) - { - int bytesFromDecoderOutput = Math.Min(needed, decoderOutputCount); - Array.Copy(decoderOutputBuffer, decoderOutputOffset, buffer, offset, bytesFromDecoderOutput); - decoderOutputOffset += bytesFromDecoderOutput; - decoderOutputCount -= bytesFromDecoderOutput; - if (decoderOutputCount == 0) - { - decoderOutputOffset = 0; - } - return bytesFromDecoderOutput; - } - - /// - /// WaveFormat of this stream (n.b. this is after converting to PCM) - /// - public override WaveFormat WaveFormat - { - get { return waveFormat; } - } - - /// - /// The bytesRequired of this stream in bytes (n.b may not be accurate) - /// - public override long Length - { - get - { - return length; - } - } - - /// - /// Current position within this stream - /// - public override long Position - { - get { return position; } - set - { - if (value < 0) - throw new ArgumentOutOfRangeException("value", "Position cannot be less than 0"); - if (settings.RepositionInRead) - { - repositionTo = value; - position = value; // for gui apps, make it look like we have alread processed the reposition - } - else - { - Reposition(value); - } - } - } - - private long repositionTo = -1; - - private void Reposition(long desiredPosition) - { - long nsPosition = (10000000L * repositionTo) / waveFormat.AverageBytesPerSecond; - var pv = PropVariant.FromLong(nsPosition); - var ptr = Marshal.AllocHGlobal(Marshal.SizeOf(pv)); - Marshal.StructureToPtr(pv,ptr,false); - - // should pass in a variant of type VT_I8 which is a long containing time in 100nanosecond units - pReader.SetCurrentPosition(Guid.Empty, ptr); - Marshal.FreeHGlobal(ptr); - decoderOutputCount = 0; - decoderOutputOffset = 0; - position = desiredPosition; - repositionTo = -1;// clear the flag - } - - /// - /// Cleans up after finishing with this reader - /// - /// true if called from Dispose - protected override void Dispose(bool disposing) - { - if (pReader != null) - { - Marshal.ReleaseComObject(pReader); - pReader = null; - } - base.Dispose(disposing); - } - - /// - /// WaveFormat has changed - /// - public event EventHandler WaveFormatChanged; - - private void OnWaveFormatChanged() - { - var handler = WaveFormatChanged; - if (handler != null) handler(this, EventArgs.Empty); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/MediaFoundationReader.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/MediaFoundationReader.cs.meta deleted file mode 100644 index 5a42e15..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/MediaFoundationReader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: faf7172ab20d80247b7674ffb1a90d97 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Mp3FileReader.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Mp3FileReader.cs deleted file mode 100644 index b8ff30f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Mp3FileReader.cs +++ /dev/null @@ -1,486 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Diagnostics; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - class Mp3Index - { - public long FilePosition { get; set; } - public long SamplePosition { get; set; } - public int SampleCount { get; set; } - public int ByteCount { get; set; } - } - - /// - /// Class for reading from MP3 files - /// - public class Mp3FileReader : WaveStream - { - private readonly WaveFormat waveFormat; - private Stream mp3Stream; - private readonly long mp3DataLength; - private readonly long dataStartPosition; - - /// - /// The MP3 wave format (n.b. NOT the output format of this stream - see the WaveFormat property) - /// - public Mp3WaveFormat Mp3WaveFormat { get; private set; } - - private readonly XingHeader xingHeader; - private readonly bool ownInputStream; - - private List tableOfContents; - private int tocIndex; - - private long totalSamples; - private readonly int bytesPerSample; - private readonly int bytesPerDecodedFrame; - - private IMp3FrameDecompressor decompressor; - - private readonly byte[] decompressBuffer; - private int decompressBufferOffset; - private int decompressLeftovers; - private bool repositionedFlag; - - private long position; // decompressed data position tracker - - private readonly object repositionLock = new object(); - - /// Supports opening a MP3 file - public Mp3FileReader(string mp3FileName) - : this(File.OpenRead(mp3FileName), CreateAcmFrameDecompressor, true) - { - } - - /// Supports opening a MP3 file - /// MP3 File name - /// Factory method to build a frame decompressor - public Mp3FileReader(string mp3FileName, FrameDecompressorBuilder frameDecompressorBuilder) - : this(File.OpenRead(mp3FileName), frameDecompressorBuilder, true) - { - } - - /// - /// Opens MP3 from a stream rather than a file - /// Will not dispose of this stream itself - /// - /// The incoming stream containing MP3 data - public Mp3FileReader(Stream inputStream) - : this (inputStream, CreateAcmFrameDecompressor, false) - { - - } - - /// - /// Opens MP3 from a stream rather than a file - /// Will not dispose of this stream itself - /// - /// The incoming stream containing MP3 data - /// Factory method to build a frame decompressor - public Mp3FileReader(Stream inputStream, FrameDecompressorBuilder frameDecompressorBuilder) - : this(inputStream, frameDecompressorBuilder, false) - { - - } - - private Mp3FileReader(Stream inputStream, FrameDecompressorBuilder frameDecompressorBuilder, bool ownInputStream) - { - if (inputStream == null) throw new ArgumentNullException(nameof(inputStream)); - if (frameDecompressorBuilder == null) throw new ArgumentNullException(nameof(frameDecompressorBuilder)); - this.ownInputStream = ownInputStream; - try - { - mp3Stream = inputStream; - Id3v2Tag = Id3v2Tag.ReadTag(mp3Stream); - - dataStartPosition = mp3Stream.Position; - var firstFrame = Mp3Frame.LoadFromStream(mp3Stream); - if (firstFrame == null) - throw new InvalidDataException("Invalid MP3 file - no MP3 Frames Detected"); - double bitRate = firstFrame.BitRate; - xingHeader = XingHeader.LoadXingHeader(firstFrame); - // If the header exists, we can skip over it when decoding the rest of the file - if (xingHeader != null) dataStartPosition = mp3Stream.Position; - - // workaround for a longstanding issue with some files failing to load - // because they report a spurious sample rate change - var secondFrame = Mp3Frame.LoadFromStream(mp3Stream); - if (secondFrame != null && - (secondFrame.SampleRate != firstFrame.SampleRate || - secondFrame.ChannelMode != firstFrame.ChannelMode)) - { - // assume that the first frame was some kind of VBR/LAME header that we failed to recognise properly - dataStartPosition = secondFrame.FileOffset; - // forget about the first frame, the second one is the first one we really care about - firstFrame = secondFrame; - } - - mp3DataLength = mp3Stream.Length - dataStartPosition; - - // try for an ID3v1 tag as well - mp3Stream.Position = mp3Stream.Length - 128; - byte[] tag = new byte[128]; - mp3Stream.Read(tag, 0, 128); - if (tag[0] == 'T' && tag[1] == 'A' && tag[2] == 'G') - { - Id3v1Tag = tag; - mp3DataLength -= 128; - } - - mp3Stream.Position = dataStartPosition; - - // create a temporary MP3 format before we know the real bitrate - Mp3WaveFormat = new Mp3WaveFormat(firstFrame.SampleRate, - firstFrame.ChannelMode == ChannelMode.Mono ? 1 : 2, firstFrame.FrameLength, (int) bitRate); - - CreateTableOfContents(); - tocIndex = 0; - - // [Bit rate in Kilobits/sec] = [Length in kbits] / [time in seconds] - // = [Length in bits ] / [time in milliseconds] - - // Note: in audio, 1 kilobit = 1000 bits. - // Calculated as a double to minimize rounding errors - bitRate = (mp3DataLength*8.0/TotalSeconds()); - - mp3Stream.Position = dataStartPosition; - - // now we know the real bitrate we can create an accurate MP3 WaveFormat - Mp3WaveFormat = new Mp3WaveFormat(firstFrame.SampleRate, - firstFrame.ChannelMode == ChannelMode.Mono ? 1 : 2, firstFrame.FrameLength, (int) bitRate); - decompressor = frameDecompressorBuilder(Mp3WaveFormat); - waveFormat = decompressor.OutputFormat; - bytesPerSample = (decompressor.OutputFormat.BitsPerSample)/8*decompressor.OutputFormat.Channels; - // no MP3 frames have more than 1152 samples in them - bytesPerDecodedFrame = 1152 * bytesPerSample; - // some MP3s I seem to get double - decompressBuffer = new byte[bytesPerDecodedFrame * 2]; - } - catch (Exception) - { - if (ownInputStream) inputStream.Dispose(); - throw; - } - } - - /// - /// Function that can create an MP3 Frame decompressor - /// - /// A WaveFormat object describing the MP3 file format - /// An MP3 Frame decompressor - public delegate IMp3FrameDecompressor FrameDecompressorBuilder(WaveFormat mp3Format); - - /// - /// Creates an ACM MP3 Frame decompressor. This is the default with NAudio - /// - /// A WaveFormat object based - /// - public static IMp3FrameDecompressor CreateAcmFrameDecompressor(WaveFormat mp3Format) - { - // new DmoMp3FrameDecompressor(this.Mp3WaveFormat); - return new AcmMp3FrameDecompressor(mp3Format); - } - - private void CreateTableOfContents() - { - try - { - // Just a guess at how many entries we'll need so the internal array need not resize very much - // 400 bytes per frame is probably a good enough approximation. - tableOfContents = new List((int)(mp3DataLength / 400)); - Mp3Frame frame; - do - { - var index = new Mp3Index(); - index.FilePosition = mp3Stream.Position; - index.SamplePosition = totalSamples; - frame = ReadNextFrame(false); - if (frame != null) - { - ValidateFrameFormat(frame); - - totalSamples += frame.SampleCount; - index.SampleCount = frame.SampleCount; - index.ByteCount = (int)(mp3Stream.Position - index.FilePosition); - tableOfContents.Add(index); - } - } while (frame != null); - } - catch (EndOfStreamException) - { - // not necessarily a problem - } - } - - private void ValidateFrameFormat(Mp3Frame frame) - { - if (frame.SampleRate != Mp3WaveFormat.SampleRate) - { - string message = - String.Format( - "Got a frame at sample rate {0}, in an MP3 with sample rate {1}. Mp3FileReader does not support sample rate changes.", - frame.SampleRate, Mp3WaveFormat.SampleRate); - throw new InvalidOperationException(message); - } - int channels = frame.ChannelMode == ChannelMode.Mono ? 1 : 2; - if (channels != Mp3WaveFormat.Channels) - { - string message = - String.Format( - "Got a frame with channel mode {0}, in an MP3 with {1} channels. Mp3FileReader does not support changes to channel count.", - frame.ChannelMode, Mp3WaveFormat.Channels); - throw new InvalidOperationException(message); - } - } - - /// - /// Gets the total length of this file in milliseconds. - /// - private double TotalSeconds() - { - return (double)totalSamples / Mp3WaveFormat.SampleRate; - } - - /// - /// ID3v2 tag if present - /// - // ReSharper disable once InconsistentNaming - public Id3v2Tag Id3v2Tag { get; } - - /// - /// ID3v1 tag if present - /// - // ReSharper disable once InconsistentNaming - public byte[] Id3v1Tag { get; } - - /// - /// Reads the next mp3 frame - /// - /// Next mp3 frame, or null if EOF - public Mp3Frame ReadNextFrame() - { - var frame = ReadNextFrame(true); - if (frame != null) position += frame.SampleCount*bytesPerSample; - return frame; - } - - /// - /// Reads the next mp3 frame - /// - /// Next mp3 frame, or null if EOF - private Mp3Frame ReadNextFrame(bool readData) - { - Mp3Frame frame = null; - try - { - frame = Mp3Frame.LoadFromStream(mp3Stream, readData); - if (frame != null) - { - tocIndex++; - } - } - catch (EndOfStreamException) - { - // suppress for now - it means we unexpectedly got to the end of the stream - // half way through - } - return frame; - } - - /// - /// This is the length in bytes of data available to be read out from the Read method - /// (i.e. the decompressed MP3 length) - /// n.b. this may return 0 for files whose length is unknown - /// - public override long Length => totalSamples * bytesPerSample; - - /// - /// - /// - public override WaveFormat WaveFormat => waveFormat; - - /// - /// - /// - public override long Position - { - get - { - return position; - } - set - { - lock (repositionLock) - { - value = Math.Max(Math.Min(value, Length), 0); - var samplePosition = value / bytesPerSample; - Mp3Index mp3Index = null; - for (int index = 0; index < tableOfContents.Count; index++) - { - if (tableOfContents[index].SamplePosition + tableOfContents[index].SampleCount > samplePosition) - { - mp3Index = tableOfContents[index]; - tocIndex = index; - break; - } - } - - decompressBufferOffset = 0; - decompressLeftovers = 0; - repositionedFlag = true; - - if (mp3Index != null) - { - // perform the reposition - mp3Stream.Position = mp3Index.FilePosition; - - // set the offset into the buffer (that is yet to be populated in Read()) - var frameOffset = samplePosition - mp3Index.SamplePosition; - if (frameOffset > 0) - { - decompressBufferOffset = (int)frameOffset * bytesPerSample; - } - } - else - { - // we are repositioning to the end of the data - mp3Stream.Position = mp3DataLength + dataStartPosition; - } - - position = value; - } - } - } - - /// - /// Reads decompressed PCM data from our MP3 file. - /// - public override int Read(byte[] sampleBuffer, int offset, int numBytes) - { - int bytesRead = 0; - lock (repositionLock) - { - if (decompressLeftovers != 0) - { - int toCopy = Math.Min(decompressLeftovers, numBytes); - Array.Copy(decompressBuffer, decompressBufferOffset, sampleBuffer, offset, toCopy); - decompressLeftovers -= toCopy; - if (decompressLeftovers == 0) - { - decompressBufferOffset = 0; - } - else - { - decompressBufferOffset += toCopy; - } - bytesRead += toCopy; - offset += toCopy; - } - - int targetTocIndex = tocIndex; // the frame index that contains the requested data - - if (repositionedFlag) - { - decompressor.Reset(); - - // Seek back a few frames of the stream to get the reset decoder decode a few - // warm-up frames before reading the requested data. Without the warm-up phase, - // the first half of the frame after the reset is attenuated and does not resemble - // the data as it would be when reading sequentially from the beginning, because - // the decoder is missing the required overlap from the previous frame. - tocIndex = Math.Max(0, tocIndex - 3); // no warm-up at the beginning of the stream - mp3Stream.Position = tableOfContents[tocIndex].FilePosition; - - repositionedFlag = false; - } - - while (bytesRead < numBytes) - { - Mp3Frame frame = ReadNextFrame(true); // internal read - should not advance position - if (frame != null) - { - int decompressed = decompressor.DecompressFrame(frame, decompressBuffer, 0); - - if (tocIndex <= targetTocIndex || decompressed == 0) - { - // The first frame after a reset usually does not immediately yield decoded samples. - // Because the next instructions will fail if a buffer offset is set and the frame - // decoding didn't return data, we skip the part. - // We skip the following instructions also after decoding a warm-up frame. - continue; - } - // Two special cases can happen here: - // 1. We are interested in the first frame of the stream, but need to read the second frame too - // for the decoder to return decoded data - // 2. We are interested in the second frame of the stream, but because reading the first frame - // as warm-up didn't yield any data (because the decoder needs two frames to return data), we - // get data from the first and second frame. - // This case needs special handling, and we have to purge the data of the first frame. - else if (tocIndex == targetTocIndex + 1 && decompressed == bytesPerDecodedFrame * 2) - { - // Purge the first frame's data - Array.Copy(decompressBuffer, bytesPerDecodedFrame, decompressBuffer, 0, bytesPerDecodedFrame); - decompressed = bytesPerDecodedFrame; - } - - int toCopy = Math.Min(decompressed - decompressBufferOffset, numBytes - bytesRead); - Array.Copy(decompressBuffer, decompressBufferOffset, sampleBuffer, offset, toCopy); - if ((toCopy + decompressBufferOffset) < decompressed) - { - decompressBufferOffset = toCopy + decompressBufferOffset; - decompressLeftovers = decompressed - decompressBufferOffset; - } - else - { - // no lefovers - decompressBufferOffset = 0; - decompressLeftovers = 0; - } - offset += toCopy; - bytesRead += toCopy; - } - else - { - break; - } - } - } - Debug.Assert(bytesRead <= numBytes, "MP3 File Reader read too much"); - position += bytesRead; - return bytesRead; - } - - /// - /// Xing header if present - /// - public XingHeader XingHeader => xingHeader; - - /// - /// Disposes this WaveStream - /// - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (mp3Stream != null) - { - if (ownInputStream) - { - mp3Stream.Dispose(); - } - mp3Stream = null; - } - if (decompressor != null) - { - decompressor.Dispose(); - decompressor = null; - } - } - base.Dispose(disposing); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Mp3FileReader.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Mp3FileReader.cs.meta deleted file mode 100644 index 4844957..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Mp3FileReader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 972eada45db11894f8914e3c7e70be44 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RawSourceWaveStream.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RawSourceWaveStream.cs deleted file mode 100644 index 55ecb12..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RawSourceWaveStream.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.IO; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// WaveStream that simply passes on data from its source stream - /// (e.g. a MemoryStream) - /// - public class RawSourceWaveStream : WaveStream - { - private readonly Stream sourceStream; - private readonly WaveFormat waveFormat; - - /// - /// Initialises a new instance of RawSourceWaveStream - /// - /// The source stream containing raw audio - /// The waveformat of the audio in the source stream - public RawSourceWaveStream(Stream sourceStream, WaveFormat waveFormat) - { - this.sourceStream = sourceStream; - this.waveFormat = waveFormat; - } - - /// - /// Initialises a new instance of RawSourceWaveStream - /// - /// The buffer containing raw audio - /// Offset in the source buffer to read from - /// Number of bytes to read in the buffer - /// The waveformat of the audio in the source stream - public RawSourceWaveStream(byte[] byteStream, int offset, int count, WaveFormat waveFormat) - { - sourceStream = new MemoryStream(byteStream, offset, count); - this.waveFormat = waveFormat; - } - - /// - /// The WaveFormat of this stream - /// - public override WaveFormat WaveFormat => waveFormat; - - /// - /// The length in bytes of this stream (if supported) - /// - public override long Length => sourceStream.Length; - - /// - /// The current position in this stream - /// - public override long Position - { - get - { - return sourceStream.Position; - } - set - { - sourceStream.Position = value - (value % waveFormat.BlockAlign); - } - } - - /// - /// Reads data from the stream - /// - public override int Read(byte[] buffer, int offset, int count) - { - try - { - return sourceStream.Read(buffer, offset, count); - } - catch (EndOfStreamException) - { - return 0; - } - } - } -} - diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RawSourceWaveStream.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RawSourceWaveStream.cs.meta deleted file mode 100644 index 0da2487..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RawSourceWaveStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 149d750eeaf90324b998ef41232514b9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ResamplerDmoStream.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ResamplerDmoStream.cs deleted file mode 100644 index 1502c39..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ResamplerDmoStream.cs +++ /dev/null @@ -1,195 +0,0 @@ -using System; -using NAudio.Dmo; -using System.Diagnostics; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Wave Stream for converting between sample rates - /// - public class ResamplerDmoStream : WaveStream - { - private readonly IWaveProvider inputProvider; - private readonly WaveStream inputStream; - private readonly WaveFormat outputFormat; - private DmoOutputDataBuffer outputBuffer; - private DmoResampler dmoResampler; - private MediaBuffer inputMediaBuffer; - private long position; - - /// - /// WaveStream to resample using the DMO Resampler - /// - /// Input Stream - /// Desired Output Format - public ResamplerDmoStream(IWaveProvider inputProvider, WaveFormat outputFormat) - { - this.inputProvider = inputProvider; - inputStream = inputProvider as WaveStream; - this.outputFormat = outputFormat; - dmoResampler = new DmoResampler(); - if (!dmoResampler.MediaObject.SupportsInputWaveFormat(0, inputProvider.WaveFormat)) - { - throw new ArgumentException("Unsupported Input Stream format", nameof(inputProvider)); - } - - dmoResampler.MediaObject.SetInputWaveFormat(0, inputProvider.WaveFormat); - if (!dmoResampler.MediaObject.SupportsOutputWaveFormat(0, outputFormat)) - { - throw new ArgumentException("Unsupported Output Stream format", nameof(outputFormat)); - } - - dmoResampler.MediaObject.SetOutputWaveFormat(0, outputFormat); - if (inputStream != null) - { - position = InputToOutputPosition(inputStream.Position); - } - inputMediaBuffer = new MediaBuffer(inputProvider.WaveFormat.AverageBytesPerSecond); - outputBuffer = new DmoOutputDataBuffer(outputFormat.AverageBytesPerSecond); - } - - /// - /// Stream Wave Format - /// - public override WaveFormat WaveFormat => outputFormat; - - private long InputToOutputPosition(long inputPosition) - { - double ratio = (double)outputFormat.AverageBytesPerSecond - / inputProvider.WaveFormat.AverageBytesPerSecond; - long outputPosition = (long)(inputPosition * ratio); - if (outputPosition % outputFormat.BlockAlign != 0) - { - outputPosition -= outputPosition % outputFormat.BlockAlign; - } - return outputPosition; - } - - private long OutputToInputPosition(long outputPosition) - { - double ratio = (double)outputFormat.AverageBytesPerSecond - / inputProvider.WaveFormat.AverageBytesPerSecond; - long inputPosition = (long)(outputPosition / ratio); - if (inputPosition % inputProvider.WaveFormat.BlockAlign != 0) - { - inputPosition -= inputPosition % inputProvider.WaveFormat.BlockAlign; - } - return inputPosition; - } - - /// - /// Stream length in bytes - /// - public override long Length - { - get - { - if (inputStream == null) - { - throw new InvalidOperationException("Cannot report length if the input was an IWaveProvider"); - } - return InputToOutputPosition(inputStream.Length); - } - } - - /// - /// Stream position in bytes - /// - public override long Position - { - get - { - return position; - } - set - { - if (inputStream == null) - { - throw new InvalidOperationException("Cannot set position if the input was not a WaveStream"); - } - inputStream.Position = OutputToInputPosition(value); - position = InputToOutputPosition(inputStream.Position); - dmoResampler.MediaObject.Discontinuity(0); - } - } - - /// - /// Reads data from input stream - /// - /// buffer - /// offset into buffer - /// Bytes required - /// Number of bytes read - public override int Read(byte[] buffer, int offset, int count) - { - int outputBytesProvided = 0; - - while (outputBytesProvided < count) - { - if (dmoResampler.MediaObject.IsAcceptingData(0)) - { - // 1. Read from the input stream - int inputBytesRequired = (int)OutputToInputPosition(count - outputBytesProvided); - byte[] inputByteArray = new byte[inputBytesRequired]; - int inputBytesRead = inputProvider.Read(inputByteArray, 0, inputBytesRequired); - if (inputBytesRead == 0) - { - //Debug.WriteLine("ResamplerDmoStream.Read: No input data available"); - break; - } - // 2. copy into our DMO's input buffer - inputMediaBuffer.LoadData(inputByteArray, inputBytesRead); - - // 3. Give the input buffer to the DMO to process - dmoResampler.MediaObject.ProcessInput(0, inputMediaBuffer, DmoInputDataBufferFlags.None, 0, 0); - - outputBuffer.MediaBuffer.SetLength(0); - outputBuffer.StatusFlags = DmoOutputDataBufferFlags.None; - - // 4. Now ask the DMO for some output data - dmoResampler.MediaObject.ProcessOutput(DmoProcessOutputFlags.None, 1, new[] { outputBuffer }); - - if (outputBuffer.Length == 0) - { - Debug.WriteLine("ResamplerDmoStream.Read: No output data available"); - break; - } - - // 5. Now get the data out of the output buffer - outputBuffer.RetrieveData(buffer, offset + outputBytesProvided); - outputBytesProvided += outputBuffer.Length; - - Debug.Assert(!outputBuffer.MoreDataAvailable, "have not implemented more data available yet"); - } - else - { - Debug.Assert(false, "have not implemented not accepting logic yet"); - } - } - - position += outputBytesProvided; - return outputBytesProvided; - } - - /// - /// Dispose - /// - /// True if disposing (not from finalizer) - protected override void Dispose(bool disposing) - { - if (inputMediaBuffer != null) - { - inputMediaBuffer.Dispose(); - inputMediaBuffer = null; - } - outputBuffer.Dispose(); - if (dmoResampler != null) - { - //resampler.Dispose(); s - dmoResampler = null; - } - base.Dispose(disposing); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ResamplerDmoStream.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ResamplerDmoStream.cs.meta deleted file mode 100644 index 78772e1..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/ResamplerDmoStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3b0ab0de571b1f144a797127da0f408c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RiffChunk.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RiffChunk.cs deleted file mode 100644 index 78fe60e..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RiffChunk.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Text; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Holds information about a RIFF file chunk - /// - public class RiffChunk - { - /// - /// Creates a RiffChunk object - /// - public RiffChunk(int identifier, int length, long streamPosition) - { - Identifier = identifier; - Length = length; - StreamPosition = streamPosition; - } - - /// - /// The chunk identifier - /// - public int Identifier { get; } - - /// - /// The chunk identifier converted to a string - /// - public string IdentifierAsString => Encoding.UTF8.GetString(BitConverter.GetBytes(Identifier)); - - /// - /// The chunk length - /// - public int Length { get; private set; } - - /// - /// The stream position this chunk is located at - /// - public long StreamPosition { get; private set; } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RiffChunk.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RiffChunk.cs.meta deleted file mode 100644 index cf7bfc1..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/RiffChunk.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7b8504ca5814e5f4b8a99d457ad50b13 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/SimpleCompressorStream.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/SimpleCompressorStream.cs deleted file mode 100644 index eb417de..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/SimpleCompressorStream.cs +++ /dev/null @@ -1,292 +0,0 @@ -using System; -using NAudio.Dsp; - -namespace NAudio.Wave -{ - /// - /// A simple compressor - /// - public class SimpleCompressorStream : WaveStream - { - private WaveStream sourceStream; - private readonly SimpleCompressor simpleCompressor; - private byte[] sourceBuffer; // buffer used by Read function - private readonly int channels; - private readonly int bytesPerSample; - private readonly object lockObject = new object(); - - /// - /// Create a new simple compressor stream - /// - /// Source stream - public SimpleCompressorStream(WaveStream sourceStream) - { - this.sourceStream = sourceStream; - channels = sourceStream.WaveFormat.Channels; - bytesPerSample = sourceStream.WaveFormat.BitsPerSample / 8; - simpleCompressor = new SimpleCompressor(5.0, 10.0, sourceStream.WaveFormat.SampleRate); - simpleCompressor.Threshold = 16; - simpleCompressor.Ratio = 6; - simpleCompressor.MakeUpGain = 16; - - } - - /// - /// Make-up Gain - /// - public double MakeUpGain - { - get - { - return simpleCompressor.MakeUpGain; - } - set - { - lock (lockObject) - { - simpleCompressor.MakeUpGain = value; - } - } - } - - /// - /// Threshold - /// - public double Threshold - { - get - { - return simpleCompressor.Threshold; - } - set - { - lock (lockObject) - { - simpleCompressor.Threshold = value; - } - } - } - - /// - /// Ratio - /// - public double Ratio - { - get - { - return simpleCompressor.Ratio; - } - set - { - lock (lockObject) - { - simpleCompressor.Ratio = value; - } - } - } - - /// - /// Attack time - /// - public double Attack - { - get - { - return simpleCompressor.Attack; - } - set - { - lock (lockObject) - { - simpleCompressor.Attack = value; - } - } - } - - /// - /// Release time - /// - public double Release - { - get - { - return simpleCompressor.Release; - } - set - { - lock (lockObject) - { - simpleCompressor.Release = value; - } - } - } - - - /// - /// Determine whether the stream has the required amount of data. - /// - /// Number of bytes of data required from the stream. - /// Flag indicating whether the required amount of data is avialable. - public override bool HasData(int count) - { - return sourceStream.HasData(count); - } - - - /// - /// Turns gain on or off - /// - public bool Enabled { get; set; } - - - /// - /// Returns the stream length - /// - public override long Length => sourceStream.Length; - - /// - /// Gets or sets the current position in the stream - /// - public override long Position - { - get - { - return sourceStream.Position; - } - set - { - lock (lockObject) - { - sourceStream.Position = value; - } - } - } - - /// - /// Gets the WaveFormat of this stream - /// - public override WaveFormat WaveFormat => sourceStream.WaveFormat; - - private void ReadSamples(byte[] buffer, int start, out double left, out double right) - { - if (bytesPerSample == 4) - { - left = BitConverter.ToSingle(buffer, start); - if (channels > 1) - { - right = BitConverter.ToSingle(buffer, start + bytesPerSample); - } - else - { - right = left; - } - } - else if (bytesPerSample == 2) - { - left = BitConverter.ToInt16(buffer, start) / 32768.0; - if (channels > 1) - { - right = BitConverter.ToInt16(buffer, start + bytesPerSample) / 32768.0; - } - else - { - right = left; - } - } - else - { - throw new InvalidOperationException(String.Format("Unsupported bytes per sample: {0}", bytesPerSample)); - } - } - - private void WriteSamples(byte[] buffer, int start, double left, double right) - { - if (bytesPerSample == 4) - { - Array.Copy(BitConverter.GetBytes((float)left), 0, buffer, start, bytesPerSample); - if (channels > 1) - { - Array.Copy(BitConverter.GetBytes((float)right), 0, buffer, start + bytesPerSample, bytesPerSample); - } - } - else if (bytesPerSample == 2) - { - Array.Copy(BitConverter.GetBytes((short)(left * 32768.0)), 0, buffer, start, bytesPerSample); - if (channels > 1) - { - Array.Copy(BitConverter.GetBytes((short)(right * 32768.0)), 0, buffer, start + bytesPerSample, bytesPerSample); - } - } - } - - /// - /// Reads bytes from this stream - /// - /// Buffer to read into - /// Offset in array to read into - /// Number of bytes to read - /// Number of bytes read - public override int Read(byte[] array, int offset, int count) - { - lock (lockObject) - { - if (Enabled) - { - if (sourceBuffer == null || sourceBuffer.Length < count) - sourceBuffer = new byte[count]; - int sourceBytesRead = sourceStream.Read(sourceBuffer, 0, count); - int sampleCount = sourceBytesRead / (bytesPerSample * channels); - for (int sample = 0; sample < sampleCount; sample++) - { - int start = sample * bytesPerSample * channels; - double in1; - double in2; - ReadSamples(sourceBuffer, start, out in1, out in2); - simpleCompressor.Process(ref in1, ref in2); - WriteSamples(array, offset + start, in1, in2); - } - return count; - } - else - { - return sourceStream.Read(array, offset, count); - } - } - - } - - /// - /// Disposes this stream - /// - /// true if the user called this - protected override void Dispose(bool disposing) - { - if (disposing) - { - // Release managed resources. - if (sourceStream != null) - { - sourceStream.Dispose(); - sourceStream = null; - } - } - // Release unmanaged resources. - // Set large fields to null. - // Call Dispose on your base class. - base.Dispose(disposing); - } - - /// - /// Gets the block alignment for this stream - /// - public override int BlockAlign - { - get - { - // TODO: investigate forcing 20ms - return sourceStream.BlockAlign; - } - } - } -} - diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/SimpleCompressorStream.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/SimpleCompressorStream.cs.meta deleted file mode 100644 index 5171cfd..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/SimpleCompressorStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a825e07053c5b0349a825db709379eb7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/StreamMediaFoundationReader.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/StreamMediaFoundationReader.cs deleted file mode 100644 index 0c0ebfd..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/StreamMediaFoundationReader.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.IO; -using NAudio.MediaFoundation; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// MediaFoundationReader supporting reading from a stream - /// - public class StreamMediaFoundationReader : MediaFoundationReader - { - private readonly Stream stream; - - /// - /// Constructs a new media foundation reader from a stream - /// - public StreamMediaFoundationReader(Stream stream, MediaFoundationReaderSettings settings = null) - { - this.stream = stream; - Init(settings); - } - - /// - /// Creates the reader - /// - protected override IMFSourceReader CreateReader(MediaFoundationReaderSettings settings) - { - var ppSourceReader = MediaFoundationApi.CreateSourceReaderFromByteStream(MediaFoundationApi.CreateByteStream(new ComStream(stream))); - - ppSourceReader.SetStreamSelection(-2, false); - ppSourceReader.SetStreamSelection(-3, true); - ppSourceReader.SetCurrentMediaType(-3, IntPtr.Zero, new MediaType - { - MajorType = MediaTypes.MFMediaType_Audio, - SubType = settings.RequestFloatOutput ? AudioSubtypes.MFAudioFormat_Float : AudioSubtypes.MFAudioFormat_PCM - }.MediaFoundationObject); - - return ppSourceReader; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/StreamMediaFoundationReader.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/StreamMediaFoundationReader.cs.meta deleted file mode 100644 index d5ee840..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/StreamMediaFoundationReader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fddfec59ab93941428854e7dc189f477 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Wave32To16Stream.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Wave32To16Stream.cs deleted file mode 100644 index 41e6ba2..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Wave32To16Stream.cs +++ /dev/null @@ -1,180 +0,0 @@ -using System; -using NAudio.Utils; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// WaveStream that converts 32 bit audio back down to 16 bit, clipping if necessary - /// - public class Wave32To16Stream : WaveStream - { - private WaveStream sourceStream; - private readonly WaveFormat waveFormat; - private readonly long length; - private long position; - private bool clip; - private float volume; - private readonly object lockObject = new object(); - - /// - /// The method reuses the same buffer to prevent - /// unnecessary allocations. - /// - private byte[] sourceBuffer; - - /// - /// Creates a new Wave32To16Stream - /// - /// the source stream - public Wave32To16Stream(WaveStream sourceStream) - { - if (sourceStream.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - throw new ArgumentException("Only 32 bit Floating point supported"); - if (sourceStream.WaveFormat.BitsPerSample != 32) - throw new ArgumentException("Only 32 bit Floating point supported"); - - waveFormat = new WaveFormat(sourceStream.WaveFormat.SampleRate, 16, sourceStream.WaveFormat.Channels); - volume = 1.0f; - this.sourceStream = sourceStream; - length = sourceStream.Length / 2; - position = sourceStream.Position / 2; - } - - /// - /// Sets the volume for this stream. 1.0f is full scale - /// - public float Volume - { - get - { - return volume; - } - set - { - volume = value; - } - } - - /// - /// - /// - public override int BlockAlign => sourceStream.BlockAlign / 2; - - - /// - /// Returns the stream length - /// - public override long Length => length; - - /// - /// Gets or sets the current position in the stream - /// - public override long Position - { - get - { - return position; - } - set - { - lock (lockObject) - { - // make sure we don't get out of sync - value -= (value % BlockAlign); - sourceStream.Position = value * 2; - position = value; - } - } - } - - /// - /// Reads bytes from this wave stream - /// - /// Destination buffer - /// Offset into destination buffer - /// - /// Number of bytes read. - public override int Read(byte[] destBuffer, int offset, int numBytes) - { - lock (lockObject) - { - int count = numBytes*2; - sourceBuffer = BufferHelpers.Ensure(sourceBuffer, count); - int bytesRead = sourceStream.Read(sourceBuffer, 0, count); - Convert32To16(destBuffer, offset, sourceBuffer, bytesRead); - position += (bytesRead/2); - return bytesRead/2; - } - } - - /// - /// Conversion to 16 bit and clipping - /// - private unsafe void Convert32To16(byte[] destBuffer, int offset, byte[] source, int bytesRead) - { - fixed (byte* pDestBuffer = &destBuffer[offset], - pSourceBuffer = &source[0]) - { - short* psDestBuffer = (short*)pDestBuffer; - float* pfSourceBuffer = (float*)pSourceBuffer; - - int samplesRead = bytesRead / 4; - for (int n = 0; n < samplesRead; n++) - { - float sampleVal = pfSourceBuffer[n] * volume; - if (sampleVal > 1.0f) - { - psDestBuffer[n] = short.MaxValue; - clip = true; - } - else if (sampleVal < -1.0f) - { - psDestBuffer[n] = short.MinValue; - clip = true; - } - else - { - psDestBuffer[n] = (short)(sampleVal * 32767); - } - } - } - } - - /// - /// - /// - public override WaveFormat WaveFormat => waveFormat; - - /// - /// Clip indicator. Can be reset. - /// - public bool Clip - { - get - { - return clip; - } - set - { - clip = value; - } - } - - /// - /// Disposes this WaveStream - /// - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (sourceStream != null) - { - sourceStream.Dispose(); - sourceStream = null; - } - } - base.Dispose(disposing); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Wave32To16Stream.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Wave32To16Stream.cs.meta deleted file mode 100644 index 5a19d83..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/Wave32To16Stream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 338f98f2991fb0644b044b91b10930f4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveChannel32.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveChannel32.cs deleted file mode 100644 index b1b85f3..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveChannel32.cs +++ /dev/null @@ -1,269 +0,0 @@ -using System; -using NAudio.Wave.SampleProviders; - -namespace NAudio.Wave -{ - /// - /// Represents Channel for the WaveMixerStream - /// 32 bit output and 16 bit input - /// It's output is always stereo - /// The input stream can be panned - /// - public class WaveChannel32 : WaveStream, ISampleNotifier - { - private WaveStream sourceStream; - private readonly WaveFormat waveFormat; - private readonly long length; - private readonly int destBytesPerSample; - private readonly int sourceBytesPerSample; - private volatile float volume; - private volatile float pan; - private long position; - private readonly ISampleChunkConverter sampleProvider; - private readonly object lockObject = new object(); - - /// - /// Creates a new WaveChannel32 - /// - /// the source stream - /// stream volume (1 is 0dB) - /// pan control (-1 to 1) - public WaveChannel32(WaveStream sourceStream, float volume, float pan) - { - PadWithZeroes = true; - - var providers = new ISampleChunkConverter[] - { - new Mono8SampleChunkConverter(), - new Stereo8SampleChunkConverter(), - new Mono16SampleChunkConverter(), - new Stereo16SampleChunkConverter(), - new Mono24SampleChunkConverter(), - new Stereo24SampleChunkConverter(), - new MonoFloatSampleChunkConverter(), - new StereoFloatSampleChunkConverter(), - }; - foreach (var provider in providers) - { - if (provider.Supports(sourceStream.WaveFormat)) - { - this.sampleProvider = provider; - break; - } - } - - if (this.sampleProvider == null) - { - throw new ArgumentException("Unsupported sourceStream format"); - } - - // always outputs stereo 32 bit - waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(sourceStream.WaveFormat.SampleRate, 2); - destBytesPerSample = 8; // includes stereo factoring - - this.sourceStream = sourceStream; - this.volume = volume; - this.pan = pan; - sourceBytesPerSample = sourceStream.WaveFormat.Channels * sourceStream.WaveFormat.BitsPerSample / 8; - - length = SourceToDest(sourceStream.Length); - position = 0; - } - - private long SourceToDest(long sourceBytes) - { - return (sourceBytes / sourceBytesPerSample) * destBytesPerSample; - } - - private long DestToSource(long destBytes) - { - return (destBytes / destBytesPerSample) * sourceBytesPerSample; - } - - /// - /// Creates a WaveChannel32 with default settings - /// - /// The source stream - public WaveChannel32(WaveStream sourceStream) - : - this(sourceStream, 1.0f, 0.0f) - { - } - - /// - /// Gets the block alignment for this WaveStream - /// - public override int BlockAlign => (int)SourceToDest(sourceStream.BlockAlign); - - /// - /// Returns the stream length - /// - public override long Length => length; - - /// - /// Gets or sets the current position in the stream - /// - public override long Position - { - get - { - return position; - } - set - { - lock (lockObject) - { - // make sure we don't get out of sync - value -= (value % BlockAlign); - if (value < 0) - { - sourceStream.Position = 0; - } - else - { - sourceStream.Position = DestToSource(value); - } - // source stream may not have accepted the reposition we gave it - position = SourceToDest(sourceStream.Position); - } - } - } - - - /// - /// Reads bytes from this wave stream - /// - /// The destination buffer - /// Offset into the destination buffer - /// Number of bytes read - /// Number of bytes read. - public override int Read(byte[] destBuffer, int offset, int numBytes) - { - lock (lockObject) - { - int bytesWritten = 0; - WaveBuffer destWaveBuffer = new WaveBuffer(destBuffer); - - // 1. fill with silence - if (position < 0) - { - bytesWritten = (int) Math.Min(numBytes, 0 - position); - for (int n = 0; n < bytesWritten; n++) - destBuffer[n + offset] = 0; - } - if (bytesWritten < numBytes) - { - sampleProvider.LoadNextChunk(sourceStream, (numBytes - bytesWritten)/8); - float left, right; - - int outIndex = (offset/4) + bytesWritten/4; - while (this.sampleProvider.GetNextSample(out left, out right) && bytesWritten < numBytes) - { - // implement better panning laws. - left = (pan <= 0) ? left : (left*(1 - pan)/2.0f); - right = (pan >= 0) ? right : (right*(pan + 1)/2.0f); - left *= volume; - right *= volume; - destWaveBuffer.FloatBuffer[outIndex++] = left; - destWaveBuffer.FloatBuffer[outIndex++] = right; - bytesWritten += 8; - if (Sample != null) RaiseSample(left, right); - } - } - // 3. Fill out with zeroes - if (PadWithZeroes && bytesWritten < numBytes) - { - Array.Clear(destBuffer, offset + bytesWritten, numBytes - bytesWritten); - bytesWritten = numBytes; - } - position += bytesWritten; - return bytesWritten; - } - } - - /// - /// If true, Read always returns the number of bytes requested - /// - public bool PadWithZeroes { get; set; } - - - /// - /// - /// - public override WaveFormat WaveFormat => waveFormat; - - /// - /// Volume of this channel. 1.0 = full scale - /// - public float Volume - { - get { return volume; } - set { volume = value; } - } - - /// - /// Pan of this channel (from -1 to 1) - /// - public float Pan - { - get { return pan; } - set { pan = value; } - } - - /// - /// Determines whether this channel has any data to play - /// to allow optimisation to not read, but bump position forward - /// - public override bool HasData(int count) - { - // Check whether the source stream has data. - bool sourceHasData = sourceStream.HasData(count); - - if (sourceHasData) - { - if (position + count < 0) - return false; - return (position < length) && (volume != 0); - } - return false; - } - - /// - /// Disposes this WaveStream - /// - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (sourceStream != null) - { - sourceStream.Dispose(); - sourceStream = null; - } - } - else - { - System.Diagnostics.Debug.Assert(false, "WaveChannel32 was not Disposed"); - } - base.Dispose(disposing); - } - - /// - /// Sample - /// - public event EventHandler Sample; - - // reuse the same object every time to avoid making lots of work for the garbage collector - private SampleEventArgs sampleEventArgs = new SampleEventArgs(0,0); - - /// - /// Raise the sample event (no check for null because it has already been done) - /// - private void RaiseSample(float left, float right) - { - sampleEventArgs.Left = left; - sampleEventArgs.Right = right; - Sample(this, sampleEventArgs); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveChannel32.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveChannel32.cs.meta deleted file mode 100644 index 2373535..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveChannel32.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4c96dd4d615ea5e42973cc849ea23e04 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFileReader.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFileReader.cs deleted file mode 100644 index cd2450f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFileReader.cs +++ /dev/null @@ -1,257 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using NAudio.FileFormats.Wav; - -namespace NAudio.Wave -{ - /// This class supports the reading of WAV files, - /// providing a repositionable WaveStream that returns the raw data - /// contained in the WAV file - /// - public class WaveFileReader : WaveStream - { - private readonly WaveFormat waveFormat; - private readonly bool ownInput; - private readonly long dataPosition; - private readonly long dataChunkLength; - private readonly object lockObject = new object(); - private Stream waveStream; - - /// Supports opening a WAV file - /// The WAV file format is a real mess, but we will only - /// support the basic WAV file format which actually covers the vast - /// majority of WAV files out there. For more WAV file format information - /// visit www.wotsit.org. If you have a WAV file that can't be read by - /// this class, email it to the NAudio project and we will probably - /// fix this reader to support it - /// - public WaveFileReader(String waveFile) : - this(File.OpenRead(waveFile), true) - { - } - - /// - /// Creates a Wave File Reader based on an input stream - /// - /// The input stream containing a WAV file including header - public WaveFileReader(Stream inputStream) : - this(inputStream, false) - { - } - - private WaveFileReader(Stream inputStream, bool ownInput) - { - this.waveStream = inputStream; - var chunkReader = new WaveFileChunkReader(); - try - { - chunkReader.ReadWaveHeader(inputStream); - waveFormat = chunkReader.WaveFormat; - dataPosition = chunkReader.DataChunkPosition; - dataChunkLength = chunkReader.DataChunkLength; - ExtraChunks = chunkReader.RiffChunks; - } - catch - { - if (ownInput) - { - inputStream.Dispose(); - } - - throw; - } - - Position = 0; - this.ownInput = ownInput; - } - - /// - /// Gets a list of the additional chunks found in this file - /// - public List ExtraChunks { get; } - - /// - /// Gets the data for the specified chunk - /// - public byte[] GetChunkData(RiffChunk chunk) - { - long oldPosition = waveStream.Position; - waveStream.Position = chunk.StreamPosition; - byte[] data = new byte[chunk.Length]; - waveStream.Read(data, 0, data.Length); - waveStream.Position = oldPosition; - return data; - } - - /// - /// Cleans up the resources associated with this WaveFileReader - /// - protected override void Dispose(bool disposing) - { - if (disposing) - { - // Release managed resources. - if (waveStream != null) - { - // only dispose our source if we created it - if (ownInput) - { - waveStream.Dispose(); - } - waveStream = null; - } - } - else - { - System.Diagnostics.Debug.Assert(false, "WaveFileReader was not disposed"); - } - // Release unmanaged resources. - // Set large fields to null. - // Call Dispose on your base class. - base.Dispose(disposing); - } - - /// - /// - /// - public override WaveFormat WaveFormat => waveFormat; - - /// - /// This is the length of audio data contained in this WAV file, in bytes - /// (i.e. the byte length of the data chunk, not the length of the WAV file itself) - /// - /// - public override long Length => dataChunkLength; - - /// - /// Number of Sample Frames (if possible to calculate) - /// This currently does not take into account number of channels - /// Multiply number of channels if you want the total number of samples - /// - public long SampleCount - { - get - { - if (waveFormat.Encoding == WaveFormatEncoding.Pcm || - waveFormat.Encoding == WaveFormatEncoding.Extensible || - waveFormat.Encoding == WaveFormatEncoding.IeeeFloat) - { - return dataChunkLength / BlockAlign; - } - // n.b. if there is a fact chunk, you can use that to get the number of samples - throw new InvalidOperationException("Sample count is calculated only for the standard encodings"); - } - } - - /// - /// Position in the WAV data chunk. - /// - /// - public override long Position - { - get - { - return waveStream.Position - dataPosition; - } - set - { - lock (lockObject) - { - value = Math.Min(value, Length); - // make sure we don't get out of sync - value -= (value % waveFormat.BlockAlign); - waveStream.Position = value + dataPosition; - } - } - } - - /// - /// Reads bytes from the Wave File - /// - /// - public override int Read(byte[] array, int offset, int count) - { - if (count % waveFormat.BlockAlign != 0) - { - throw new ArgumentException( - $"Must read complete blocks: requested {count}, block align is {WaveFormat.BlockAlign}"); - } - lock (lockObject) - { - // sometimes there is more junk at the end of the file past the data chunk - if (Position + count > dataChunkLength) - { - count = (int) (dataChunkLength - Position); - } - return waveStream.Read(array, offset, count); - } - } - - /// - /// Attempts to read the next sample or group of samples as floating point normalised into the range -1.0f to 1.0f - /// - /// An array of samples, 1 for mono, 2 for stereo etc. Null indicates end of file reached - /// - public float[] ReadNextSampleFrame() - { - switch (waveFormat.Encoding) - { - case WaveFormatEncoding.Pcm: - case WaveFormatEncoding.IeeeFloat: - case WaveFormatEncoding.Extensible: // n.b. not necessarily PCM, should probably write more code to handle this case - break; - default: - throw new InvalidOperationException("Only 16, 24 or 32 bit PCM or IEEE float audio data supported"); - } - var sampleFrame = new float[waveFormat.Channels]; - int bytesToRead = waveFormat.Channels*(waveFormat.BitsPerSample/8); - byte[] raw = new byte[bytesToRead]; - int bytesRead = Read(raw, 0, bytesToRead); - if (bytesRead == 0) return null; // end of file - if (bytesRead < bytesToRead) throw new InvalidDataException("Unexpected end of file"); - int offset = 0; - for (int channel = 0; channel < waveFormat.Channels; channel++) - { - if (waveFormat.BitsPerSample == 16) - { - sampleFrame[channel] = BitConverter.ToInt16(raw, offset)/32768f; - offset += 2; - } - else if (waveFormat.BitsPerSample == 24) - { - sampleFrame[channel] = (((sbyte)raw[offset + 2] << 16) | (raw[offset + 1] << 8) | raw[offset]) / 8388608f; - offset += 3; - } - else if (waveFormat.BitsPerSample == 32 && waveFormat.Encoding == WaveFormatEncoding.IeeeFloat) - { - sampleFrame[channel] = BitConverter.ToSingle(raw, offset); - offset += 4; - } - else if (waveFormat.BitsPerSample == 32) - { - sampleFrame[channel] = BitConverter.ToInt32(raw, offset) / (Int32.MaxValue + 1f); - offset += 4; - } - else - { - throw new InvalidOperationException("Unsupported bit depth"); - } - } - return sampleFrame; - } - - /// - /// Attempts to read a sample into a float. n.b. only applicable for uncompressed formats - /// Will normalise the value read into the range -1.0f to 1.0f if it comes from a PCM encoding - /// - /// False if the end of the WAV data chunk was reached - [Obsolete("Use ReadNextSampleFrame instead (this version does not support stereo properly)")] - public bool TryReadFloat(out float sampleValue) - { - var sf = ReadNextSampleFrame(); - sampleValue = sf != null ? sf[0] : 0; - return sf != null; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFileReader.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFileReader.cs.meta deleted file mode 100644 index e522b64..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFileReader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eecc06f5f5c570546b0f70d32be04eac -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionProvider.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionProvider.cs deleted file mode 100644 index 54db4b9..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionProvider.cs +++ /dev/null @@ -1,173 +0,0 @@ -using System; -using System.Diagnostics; -using NAudio.Wave.Compression; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// IWaveProvider that passes through an ACM Codec - /// - public class WaveFormatConversionProvider : IWaveProvider, IDisposable - { - private readonly AcmStream conversionStream; - private readonly IWaveProvider sourceProvider; - private readonly int preferredSourceReadSize; - private int leftoverDestBytes; - private int leftoverDestOffset; - private int leftoverSourceBytes; - private bool isDisposed; - - /// - /// Create a new WaveFormat conversion stream - /// - /// Desired output format - /// Source Provider - public WaveFormatConversionProvider(WaveFormat targetFormat, IWaveProvider sourceProvider) - { - this.sourceProvider = sourceProvider; - WaveFormat = targetFormat; - - conversionStream = new AcmStream(sourceProvider.WaveFormat, targetFormat); - - preferredSourceReadSize = Math.Min(sourceProvider.WaveFormat.AverageBytesPerSecond, conversionStream.SourceBuffer.Length); - preferredSourceReadSize -= (preferredSourceReadSize% sourceProvider.WaveFormat.BlockAlign); - } - - /// - /// Gets the WaveFormat of this stream - /// - public WaveFormat WaveFormat { get; } - - /// - /// Indicates that a reposition has taken place, and internal buffers should be reset - /// - public void Reposition() - { - leftoverDestBytes = 0; - leftoverDestOffset = 0; - leftoverSourceBytes = 0; - conversionStream.Reposition(); - } - - /// - /// Reads bytes from this stream - /// - /// Buffer to read into - /// Offset in buffer to read into - /// Number of bytes to read - /// Number of bytes read - public int Read(byte[] buffer, int offset, int count) - { - int bytesRead = 0; - if (count % WaveFormat.BlockAlign != 0) - { - //throw new ArgumentException("Must read complete blocks"); - count -= (count % WaveFormat.BlockAlign); - } - - while (bytesRead < count) - { - // first copy in any leftover destination bytes - int readFromLeftoverDest = Math.Min(count - bytesRead, leftoverDestBytes); - if (readFromLeftoverDest > 0) - { - Array.Copy(conversionStream.DestBuffer, leftoverDestOffset, buffer, offset+bytesRead, readFromLeftoverDest); - leftoverDestOffset += readFromLeftoverDest; - leftoverDestBytes -= readFromLeftoverDest; - bytesRead += readFromLeftoverDest; - } - if (bytesRead >= count) - { - // we've fulfilled the request from the leftovers alone - break; - } - - // now we'll convert one full source buffer - var sourceReadSize = Math.Min(preferredSourceReadSize, - conversionStream.SourceBuffer.Length - leftoverSourceBytes); - - // always read our preferred size, we can always keep leftovers for the next call to Read if we get - // too much - int sourceBytesRead = sourceProvider.Read(conversionStream.SourceBuffer, leftoverSourceBytes, sourceReadSize); - int sourceBytesAvailable = sourceBytesRead + leftoverSourceBytes; - if (sourceBytesAvailable == 0) - { - // we've reached the end of the input - break; - } - - int sourceBytesConverted; - int destBytesConverted = conversionStream.Convert(sourceBytesAvailable, out sourceBytesConverted); - if (sourceBytesConverted == 0) - { - Debug.WriteLine($"Warning: couldn't convert anything from {sourceBytesAvailable}"); - // no point backing up in this case as we're not going to manage to finish playing this - break; - } - leftoverSourceBytes = sourceBytesAvailable - sourceBytesConverted; - - if (leftoverSourceBytes > 0) - { - // buffer.blockcopy is safe for overlapping copies - Buffer.BlockCopy(conversionStream.SourceBuffer, sourceBytesConverted, conversionStream.SourceBuffer, - 0, leftoverSourceBytes); - } - - if (destBytesConverted > 0) - { - int bytesRequired = count - bytesRead; - int toCopy = Math.Min(destBytesConverted, bytesRequired); - - // save leftovers - if (toCopy < destBytesConverted) - { - leftoverDestBytes = destBytesConverted - toCopy; - leftoverDestOffset = toCopy; - } - Array.Copy(conversionStream.DestBuffer, 0, buffer, bytesRead + offset, toCopy); - bytesRead += toCopy; - } - else - { - // possible error here - Debug.WriteLine( - $"sourceBytesRead: {sourceBytesRead}, sourceBytesConverted {sourceBytesConverted}, destBytesConverted {destBytesConverted}"); - //Debug.Assert(false, "conversion stream returned nothing at all"); - break; - } - } - return bytesRead; - } - - /// - /// Disposes this stream - /// - /// true if the user called this - protected virtual void Dispose(bool disposing) - { - if (!isDisposed) - { - isDisposed = true; - conversionStream?.Dispose(); - } - } - - /// - /// Disposes this resource - /// - public void Dispose() - { - GC.SuppressFinalize(this); - Dispose(true); - } - - /// - /// Finalizer - /// - ~WaveFormatConversionProvider() - { - Dispose(false); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionProvider.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionProvider.cs.meta deleted file mode 100644 index 579c09a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6981c65a15643ee429dab36b14579b4a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionStream.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionStream.cs deleted file mode 100644 index 3887e7e..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionStream.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using System.Diagnostics; -using NAudio.Wave.Compression; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// WaveStream that passes through an ACM Codec - /// - public class WaveFormatConversionStream : WaveStream - { - private readonly WaveFormatConversionProvider conversionProvider; - private readonly WaveFormat targetFormat; - private readonly long length; - private long position; - private readonly WaveStream sourceStream; - private bool isDisposed; - - /// - /// Create a new WaveFormat conversion stream - /// - /// Desired output format - /// Source stream - public WaveFormatConversionStream(WaveFormat targetFormat, WaveStream sourceStream) - { - this.sourceStream = sourceStream; - this.targetFormat = targetFormat; - conversionProvider = new WaveFormatConversionProvider(targetFormat, sourceStream); - length = EstimateSourceToDest((int)sourceStream.Length); - position = 0; - } - - /// - /// Creates a stream that can convert to PCM - /// - /// The source stream - /// A PCM stream - public static WaveStream CreatePcmStream(WaveStream sourceStream) - { - if (sourceStream.WaveFormat.Encoding == WaveFormatEncoding.Pcm) - { - return sourceStream; - } - var pcmFormat = AcmStream.SuggestPcmFormat(sourceStream.WaveFormat); - if (pcmFormat.SampleRate < 8000) - { - if (sourceStream.WaveFormat.Encoding == WaveFormatEncoding.G723) - { - pcmFormat = new WaveFormat(8000, 16, 1); - } - else - { - throw new InvalidOperationException("Invalid suggested output format, please explicitly provide a target format"); - } - } - return new WaveFormatConversionStream(pcmFormat, sourceStream); - } - - /// - /// Gets or sets the current position in the stream - /// - public override long Position - { - get - { - return position; - } - set - { - // make sure we don't get out of sync - value -= (value % BlockAlign); - - // this relies on conversionStream DestToSource and SourceToDest being reliable - var desiredSourcePosition = EstimateDestToSource(value); //conversionStream.DestToSource((int) value); - sourceStream.Position = desiredSourcePosition; - position = EstimateSourceToDest(sourceStream.Position); //conversionStream.SourceToDest((int)sourceStream.Position); - conversionProvider.Reposition(); - } - } - - /// - /// Converts source bytes to destination bytes - /// - [Obsolete("can be unreliable, use of this method not encouraged")] - public int SourceToDest(int source) - { - return (int)EstimateSourceToDest(source); - //return conversionStream.SourceToDest(source); - } - - private long EstimateSourceToDest(long source) - { - var dest = ((source * targetFormat.AverageBytesPerSecond) / sourceStream.WaveFormat.AverageBytesPerSecond); - dest -= (dest % targetFormat.BlockAlign); - return dest; - } - - private long EstimateDestToSource(long dest) - { - var source = ((dest * sourceStream.WaveFormat.AverageBytesPerSecond) / targetFormat.AverageBytesPerSecond); - source -= (source % sourceStream.WaveFormat.BlockAlign); - return (int)source; - } - /// - /// Converts destination bytes to source bytes - /// - [Obsolete("can be unreliable, use of this method not encouraged")] - public int DestToSource(int dest) - { - return (int)EstimateDestToSource(dest); - //return conversionStream.DestToSource(dest); - } - - /// - /// Returns the stream length - /// - public override long Length - { - get - { - return length; - } - } - - /// - /// Gets the WaveFormat of this stream - /// - public override WaveFormat WaveFormat - { - get - { - return targetFormat; - } - } - - /// - /// - /// - /// Buffer to read into - /// Offset within buffer to write to - /// Number of bytes to read - /// Bytes read - public override int Read(byte[] buffer, int offset, int count) - { - var bytesRead = conversionProvider.Read(buffer, offset, count); - position += bytesRead; - return bytesRead; - } - - /// - /// Disposes this stream - /// - /// true if the user called this - protected override void Dispose(bool disposing) - { - if (!isDisposed) - { - isDisposed = true; - if (disposing) - { - sourceStream.Dispose(); - conversionProvider.Dispose(); - } - else - { - // we've been called by the finalizer - Debug.Assert(false, "WaveFormatConversionStream was not disposed"); - } - } - // Release unmanaged resources. - // Set large fields to null. - // Call Dispose on your base class. - base.Dispose(disposing); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionStream.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionStream.cs.meta deleted file mode 100644 index da6505c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveFormatConversionStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 443845a608b77ab4aa1c6d9375394203 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveInBuffer.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveInBuffer.cs deleted file mode 100644 index 4c5df80..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveInBuffer.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// A buffer of Wave samples - /// - class WaveInBuffer : IDisposable - { - private readonly WaveHeader header; - private readonly Int32 bufferSize; // allocated bytes, may not be the same as bytes read - private readonly byte[] buffer; - private GCHandle hBuffer; - private IntPtr waveInHandle; - private GCHandle hHeader; // we need to pin the header structure - private GCHandle hThis; // for the user callback - - /// - /// creates a new wavebuffer - /// - /// WaveIn device to write to - /// Buffer size in bytes - public WaveInBuffer(IntPtr waveInHandle, Int32 bufferSize) - { - this.bufferSize = bufferSize; - this.buffer = new byte[bufferSize]; - this.hBuffer = GCHandle.Alloc(buffer, GCHandleType.Pinned); - this.waveInHandle = waveInHandle; - - header = new WaveHeader(); - hHeader = GCHandle.Alloc(header, GCHandleType.Pinned); - header.dataBuffer = hBuffer.AddrOfPinnedObject(); - header.bufferLength = bufferSize; - header.loops = 1; - hThis = GCHandle.Alloc(this); - header.userData = (IntPtr)hThis; - - MmException.Try(WaveInterop.waveInPrepareHeader(waveInHandle, header, Marshal.SizeOf(header)), "waveInPrepareHeader"); - //MmException.Try(WaveInterop.waveInAddBuffer(waveInHandle, header, Marshal.SizeOf(header)), "waveInAddBuffer"); - } - - /// - /// Place this buffer back to record more audio - /// - public void Reuse() - { - // TEST: we might not actually need to bother unpreparing and repreparing - MmException.Try(WaveInterop.waveInUnprepareHeader(waveInHandle, header, Marshal.SizeOf(header)), "waveUnprepareHeader"); - MmException.Try(WaveInterop.waveInPrepareHeader(waveInHandle, header, Marshal.SizeOf(header)), "waveInPrepareHeader"); - //System.Diagnostics.Debug.Assert(header.bytesRecorded == 0, "bytes recorded was not reset properly"); - MmException.Try(WaveInterop.waveInAddBuffer(waveInHandle, header, Marshal.SizeOf(header)), "waveInAddBuffer"); - } - - #region Dispose Pattern - - /// - /// Finalizer for this wave buffer - /// - ~WaveInBuffer() - { - Dispose(false); - System.Diagnostics.Debug.Assert(true, "WaveInBuffer was not disposed"); - } - - /// - /// Releases resources held by this WaveBuffer - /// - public void Dispose() - { - GC.SuppressFinalize(this); - Dispose(true); - } - - /// - /// Releases resources held by this WaveBuffer - /// - protected void Dispose(bool disposing) - { - if (disposing) - { - // free managed resources - } - // free unmanaged resources - if (waveInHandle != IntPtr.Zero) - { - WaveInterop.waveInUnprepareHeader(waveInHandle, header, Marshal.SizeOf(header)); - waveInHandle = IntPtr.Zero; - } - if (hHeader.IsAllocated) - hHeader.Free(); - if (hBuffer.IsAllocated) - hBuffer.Free(); - if (hThis.IsAllocated) - hThis.Free(); - - } - - #endregion - - /// - /// Provides access to the actual record buffer (for reading only) - /// - public byte[] Data - { - get - { - return buffer; - } - } - - /// - /// Indicates whether the Done flag is set on this buffer - /// - public bool Done - { - get - { - return (header.flags & WaveHeaderFlags.Done) == WaveHeaderFlags.Done; - } - } - - - /// - /// Indicates whether the InQueue flag is set on this buffer - /// - public bool InQueue - { - get - { - return (header.flags & WaveHeaderFlags.InQueue) == WaveHeaderFlags.InQueue; - } - } - - /// - /// Number of bytes recorded - /// - public int BytesRecorded - { - get - { - return header.bytesRecorded; - } - } - - /// - /// The buffer size in bytes - /// - public Int32 BufferSize - { - get - { - return bufferSize; - } - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveInBuffer.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveInBuffer.cs.meta deleted file mode 100644 index 53f109a..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveInBuffer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 79ee658838b2b734eaeb593d8d4bff59 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveMixerStream32.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveMixerStream32.cs deleted file mode 100644 index 43658cb..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveMixerStream32.cs +++ /dev/null @@ -1,248 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NAudio.Wave -{ - /// - /// WaveStream that can mix together multiple 32 bit input streams - /// (Normally used with stereo input channels) - /// All channels must have the same number of inputs - /// - public class WaveMixerStream32 : WaveStream - { - private readonly List inputStreams; - private readonly object inputsLock; - private WaveFormat waveFormat; - private long length; - private long position; - private readonly int bytesPerSample; - - /// - /// Creates a new 32 bit WaveMixerStream - /// - public WaveMixerStream32() - { - AutoStop = true; - waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(44100, 2); - bytesPerSample = 4; - inputStreams = new List(); - inputsLock = new object(); - } - - /// - /// Creates a new 32 bit WaveMixerStream - /// - /// An Array of WaveStreams - must all have the same format. - /// Use WaveChannel is designed for this purpose. - /// Automatically stop when all inputs have been read - /// Thrown if the input streams are not 32 bit floating point, - /// or if they have different formats to each other - public WaveMixerStream32(IEnumerable inputStreams, bool autoStop) - : this() - { - AutoStop = autoStop; - - foreach (var inputStream in inputStreams) - { - AddInputStream(inputStream); - } - } - - /// - /// Add a new input to the mixer - /// - /// The wave input to add - public void AddInputStream(WaveStream waveStream) - { - if (waveStream.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) - throw new ArgumentException("Must be IEEE floating point", "waveStream"); - if (waveStream.WaveFormat.BitsPerSample != 32) - throw new ArgumentException("Only 32 bit audio currently supported", "waveStream"); - - if (inputStreams.Count == 0) - { - // first one - set the format - int sampleRate = waveStream.WaveFormat.SampleRate; - int channels = waveStream.WaveFormat.Channels; - waveFormat = WaveFormat.CreateIeeeFloatWaveFormat(sampleRate, channels); - } - else - { - if (!waveStream.WaveFormat.Equals(waveFormat)) - throw new ArgumentException("All incoming channels must have the same format", "waveStream"); - } - - lock (inputsLock) - { - inputStreams.Add(waveStream); - length = Math.Max(length, waveStream.Length); - // get to the right point in this input file - waveStream.Position = Position; - } - } - - /// - /// Remove a WaveStream from the mixer - /// - /// waveStream to remove - public void RemoveInputStream(WaveStream waveStream) - { - lock (inputsLock) - { - if (inputStreams.Remove(waveStream)) - { - // recalculate the length - long newLength = 0; - foreach (var inputStream in inputStreams) - { - newLength = Math.Max(newLength, inputStream.Length); - } - length = newLength; - } - } - } - - /// - /// The number of inputs to this mixer - /// - public int InputCount => inputStreams.Count; - - /// - /// Automatically stop when all inputs have been read - /// - public bool AutoStop { get; set; } - - /// - /// Reads bytes from this wave stream - /// - /// buffer to read into - /// offset into buffer - /// number of bytes required - /// Number of bytes read. - /// Thrown if an invalid number of bytes requested - public override int Read(byte[] buffer, int offset, int count) - { - if (AutoStop) - { - if (position + count > length) - count = (int)(length - position); - - // was a bug here, should be fixed now - System.Diagnostics.Debug.Assert(count >= 0, "length and position mismatch"); - } - - - if (count % bytesPerSample != 0) - throw new ArgumentException("Must read an whole number of samples", "count"); - - // blank the buffer - Array.Clear(buffer, offset, count); - int bytesRead = 0; - - // sum the channels in - var readBuffer = new byte[count]; - lock (inputsLock) - { - foreach (var inputStream in inputStreams) - { - if (inputStream.HasData(count)) - { - int readFromThisStream = inputStream.Read(readBuffer, 0, count); - // don't worry if input stream returns less than we requested - may indicate we have got to the end - bytesRead = Math.Max(bytesRead, readFromThisStream); - if (readFromThisStream > 0) - Sum32BitAudio(buffer, offset, readBuffer, readFromThisStream); - } - else - { - bytesRead = Math.Max(bytesRead, count); - inputStream.Position += count; - } - } - } - position += count; - return count; - } - - /// - /// Actually performs the mixing - /// - static unsafe void Sum32BitAudio(byte[] destBuffer, int offset, byte[] sourceBuffer, int bytesRead) - { - fixed (byte* pDestBuffer = &destBuffer[offset], - pSourceBuffer = &sourceBuffer[0]) - { - float* pfDestBuffer = (float*)pDestBuffer; - float* pfReadBuffer = (float*)pSourceBuffer; - int samplesRead = bytesRead / 4; - for (int n = 0; n < samplesRead; n++) - { - pfDestBuffer[n] += pfReadBuffer[n]; - } - } - } - - /// - /// - /// - public override int BlockAlign => waveFormat.BlockAlign; - - /// - /// Length of this Wave Stream (in bytes) - /// - /// - public override long Length => length; - - /// - /// Position within this Wave Stream (in bytes) - /// - /// - public override long Position - { - get - { - // all streams are at the same position - return position; - } - set - { - lock (inputsLock) - { - value = Math.Min(value, Length); - foreach (WaveStream inputStream in inputStreams) - { - inputStream.Position = Math.Min(value, inputStream.Length); - } - position = value; - } - } - } - - /// - /// - /// - public override WaveFormat WaveFormat => waveFormat; - - /// - /// Disposes this WaveStream - /// - protected override void Dispose(bool disposing) - { - if (disposing) - { - lock (inputsLock) - { - foreach (WaveStream inputStream in inputStreams) - { - inputStream.Dispose(); - } - } - } - else - { - System.Diagnostics.Debug.Assert(false, "WaveMixerStream32 was not disposed"); - } - base.Dispose(disposing); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveMixerStream32.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveMixerStream32.cs.meta deleted file mode 100644 index 8ee68d5..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveMixerStream32.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bea300e6365af524c8a611496d3fe1bb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOffsetStream.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOffsetStream.cs deleted file mode 100644 index 56fb34f..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOffsetStream.cs +++ /dev/null @@ -1,234 +0,0 @@ -using System; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Simply shifts the input stream in time, optionally - /// clipping its start and end. - /// (n.b. may include looping in the future) - /// - public class WaveOffsetStream : WaveStream - { - private WaveStream sourceStream; - private long audioStartPosition; - private long sourceOffsetBytes; - private long sourceLengthBytes; - private long length; - private readonly int bytesPerSample; // includes all channels - private long position; - private TimeSpan startTime; - private TimeSpan sourceOffset; - private TimeSpan sourceLength; - private readonly object lockObject = new object(); - - /// - /// Creates a new WaveOffsetStream - /// - /// the source stream - /// the time at which we should start reading from the source stream - /// amount to trim off the front of the source stream - /// length of time to play from source stream - public WaveOffsetStream(WaveStream sourceStream, TimeSpan startTime, TimeSpan sourceOffset, TimeSpan sourceLength) - { - if (sourceStream.WaveFormat.Encoding != WaveFormatEncoding.Pcm) - throw new ArgumentException("Only PCM supported"); - // TODO: add support for IEEE float + perhaps some others - - // anything with a fixed bytes per sample - - this.sourceStream = sourceStream; - position = 0; - bytesPerSample = (sourceStream.WaveFormat.BitsPerSample / 8) * sourceStream.WaveFormat.Channels; - StartTime = startTime; - SourceOffset = sourceOffset; - SourceLength = sourceLength; - - } - - /// - /// Creates a WaveOffsetStream with default settings (no offset or pre-delay, - /// and whole length of source stream) - /// - /// The source stream - public WaveOffsetStream(WaveStream sourceStream) - : this(sourceStream, TimeSpan.Zero, TimeSpan.Zero, sourceStream.TotalTime) - { - } - - /// - /// The length of time before which no audio will be played - /// - public TimeSpan StartTime - { - get - { - return startTime; - } - set - { - lock (lockObject) - { - startTime = value; - audioStartPosition = (long)(startTime.TotalSeconds * sourceStream.WaveFormat.SampleRate) * bytesPerSample; - // fix up our length and position - length = audioStartPosition + sourceLengthBytes; - Position = Position; - } - } - } - - /// - /// An offset into the source stream from which to start playing - /// - public TimeSpan SourceOffset - { - get - { - return sourceOffset; - } - set - { - lock (lockObject) - { - sourceOffset = value; - sourceOffsetBytes = (long)(sourceOffset.TotalSeconds * sourceStream.WaveFormat.SampleRate) * bytesPerSample; - // fix up our position - Position = Position; - } - } - } - - /// - /// Length of time to read from the source stream - /// - public TimeSpan SourceLength - { - get - { - return sourceLength; - } - set - { - lock (lockObject) - { - sourceLength = value; - sourceLengthBytes = (long)(sourceLength.TotalSeconds * sourceStream.WaveFormat.SampleRate) * bytesPerSample; - // fix up our length and position - length = audioStartPosition + sourceLengthBytes; - Position = Position; - } - } - - } - - /// - /// Gets the block alignment for this WaveStream - /// - public override int BlockAlign => sourceStream.BlockAlign; - - /// - /// Returns the stream length - /// - public override long Length => length; - - /// - /// Gets or sets the current position in the stream - /// - public override long Position - { - get - { - return position; - } - set - { - lock (lockObject) - { - // make sure we don't get out of sync - value -= (value % BlockAlign); - if (value < audioStartPosition) - sourceStream.Position = sourceOffsetBytes; - else - sourceStream.Position = sourceOffsetBytes + (value - audioStartPosition); - position = value; - } - } - } - - /// - /// Reads bytes from this wave stream - /// - /// The destination buffer - /// Offset into the destination buffer - /// Number of bytes read - /// Number of bytes read. - public override int Read(byte[] destBuffer, int offset, int numBytes) - { - lock (lockObject) - { - int bytesWritten = 0; - // 1. fill with silence - if (position < audioStartPosition) - { - bytesWritten = (int)Math.Min(numBytes, audioStartPosition - position); - for (int n = 0; n < bytesWritten; n++) - destBuffer[n + offset] = 0; - } - if (bytesWritten < numBytes) - { - // don't read too far into source stream - int sourceBytesRequired = (int)Math.Min( - numBytes - bytesWritten, - sourceLengthBytes + sourceOffsetBytes - sourceStream.Position); - int read = sourceStream.Read(destBuffer, bytesWritten + offset, sourceBytesRequired); - bytesWritten += read; - } - // 3. Fill out with zeroes - for (int n = bytesWritten; n < numBytes; n++) - destBuffer[offset + n] = 0; - position += numBytes; - return numBytes; - } - } - - /// - /// - /// - public override WaveFormat WaveFormat => sourceStream.WaveFormat; - - /// - /// Determines whether this channel has any data to play - /// to allow optimisation to not read, but bump position forward - /// - public override bool HasData(int count) - { - if (position + count < audioStartPosition) - return false; - if (position >= length) - return false; - // Check whether the source stream has data. - // source stream should be in the right poisition - return sourceStream.HasData(count); - } - - /// - /// Disposes this WaveStream - /// - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (sourceStream != null) - { - sourceStream.Dispose(); - sourceStream = null; - } - } - else - { - System.Diagnostics.Debug.Assert(false, "WaveOffsetStream was not Disposed"); - } - base.Dispose(disposing); - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOffsetStream.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOffsetStream.cs.meta deleted file mode 100644 index bf57413..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOffsetStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 419de4cc1d3d82244bb3d1f22d154ccc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOutBuffer.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOutBuffer.cs deleted file mode 100644 index 7d22554..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOutBuffer.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace NAudio.Wave -{ - /// - /// A buffer of Wave samples for streaming to a Wave Output device - /// - class WaveOutBuffer : IDisposable - { - private readonly WaveHeader header; - private readonly Int32 bufferSize; // allocated bytes, may not be the same as bytes read - private readonly byte[] buffer; - private readonly IWaveProvider waveStream; - private readonly object waveOutLock; - private GCHandle hBuffer; - private IntPtr hWaveOut; - private GCHandle hHeader; // we need to pin the header structure - private GCHandle hThis; // for the user callback - - /// - /// creates a new wavebuffer - /// - /// WaveOut device to write to - /// Buffer size in bytes - /// Stream to provide more data - /// Lock to protect WaveOut API's from being called on >1 thread - public WaveOutBuffer(IntPtr hWaveOut, Int32 bufferSize, IWaveProvider bufferFillStream, object waveOutLock) - { - this.bufferSize = bufferSize; - buffer = new byte[bufferSize]; - hBuffer = GCHandle.Alloc(buffer, GCHandleType.Pinned); - this.hWaveOut = hWaveOut; - waveStream = bufferFillStream; - this.waveOutLock = waveOutLock; - - header = new WaveHeader(); - hHeader = GCHandle.Alloc(header, GCHandleType.Pinned); - header.dataBuffer = hBuffer.AddrOfPinnedObject(); - header.bufferLength = bufferSize; - header.loops = 1; - hThis = GCHandle.Alloc(this); - header.userData = (IntPtr)hThis; - lock (waveOutLock) - { - MmException.Try(WaveInterop.waveOutPrepareHeader(hWaveOut, header, Marshal.SizeOf(header)), "waveOutPrepareHeader"); - } - } - - #region Dispose Pattern - - /// - /// Finalizer for this wave buffer - /// - ~WaveOutBuffer() - { - Dispose(false); - System.Diagnostics.Debug.Assert(true, "WaveBuffer was not disposed"); - } - - /// - /// Releases resources held by this WaveBuffer - /// - public void Dispose() - { - GC.SuppressFinalize(this); - Dispose(true); - } - - /// - /// Releases resources held by this WaveBuffer - /// - protected void Dispose(bool disposing) - { - if (disposing) - { - // free managed resources - } - // free unmanaged resources - if (hHeader.IsAllocated) - hHeader.Free(); - if (hBuffer.IsAllocated) - hBuffer.Free(); - if (hThis.IsAllocated) - hThis.Free(); - if (hWaveOut != IntPtr.Zero) - { - lock (waveOutLock) - { - WaveInterop.waveOutUnprepareHeader(hWaveOut, header, Marshal.SizeOf(header)); - } - hWaveOut = IntPtr.Zero; - } - } - - #endregion - - /// this is called by the WAVE callback and should be used to refill the buffer - internal bool OnDone() - { - int bytes; - lock (waveStream) - { - bytes = waveStream.Read(buffer, 0, buffer.Length); - } - if (bytes == 0) - { - return false; - } - for (int n = bytes; n < buffer.Length; n++) - { - buffer[n] = 0; - } - WriteToWaveOut(); - return true; - } - - /// - /// Whether the header's in queue flag is set - /// - public bool InQueue - { - get - { - return (header.flags & WaveHeaderFlags.InQueue) == WaveHeaderFlags.InQueue; - } - } - - /// - /// The buffer size in bytes - /// - public int BufferSize => bufferSize; - - private void WriteToWaveOut() - { - MmResult result; - - lock (waveOutLock) - { - result = WaveInterop.waveOutWrite(hWaveOut, header, Marshal.SizeOf(header)); - } - if (result != MmResult.NoError) - { - throw new MmException(result, "waveOutWrite"); - } - - GC.KeepAlive(this); - } - - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOutBuffer.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOutBuffer.cs.meta deleted file mode 100644 index 29d1ca5..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveOutBuffer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9e8d511413f8cca49ba4bfc6757cdfb8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveStream.cs b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveStream.cs deleted file mode 100644 index 42a60cc..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveStream.cs +++ /dev/null @@ -1,133 +0,0 @@ -// created on 27/12/2002 at 20:20 -using System; -using System.IO; - -// ReSharper disable once CheckNamespace -namespace NAudio.Wave -{ - /// - /// Base class for all WaveStream classes. Derives from stream. - /// - public abstract class WaveStream : Stream, IWaveProvider - { - /// - /// Retrieves the WaveFormat for this stream - /// - public abstract WaveFormat WaveFormat { get; } - - // base class includes long Position get; set - // base class includes long Length get - // base class includes Read - // base class includes Dispose - - /// - /// We can read from this stream - /// - public override bool CanRead => true; - - /// - /// We can seek within this stream - /// - public override bool CanSeek => true; - - /// - /// We can't write to this stream - /// - public override bool CanWrite => false; - - /// - /// Flush does not need to do anything - /// See - /// - public override void Flush() { } - - /// - /// An alternative way of repositioning. - /// See - /// - public override long Seek(long offset, SeekOrigin origin) - { - if (origin == SeekOrigin.Begin) - Position = offset; - else if (origin == SeekOrigin.Current) - Position += offset; - else - Position = Length + offset; - return Position; - } - - /// - /// Sets the length of the WaveStream. Not Supported. - /// - /// - public override void SetLength(long length) - { - throw new NotSupportedException("Can't set length of a WaveFormatString"); - } - - /// - /// Writes to the WaveStream. Not Supported. - /// - public override void Write(byte[] buffer, int offset, int count) - { - throw new NotSupportedException("Can't write to a WaveFormatString"); - } - - /// - /// The block alignment for this wavestream. Do not modify the Position - /// to anything that is not a whole multiple of this value - /// - public virtual int BlockAlign => WaveFormat.BlockAlign; - - /// - /// Moves forward or backwards the specified number of seconds in the stream - /// - /// Number of seconds to move, can be negative - public void Skip(int seconds) - { - long newPosition = Position + WaveFormat.AverageBytesPerSecond*seconds; - if (newPosition > Length) - Position = Length; - else if (newPosition < 0) - Position = 0; - else - Position = newPosition; - } - - /// - /// The current position in the stream in Time format - /// - public virtual TimeSpan CurrentTime - { - get - { - return TimeSpan.FromSeconds((double)Position / WaveFormat.AverageBytesPerSecond); - } - set - { - Position = (long) (value.TotalSeconds * WaveFormat.AverageBytesPerSecond); - } - } - - /// - /// Total length in real-time of the stream (may be an estimate for compressed files) - /// - public virtual TimeSpan TotalTime - { - get - { - return TimeSpan.FromSeconds((double) Length / WaveFormat.AverageBytesPerSecond); - } - } - - /// - /// Whether the WaveStream has non-zero sample data at the current position for the - /// specified count - /// - /// Number of bytes to read - public virtual bool HasData(int count) - { - return Position < Length; - } - } -} diff --git a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveStream.cs.meta b/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveStream.cs.meta deleted file mode 100644 index ca99c6c..0000000 --- a/Assets/Scripts/Audio/NAudio/Wave/WaveStreams/WaveStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 82dc82b3a4e706c4b9bc72c3958807c7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/obj.meta b/Assets/Scripts/Audio/NAudio/obj.meta deleted file mode 100644 index b595092..0000000 --- a/Assets/Scripts/Audio/NAudio/obj.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d126dfd1630a99848833c32511003d20 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/obj/Debug.meta b/Assets/Scripts/Audio/NAudio/obj/Debug.meta deleted file mode 100644 index 9f93ff9..0000000 --- a/Assets/Scripts/Audio/NAudio/obj/Debug.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 70aaffe1de7dcce4fb789d50d49b1018 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Assets/Scripts/Audio/NAudio/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache deleted file mode 100644 index 8cb6304a9270e65f56ed3c53a1434d4aaab2d0dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6759 zcmeHMZBrXJ5VmQwYV1uMOCDVqIPE^Q)Qa;_9pq z_~jxVUFbhO%M#$HHs{RDam7kTD$ev!)iqSDGpb6vYt-!Op~|_AfvS>ah!A=;tXPF> zqYh6dB)~DlFoa_u=yWhnX&E^;^hWx8kEw~vyK`Ju1wBNC=O;E2ZM;5lP013|TB;?m zo*VE9Qm!$DxrM+t++&R?=Oxvnq(=kI3arc&^FdTzNe_g+2TAu-vo{P2=_1{P#A4k* zyW;UUfe+AF*Pp%XhuSa?(i7IVWH90EADPb-FWJ99u->J&wyt1-9kEG8z}6^N@1`Tx zb)&dnNm-sQNhNskWRJ~WdyCD_(@ZHdmwq`j%cd4yZl|uY6`c8o3_|<$QK5mKUabS1u2IFD2=Y4i>heZ}Bvbn{b|%$?p$*8nd~i(e zft=s7ubf{sU{FU$zmj%xOz#<4byk-Un7>Hd3-)Z|ha-#cVZ0brkPG1E20)?$(^Bk5 z`1b_=*dffIRT$7oapPo;A0l#DYNenlB$Osa<#(mEv51`#+yF!rBu*D8o5?2J{ zPw*Nr_djBj-KBnoY5TwvWDMr|Fc%E1z%9TEF9p`KgN3T0FO{c5{TAr2-kAR1Jb_w!@Ko%)%RBG#mfl)h4TZy3$_`Wu zJl(sa`3KgwvtKV?!N}h|(P4SY?Y_Rm1e|)!CyAI4 zk3sSkkmXN3fkOmAz6MdxKvd(HKS3S{x11C7QRjZzBE?e<`R4kHf%{wFwy$Gmg!G&w zqGzo9lJ9`@(g&tY`<=qK(Q zEb3vkZw1bQWAZ)pj~#7XUcWp%CMg(i1$ch}at4nIw1(&s>zl{KhOP`m?Yelr$o&SM xPa;eYgZBe8il3TmXQ2M2*fkjfbI^4sTpCo3PxoJ)L-W7>+tE2Rqbl_Fz`vrJ!h`?- diff --git a/Assets/Scripts/Audio/NAudio/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache.meta b/Assets/Scripts/Audio/NAudio/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache.meta deleted file mode 100644 index d3d26a1..0000000 --- a/Assets/Scripts/Audio/NAudio/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f5be04be7a3553b4a874803205b699ea -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/obj/Debug/NAudio.csproj.AssemblyReference.cache b/Assets/Scripts/Audio/NAudio/obj/Debug/NAudio.csproj.AssemblyReference.cache deleted file mode 100644 index f5e894aea93a73e58fa9d4feab241bc197ee1a40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11 QcmeZu3JP{+WMlvW01Ze1dH?_b diff --git a/Assets/Scripts/Audio/NAudio/obj/Debug/NAudio.csproj.AssemblyReference.cache.meta b/Assets/Scripts/Audio/NAudio/obj/Debug/NAudio.csproj.AssemblyReference.cache.meta deleted file mode 100644 index 96ef2d9..0000000 --- a/Assets/Scripts/Audio/NAudio/obj/Debug/NAudio.csproj.AssemblyReference.cache.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 28b050c2c6f5e91489dd2aabcfd032e5 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Audio/NAudio/obj/Debug/TempPE.meta b/Assets/Scripts/Audio/NAudio/obj/Debug/TempPE.meta deleted file mode 100644 index 520294b..0000000 --- a/Assets/Scripts/Audio/NAudio/obj/Debug/TempPE.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8c67e44925f9108409940641d4195df5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/umamusume.asmdef b/Assets/Scripts/umamusume.asmdef index 2730561..3a8b0f3 100644 --- a/Assets/Scripts/umamusume.asmdef +++ b/Assets/Scripts/umamusume.asmdef @@ -7,7 +7,7 @@ ], "includePlatforms": [], "excludePlatforms": [], - "allowUnsafeCode": true, + "allowUnsafeCode": false, "overrideReferences": false, "precompiledReferences": [], "autoReferenced": true, diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 1581c4c..83e6ed0 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -430,8 +430,8 @@ PlayerSettings: m_GraphicsJobMode: 0 m_BuildTargetGraphicsAPIs: - m_BuildTarget: AndroidPlayer - m_APIs: 150000000b000000 - m_Automatic: 0 + m_APIs: 15000000 + m_Automatic: 1 - m_BuildTarget: iOSSupport m_APIs: 10000000 m_Automatic: 1 diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index 7b7658d..a3e6392 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -18,7 +18,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 1 + skinWeights: 1 textureQuality: 1 anisotropicTextures: 0 antiAliasing: 0 @@ -40,6 +40,7 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Low @@ -53,7 +54,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 2 + skinWeights: 2 textureQuality: 0 anisotropicTextures: 0 antiAliasing: 0 @@ -75,6 +76,7 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Medium @@ -88,7 +90,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 2 + skinWeights: 2 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 0 @@ -110,6 +112,7 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: High @@ -123,7 +126,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 2 + skinWeights: 2 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 0 @@ -145,6 +148,7 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Very High @@ -158,7 +162,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 4 + skinWeights: 4 textureQuality: 0 anisotropicTextures: 2 antiAliasing: 2 @@ -180,6 +184,7 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Ultra @@ -193,11 +198,11 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 4 + skinWeights: 4 textureQuality: 0 anisotropicTextures: 2 antiAliasing: 2 - softParticles: 1 + softParticles: 0 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 @@ -215,9 +220,10 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] m_PerPlatformDefaultQuality: - Android: 2 + Android: 5 Lumin: 5 Nintendo 3DS: 5 Nintendo Switch: 5 diff --git a/ProjectSettings/SceneTemplateSettings.json b/ProjectSettings/SceneTemplateSettings.json new file mode 100644 index 0000000..6f3e60f --- /dev/null +++ b/ProjectSettings/SceneTemplateSettings.json @@ -0,0 +1,167 @@ +{ + "templatePinStates": [], + "dependencyTypeInfos": [ + { + "userAdded": false, + "type": "UnityEngine.AnimationClip", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.Animations.AnimatorController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.AnimatorOverrideController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.Audio.AudioMixerController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.ComputeShader", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Cubemap", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.GameObject", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.LightingDataAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": false + }, + { + "userAdded": false, + "type": "UnityEngine.LightingSettings", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Material", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.MonoScript", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicMaterial", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicsMaterial2D", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.VolumeProfile", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.SceneAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": false + }, + { + "userAdded": false, + "type": "UnityEngine.Shader", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.ShaderVariantCollection", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Texture", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Texture2D", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Timeline.TimelineAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + } + ], + "defaultDependencyTypeInfo": { + "userAdded": false, + "type": "", + "ignore": false, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + "newSceneOverride": 0 +} \ No newline at end of file