├── pics
├── ss.png
├── append.png
├── example.png
├── images.png
└── replace.png
└── CashCommodities
├── icon.ico
├── Resources
├── disk.png
├── icon.ico
└── folder.png
├── NAudio
├── Tools
│ └── NuGet.exe
├── naudio-logo.png
├── Docs
│ ├── Resampling.md
│ ├── OutputDeviceTypes.md
│ ├── PlayAudioFromUrl.md
│ └── PlayAudioFileConsoleApp.md
├── Lib
│ └── NSpeex
│ │ └── NSpeex.dll
├── MixDiff
│ ├── AboutForm.cs
│ ├── Resources
│ │ ├── Back.png
│ │ ├── Loop.png
│ │ ├── Play.png
│ │ ├── Stop.png
│ │ ├── Pause.png
│ │ ├── Rewind.png
│ │ ├── Forward.png
│ │ └── Shuffle.png
│ ├── AboutForm.Designer.cs
│ ├── Program.cs
│ ├── Properties
│ │ └── Settings.settings
│ └── app.config
├── NAudio
│ ├── Dsp
│ │ ├── SimpleGate.cs
│ │ ├── EnvelopeDetector.cs
│ │ ├── SimpleCompressor.cs
│ │ └── Complex.cs
│ ├── FodyWeavers.xml
│ ├── Dmo
│ │ ├── DmoEnumFlags.cs
│ │ ├── DmoInputStatusFlags.cs
│ │ ├── DmoSetTypeFlags.cs
│ │ ├── InputStreamInfoFlags.cs
│ │ ├── Effect
│ │ │ ├── EchoPanDelay.cs
│ │ │ ├── ChorusWaveForm.cs
│ │ │ ├── FlangerWaveForm.cs
│ │ │ ├── GargleWaveShape.cs
│ │ │ ├── ChorusPhase.cs
│ │ │ ├── IDmoEffector.cs
│ │ │ └── FlangerPhase.cs
│ │ ├── OutputStreamInfoFlags.cs
│ │ ├── DmoInPlaceProcessFlags.cs
│ │ ├── DmoProcessOutputFlags.cs
│ │ ├── DmoInPlaceProcessReturn.cs
│ │ ├── DmoPartialMediaType.cs
│ │ ├── DmoHResults.cs
│ │ ├── IEnumDmo.cs
│ │ ├── IWMResamplerProps.cs
│ │ ├── DmoInputDataBufferFlags.cs
│ │ ├── DmoDescriptor.cs
│ │ ├── IMediaObjectInPlace.cs
│ │ ├── DmoOutputDataBufferFlags.cs
│ │ ├── DmoInterop.cs
│ │ ├── IMediaParamInfo.cs
│ │ └── MediaObjectSizeInfo.cs
│ ├── NAudio.ruleset
│ ├── CoreAudioApi
│ │ ├── Interfaces
│ │ │ ├── MMDeviceEnumeratorComObject.cs
│ │ │ ├── IMMDeviceCollection.cs
│ │ │ ├── IMMEndpoint.cs
│ │ │ ├── IAudioSessionEnumerator.cs
│ │ │ ├── IAudioRenderClient.cs
│ │ │ ├── StorageAccessMode.cs
│ │ │ ├── IPropertyStore.cs
│ │ │ ├── IMMDevice.cs
│ │ │ ├── IAudioSessionNotification.cs
│ │ │ ├── IMMDeviceEnumerator.cs
│ │ │ ├── IAudioCaptureClient.cs
│ │ │ ├── IAudioClock2.cs
│ │ │ ├── IAudioStreamVolume.cs
│ │ │ └── ClsCtx.cs
│ │ ├── PropVariantNative.cs
│ │ ├── AudioClientShareMode.cs
│ │ ├── AudioClientStreamOptions.cs
│ │ ├── AudioSessionNotification.cs
│ │ ├── Role.cs
│ │ ├── AudioClientBufferFlags.cs
│ │ ├── PropertyKey.cs
│ │ ├── AudioClientStreamFlags.cs
│ │ └── DataFlow.cs
│ ├── NAudio.csproj.DotSettings
│ ├── Wave
│ │ ├── WaveFormats
│ │ │ └── OggWaveFormat.cs
│ │ ├── Compression
│ │ │ ├── AcmStreamSizeFlags.cs
│ │ │ ├── AcmStreamConvertFlags.cs
│ │ │ ├── AcmDriverEnumFlags.cs
│ │ │ ├── AcmStreamHeaderStatusFlags.cs
│ │ │ ├── AcmDriverAddFlags.cs
│ │ │ ├── WaveFilter.cs
│ │ │ ├── AcmFormatSuggestFlags.cs
│ │ │ ├── AcmDriverDetailsSupportFlags.cs
│ │ │ └── AcmFormatChooseStyleFlags.cs
│ │ ├── WaveOutputs
│ │ │ ├── PlaybackState.cs
│ │ │ ├── IWaveProvider.cs
│ │ │ ├── StoppedEventArgs.cs
│ │ │ └── IWaveProviderFloat.cs
│ │ ├── SampleChunkConverters
│ │ │ └── ISampleChunkConverter.cs
│ │ ├── MmeInterop
│ │ │ ├── WaveCallbackStrategy.cs
│ │ │ ├── WaveOutSupport.cs
│ │ │ ├── WaveInEventArgs.cs
│ │ │ └── WaveHeader.cs
│ │ ├── WaveInputs
│ │ │ └── IWaveIn.cs
│ │ ├── WaveStreams
│ │ │ └── ISampleNotifier.cs
│ │ ├── Asio
│ │ │ ├── Asio64Bit.cs
│ │ │ └── AsioChannelInfo.cs
│ │ └── WaveProviders
│ │ │ └── SilenceWaveProvider.cs
│ ├── app.config
│ ├── MediaFoundation
│ │ ├── _MFT_PROCESS_OUTPUT_STATUS.cs
│ │ ├── _MFT_INPUT_STATUS_FLAGS.cs
│ │ ├── _MFT_SET_TYPE_FLAGS.cs
│ │ ├── _MFT_OUTPUT_STATUS_FLAGS.cs
│ │ ├── MFT_REGISTER_TYPE_INFO.cs
│ │ ├── _MFT_PROCESS_OUTPUT_FLAGS.cs
│ │ ├── MFT_OUTPUT_STREAM_INFO.cs
│ │ ├── MFT_OUTPUT_DATA_BUFFER.cs
│ │ └── _MFT_OUTPUT_DATA_BUFFER_FLAGS.cs
│ ├── FileFormats
│ │ ├── SoundFont
│ │ │ ├── SampleDataChunk.cs
│ │ │ ├── SampleMode.cs
│ │ │ ├── SFVersion.cs
│ │ │ ├── StructureBuilder.cs
│ │ │ ├── SFSampleLink.cs
│ │ │ ├── Instrument.cs
│ │ │ ├── ModulatorBuilder.cs
│ │ │ ├── SFVersionBuilder.cs
│ │ │ └── Zone.cs
│ │ └── Mp3
│ │ │ ├── MpegLayer.cs
│ │ │ ├── ChannelMode.cs
│ │ │ ├── MpegVersion.cs
│ │ │ └── IMp3FrameDecompressor.cs
│ ├── Utils
│ │ ├── NativeMethods.cs
│ │ ├── WavePositionExtensions.cs
│ │ ├── ChunkIdentifier.cs
│ │ ├── FieldDescriptionAttribute.cs
│ │ ├── MarshalHelpers.cs
│ │ └── Decibels.cs
│ ├── Midi
│ │ └── MidiOutTechnology.cs
│ ├── Mixer
│ │ ├── CustomMixerControl.cs
│ │ └── ListTextMixerControl.cs
│ └── Gui
│ │ ├── VolumeMeter.Designer.cs
│ │ └── WaveformPainter.Designer.cs
├── AudioFileInspector
│ ├── AboutForm.cs
│ ├── InstallScript.nsi
│ ├── AboutForm.Designer.cs
│ ├── app.config
│ ├── Properties
│ │ ├── Settings.settings
│ │ └── Settings.Designer.cs
│ ├── IAudioFileInspector.cs
│ └── FindForm.cs
├── MidiFileConverter
│ ├── AboutForm.cs
│ ├── InstallScript.nsi
│ ├── AboutForm.Designer.cs
│ ├── OutputMidiType.cs
│ └── Program.cs
├── NAudioDemo
│ ├── Resources
│ │ ├── Back.png
│ │ ├── Loop.png
│ │ ├── Mute.png
│ │ ├── Open.png
│ │ ├── Pause.png
│ │ ├── Play.png
│ │ ├── Rewind.png
│ │ ├── Stop.png
│ │ ├── Unmute.png
│ │ ├── Audiosrv.png
│ │ ├── Forward.png
│ │ └── Shuffle.png
│ ├── NetworkChatDemo
│ │ ├── IAudioSender.cs
│ │ ├── IAudioReceiver.cs
│ │ ├── MicrosoftAdpcmChatCodec.cs
│ │ ├── Gsm610ChatCodec.cs
│ │ ├── TrueSpeechChatCodec.cs
│ │ ├── UdpAudioSender.cs
│ │ ├── TcpAudioSender.cs
│ │ ├── INetworkChatCodec.cs
│ │ └── UncompressedPcmChatCodec.cs
│ ├── INAudioDemoPlugin.cs
│ ├── NAudioDemo.csproj.DotSettings
│ ├── SignalGeneratorDemo
│ │ └── GeneratorPlugIn.cs
│ ├── FadeInOutDemo
│ │ └── FadeInOutPlugin.cs
│ ├── Properties
│ │ └── Settings.settings
│ ├── AudioPlaybackDemo
│ │ ├── IOutputDevicePlugin.cs
│ │ ├── AudioPlaybackPanelPlugin.cs
│ │ ├── DirectSoundOutSettingsPanel.cs
│ │ ├── AsioOutPlugin.cs
│ │ └── DirectSoundOutPlugin.cs
│ ├── SimplePlaybackDemo
│ │ └── SimplePlaybackPlugin.cs
│ ├── Program.cs
│ ├── Utils
│ │ └── ReflectionHelper.cs
│ ├── VolumeMixerDemo
│ │ ├── VolumeMixerPlugin.cs
│ │ └── IconExtractor.cs
│ └── app.config
├── NAudioWpfDemo
│ ├── packages.config
│ ├── app.config
│ ├── IWaveFormRenderer.cs
│ ├── Properties
│ │ ├── Settings.settings
│ │ └── Settings.Designer.cs
│ ├── EqualizationDemo
│ │ ├── EqualizerBand.cs
│ │ ├── EqualizationDemoView.xaml.cs
│ │ └── EqualizationDemoPlugin.cs
│ ├── IModule.cs
│ ├── App.xaml
│ ├── PolylineWaveFormControl.xaml
│ ├── PolygonWaveFormControl.xaml
│ ├── SpectrumAnalyser.xaml
│ ├── WaveFormControl.xaml
│ ├── NAudioWpfDemo.csproj.DotSettings
│ ├── WasapiCaptureDemo
│ │ ├── WasapiCaptureDemoView.xaml.cs
│ │ ├── RecordingsView.xaml.cs
│ │ └── WasapiCaptureDemoPlugin.cs
│ ├── ViewModel
│ │ └── ViewModelBase.cs
│ ├── EnumMediaFoundationTransforms
│ │ ├── EnumMftDemo.cs
│ │ ├── EnumMftView.xaml.cs
│ │ └── EnumMftView.xaml
│ ├── FireAndForgetPlayback
│ │ ├── FireAndForgetPlaybackView.xaml.cs
│ │ ├── AutoDisposeFileReader.cs
│ │ ├── CachedSoundSampleProvider.cs
│ │ ├── FireAndForgetDemoPlugin.cs
│ │ ├── FireAndForgetPlaybackView.xaml
│ │ └── CachedSound.cs
│ ├── DrumMachineDemo
│ │ ├── DrumMachineDemoView.xaml.cs
│ │ ├── DrumPatternEditor.xaml
│ │ ├── DrumMachineDemoPlugin.cs
│ │ ├── DrumPattern.cs
│ │ └── DrumKit.cs
│ ├── AudioPlaybackDemo
│ │ ├── AudioPlaybackDemoView.xaml.cs
│ │ ├── IVisualizationPlugin.cs
│ │ ├── PolygonWaveFormVisualization.cs
│ │ ├── SpectrumAnalyzerVisualization.cs
│ │ └── PolylineWaveFormVisualization.cs
│ ├── MediaFoundationPlayback
│ │ ├── MediaFoundationPlaybackView.xaml.cs
│ │ └── MediaFoundationPlaybackPlugin.cs
│ ├── MainWindow.xaml.cs
│ ├── MediaFoundationEncode
│ │ ├── MediaFoundationEncodePlugin.cs
│ │ └── MediaFoundationEncodeView.xaml.cs
│ ├── MediaFoundationResample
│ │ ├── MediaFoundationEncodePlugin.cs
│ │ └── MediaFoundationResampleView.xaml.cs
│ ├── Utils
│ │ └── ReflectionHelper.cs
│ ├── ModuleBase.cs
│ ├── App.xaml.cs
│ └── MainWindow.xaml
├── SampleData
│ └── Drums
│ │ ├── kick-trimmed.wav
│ │ ├── crash-trimmed.wav
│ │ ├── snare-trimmed.wav
│ │ ├── open-hat-trimmed.wav
│ │ └── closed-hat-trimmed.wav
├── NAudioUniversalDemo
│ ├── Assets
│ │ ├── Logo.scale-100.png
│ │ ├── SmallLogo.scale-100.png
│ │ ├── StoreLogo.scale-100.png
│ │ ├── WideLogo.scale-100.png
│ │ └── SplashScreen.scale-100.png
│ ├── App.xaml
│ ├── project.json
│ ├── ViewModelBase.cs
│ ├── MainPage.xaml.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── .gitignore
├── NAudioTests
│ ├── packages.config
│ ├── WaveStreams
│ │ ├── AudioFileReaderTests.cs
│ │ ├── ChunkIdentifierTests.cs
│ │ ├── MonoToStereoSampleProviderTests.cs
│ │ ├── SampleToWaveProvider24Tests.cs
│ │ ├── WaveChannel32Tests.cs
│ │ ├── TestWaveProvider.cs
│ │ ├── TestSampleProvider.cs
│ │ └── SilenceProviderTests.cs
│ ├── Utils
│ │ ├── OSUtils.cs
│ │ ├── SampleProviderTestHelpers.cs
│ │ ├── TestFileBuilder.cs
│ │ ├── ByteEncodingTests.cs
│ │ └── NullWaveStream.cs
│ ├── DirectSound
│ │ └── DirectSoundTests.cs
│ ├── StopwatchExtensions.cs
│ └── MediaFoundation
│ │ └── MediaFoundationReaderTests.cs
├── build.bat
├── NAudio.Universal
│ ├── project.json
│ ├── CoreAudioApi
│ │ └── PropVariantNative.cs
│ ├── Utils
│ │ └── MarshalHelpers.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── azure-pipelines.yml
├── NAudio.nuspec
├── NAudio.sln.DotSettings
└── NAudio.Universal.sln.DotSettings
├── MapleLib
├── README.md
├── FodyWeavers.xml
├── app.config
├── WzLib
│ ├── WzExtended.cs
│ └── WzObjectType.cs
└── PacketLib
│ ├── SessionType.cs
│ └── AbstractPacket.cs
├── FodyWeavers.xml
├── Types
└── ClassType.cs
├── Properties
├── Settings.settings
└── Settings.Designer.cs
├── Utils
└── Logger.cs
├── app.config
└── Program.cs
/pics/ss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/pics/ss.png
--------------------------------------------------------------------------------
/pics/append.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/pics/append.png
--------------------------------------------------------------------------------
/pics/example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/pics/example.png
--------------------------------------------------------------------------------
/pics/images.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/pics/images.png
--------------------------------------------------------------------------------
/pics/replace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/pics/replace.png
--------------------------------------------------------------------------------
/CashCommodities/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/icon.ico
--------------------------------------------------------------------------------
/CashCommodities/Resources/disk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/Resources/disk.png
--------------------------------------------------------------------------------
/CashCommodities/Resources/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/Resources/icon.ico
--------------------------------------------------------------------------------
/CashCommodities/Resources/folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/Resources/folder.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/Tools/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/Tools/NuGet.exe
--------------------------------------------------------------------------------
/CashCommodities/NAudio/naudio-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/naudio-logo.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/Docs/Resampling.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/Docs/Resampling.md
--------------------------------------------------------------------------------
/CashCommodities/NAudio/Lib/NSpeex/NSpeex.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/Lib/NSpeex/NSpeex.dll
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/AboutForm.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MixDiff/AboutForm.cs
--------------------------------------------------------------------------------
/CashCommodities/NAudio/Docs/OutputDeviceTypes.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/Docs/OutputDeviceTypes.md
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/Resources/Back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MixDiff/Resources/Back.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/Resources/Loop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MixDiff/Resources/Loop.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/Resources/Play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MixDiff/Resources/Play.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/Resources/Stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MixDiff/Resources/Stop.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dsp/SimpleGate.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudio/Dsp/SimpleGate.cs
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/Resources/Pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MixDiff/Resources/Pause.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/Resources/Rewind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MixDiff/Resources/Rewind.png
--------------------------------------------------------------------------------
/CashCommodities/MapleLib/README.md:
--------------------------------------------------------------------------------
1 | MapleLib2 by haha01haha01;
2 | based on MapleLib by Snow;
3 | based on WzLib by JonyLeeson;
4 | based on information from Fiel\Koolk.
--------------------------------------------------------------------------------
/CashCommodities/NAudio/AudioFileInspector/AboutForm.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/AudioFileInspector/AboutForm.cs
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MidiFileConverter/AboutForm.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MidiFileConverter/AboutForm.cs
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/AboutForm.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MixDiff/AboutForm.Designer.cs
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/Resources/Forward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MixDiff/Resources/Forward.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/Resources/Shuffle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MixDiff/Resources/Shuffle.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dsp/EnvelopeDetector.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudio/Dsp/EnvelopeDetector.cs
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dsp/SimpleCompressor.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudio/Dsp/SimpleCompressor.cs
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Back.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Loop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Loop.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Mute.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Open.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Pause.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Play.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Rewind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Rewind.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Stop.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Unmute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Unmute.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Audiosrv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Audiosrv.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Forward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Forward.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Resources/Shuffle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioDemo/Resources/Shuffle.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/SampleData/Drums/kick-trimmed.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/SampleData/Drums/kick-trimmed.wav
--------------------------------------------------------------------------------
/CashCommodities/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/AudioFileInspector/InstallScript.nsi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/AudioFileInspector/InstallScript.nsi
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MidiFileConverter/InstallScript.nsi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MidiFileConverter/InstallScript.nsi
--------------------------------------------------------------------------------
/CashCommodities/NAudio/SampleData/Drums/crash-trimmed.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/SampleData/Drums/crash-trimmed.wav
--------------------------------------------------------------------------------
/CashCommodities/NAudio/SampleData/Drums/snare-trimmed.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/SampleData/Drums/snare-trimmed.wav
--------------------------------------------------------------------------------
/CashCommodities/NAudio/SampleData/Drums/open-hat-trimmed.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/SampleData/Drums/open-hat-trimmed.wav
--------------------------------------------------------------------------------
/CashCommodities/MapleLib/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/AudioFileInspector/AboutForm.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/AudioFileInspector/AboutForm.Designer.cs
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MidiFileConverter/AboutForm.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/MidiFileConverter/AboutForm.Designer.cs
--------------------------------------------------------------------------------
/CashCommodities/NAudio/SampleData/Drums/closed-hat-trimmed.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/SampleData/Drums/closed-hat-trimmed.wav
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioUniversalDemo/Assets/Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioUniversalDemo/Assets/Logo.scale-100.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioUniversalDemo/Assets/SmallLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioUniversalDemo/Assets/SmallLogo.scale-100.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioUniversalDemo/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioUniversalDemo/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioUniversalDemo/Assets/WideLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioUniversalDemo/Assets/WideLogo.scale-100.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioUniversalDemo/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/izarooni/CashCommodities/HEAD/CashCommodities/NAudio/NAudioUniversalDemo/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/CashCommodities/Types/ClassType.cs:
--------------------------------------------------------------------------------
1 | namespace CashCommodities {
2 | public enum ClassType {
3 | New = 0,
4 | Sale = 1,
5 | Hot = 2,
6 | Event = 3,
7 | None = 4
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/AudioFileInspector/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/NetworkChatDemo/IAudioSender.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudioDemo.NetworkChatDemo
4 | {
5 | interface IAudioSender : IDisposable
6 | {
7 | void Send(byte[] payload);
8 | }
9 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoEnumFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | [Flags]
6 | enum DmoEnumFlags
7 | {
8 | None,
9 | DMO_ENUMF_INCLUDE_KEYED = 0x00000001
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/NetworkChatDemo/IAudioReceiver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudioDemo.NetworkChatDemo
4 | {
5 | interface IAudioReceiver : IDisposable
6 | {
7 | void OnReceived(Action handler);
8 | }
9 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoInputStatusFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | [Flags]
6 | enum DmoInputStatusFlags
7 | {
8 | None,
9 | DMO_INPUT_STATUSF_ACCEPT_DATA = 0x1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/IWaveFormRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 |
4 | namespace NAudioWpfDemo
5 | {
6 | public interface IWaveFormRenderer
7 | {
8 | void AddValue(float maxValue, float minValue);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/.gitignore:
--------------------------------------------------------------------------------
1 | [bB]in/
2 | [oO]bj/
3 | [pP]ackages/
4 | AppPackages/
5 | TestResults/
6 | TestResult.xml
7 | BuildArtefacts/
8 | _ReSharper*/
9 | *.suo
10 | *.ncrunchsolution
11 | *.user
12 | *.ncrunchproject
13 | *.orig
14 | *.lock.json
15 | .vs/
16 | .fake/
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/INAudioDemoPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace NAudioDemo
5 | {
6 | public interface INAudioDemoPlugin
7 | {
8 | string Name { get; }
9 | Control CreatePanel();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoSetTypeFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | [Flags]
6 | enum DmoSetTypeFlags
7 | {
8 | None,
9 | DMO_SET_TYPEF_TEST_ONLY = 0x00000001,
10 | DMO_SET_TYPEF_CLEAR = 0x00000002
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/build.bat:
--------------------------------------------------------------------------------
1 | REM can call with target eg
2 | REM build zipall
3 | REM build nuget
4 | @echo off
5 | cls
6 | if not exist "packages\FAKE" "Tools\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "packages" "-ExcludeVersion"
7 | "packages\FAKE\tools\Fake.exe" build.fsx %*
8 | pause
9 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/EqualizationDemo/EqualizerBand.cs:
--------------------------------------------------------------------------------
1 | namespace NAudioWpfDemo.EqualizationDemo
2 | {
3 | class EqualizerBand
4 | {
5 | public float Frequency { get; set; }
6 | public float Gain { get; set; }
7 | public float Bandwidth { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/CashCommodities/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MidiFileConverter/OutputMidiType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace MarkHeath.MidiUtils
6 | {
7 | enum OutputMidiType
8 | {
9 | LeaveUnchanged,
10 | Type0,
11 | Type1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/AudioFileInspector/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/IModule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Controls;
4 |
5 | namespace NAudioWpfDemo
6 | {
7 | public interface IModule
8 | {
9 | string Name { get; }
10 | UserControl UserInterface { get; }
11 | void Deactivate();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioUniversalDemo/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/PolylineWaveFormControl.xaml:
--------------------------------------------------------------------------------
1 |
5 |
8 |
9 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/AudioFileInspector/IAudioFileInspector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace AudioFileInspector
6 | {
7 | public interface IAudioFileInspector
8 | {
9 | string FileExtension { get; }
10 | string FileTypeDescription { get; }
11 | string Describe(string fileName);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio.Universal/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
4 | },
5 | "frameworks": {
6 | "uap10.0": {}
7 | },
8 | "runtimes": {
9 | "win10-arm": {},
10 | "win10-arm-aot": {},
11 | "win10-x86": {},
12 | "win10-x86-aot": {},
13 | "win10-x64": {},
14 | "win10-x64-aot": {}
15 | }
16 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/NAudio.ruleset:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/PolygonWaveFormControl.xaml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioUniversalDemo/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
4 | },
5 | "frameworks": {
6 | "uap10.0": {}
7 | },
8 | "runtimes": {
9 | "win10-arm": {},
10 | "win10-arm-aot": {},
11 | "win10-x86": {},
12 | "win10-x86-aot": {},
13 | "win10-x64": {},
14 | "win10-x64-aot": {}
15 | }
16 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/SpectrumAnalyser.xaml:
--------------------------------------------------------------------------------
1 |
5 |
8 |
9 |
--------------------------------------------------------------------------------
/CashCommodities/Utils/Logger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace CashCommodities {
5 | internal static class Logger {
6 | internal static void Log(string content) {
7 | using StreamWriter w = File.AppendText(Properties.Resources.FileLogger);
8 | w.WriteLineAsync($"{DateTime.Now:yyyy-MM-dd hh:mm:ss} - {content}");
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/MMDeviceEnumeratorComObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | ///
7 | /// implements IMMDeviceEnumerator
8 | ///
9 | [ComImport, Guid("BCDE0395-E52F-467C-8E3D-C4579291692E")]
10 | class MMDeviceEnumeratorComObject
11 | {
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/WaveFormControl.xaml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/NAudio.csproj.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | No
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/NAudioDemo.csproj.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | No
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/InputStreamInfoFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | [Flags]
6 | enum InputStreamInfoFlags
7 | {
8 | None,
9 | DMO_INPUT_STREAMF_WHOLE_SAMPLES = 0x00000001,
10 | DMO_INPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x00000002,
11 | DMO_INPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x00000004,
12 | DMO_INPUT_STREAMF_HOLDS_BUFFERS = 0x00000008
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/NetworkChatDemo/MicrosoftAdpcmChatCodec.cs:
--------------------------------------------------------------------------------
1 | using NAudio.Wave;
2 |
3 | namespace NAudioDemo.NetworkChatDemo
4 | {
5 | class MicrosoftAdpcmChatCodec : AcmChatCodec
6 | {
7 | public MicrosoftAdpcmChatCodec()
8 | : base(new WaveFormat(8000, 16, 1), new AdpcmWaveFormat(8000,1))
9 | {
10 | }
11 |
12 | public override string Name => "Microsoft ADPCM";
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/NAudioWpfDemo.csproj.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | No
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/Effect/EchoPanDelay.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.Dmo.Effect
2 | {
3 | ///
4 | /// DSFXECHO_PANDELAY
5 | ///
6 | public enum EchoPanDelay : int
7 | {
8 | ///
9 | /// DSFXECHO_PANDELAY_MIN
10 | ///
11 | Off = 0,
12 | ///
13 | /// DSFXECHO_PANDELAY_MAX
14 | ///
15 | On = 1,
16 | }
17 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/NetworkChatDemo/Gsm610ChatCodec.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using NAudio.Wave;
4 |
5 | namespace NAudioDemo.NetworkChatDemo
6 | {
7 | class Gsm610ChatCodec : AcmChatCodec
8 | {
9 | public Gsm610ChatCodec()
10 | : base(new WaveFormat(8000, 16, 1), new Gsm610WaveFormat())
11 | {
12 | }
13 |
14 | public override string Name => "GSM 6.10";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/PropVariantNative.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | class PropVariantNative
7 | {
8 | [DllImport("ole32.dll")]
9 | internal static extern int PropVariantClear(ref PropVariant pvar);
10 |
11 | [DllImport("ole32.dll")]
12 | internal static extern int PropVariantClear(IntPtr pvar);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/Effect/ChorusWaveForm.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.Dmo.Effect
2 | {
3 | ///
4 | /// Chorus Wave Form
5 | ///
6 | public enum ChorusWaveForm : int
7 | {
8 | ///
9 | /// DSFXCHORUS_WAVE_TRIANGLE
10 | ///
11 | Triangle = 0,
12 |
13 | ///
14 | /// DSFXCHORUS_WAVE_SIN
15 | ///
16 | Sin = 1
17 | }
18 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/Effect/FlangerWaveForm.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.Dmo.Effect
2 | {
3 | ///
4 | /// Flanger Wave Form
5 | ///
6 | public enum FlangerWaveForm : int
7 | {
8 | ///
9 | /// DSFXFLANGER_WAVE_TRIANGLE
10 | ///
11 | Triangle = 0,
12 |
13 | ///
14 | /// DSFXFLANGER_WAVE_SIN
15 | ///
16 | Sin = 1
17 | }
18 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/SignalGeneratorDemo/GeneratorPlugIn.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Forms;
2 |
3 | namespace NAudioDemo.SignalGeneratorDemo
4 | {
5 | internal class GeneratorPlugin : INAudioDemoPlugin
6 | {
7 | public string Name
8 | {
9 | get { return "Signal Generator"; }
10 | }
11 |
12 | public Control CreatePanel()
13 | {
14 | return new GeneratorPanel();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IMMDeviceCollection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | [Guid("0BD7A1BE-7A1A-44DB-8397-CC5392387B5E"),
7 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
8 | interface IMMDeviceCollection
9 | {
10 | int GetCount(out int numDevices);
11 | int Item(int deviceNumber, out IMMDevice device);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/Effect/GargleWaveShape.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.Dmo.Effect
2 | {
3 | ///
4 | /// Gargle Wave Shape
5 | ///
6 | public enum GargleWaveShape : uint
7 | {
8 | ///
9 | /// DSFXGARGLE_WAVE_TRIANGLE
10 | ///
11 | Triangle = 0,
12 |
13 | ///
14 | /// DSFXGARGLE_WAVE_SQUARE
15 | ///
16 | Square = 1
17 | }
18 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/FadeInOutDemo/FadeInOutPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 |
4 | namespace NAudioDemo.FadeInOutDemo
5 | {
6 | class FadeInOutPlugin : INAudioDemoPlugin
7 | {
8 | public string Name
9 | {
10 | get { return "Fade In Out"; }
11 | }
12 |
13 | public System.Windows.Forms.Control CreatePanel()
14 | {
15 | return new FadeInOutPanel();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/WasapiCaptureDemo/WasapiCaptureDemoView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace NAudioWpfDemo.WasapiCaptureDemo
4 | {
5 | ///
6 | /// Interaction logic for WasapiCaptureDemoView.xaml
7 | ///
8 | public partial class WasapiCaptureDemoView : UserControl
9 | {
10 | public WasapiCaptureDemoView()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IMMEndpoint.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | ///
7 | /// defined in MMDeviceAPI.h
8 | ///
9 | [Guid("1BE09788-6894-4089-8586-9A2A6C265AC5"),
10 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
11 | interface IMMEndpoint
12 | {
13 | int GetDataFlow(out DataFlow dataFlow);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/OutputStreamInfoFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | [Flags]
6 | enum OutputStreamInfoFlags
7 | {
8 | DMO_OUTPUT_STREAMF_WHOLE_SAMPLES = 0x00000001,
9 | DMO_OUTPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x00000002,
10 | DMO_OUTPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x00000004,
11 | DMO_OUTPUT_STREAMF_DISCARDABLE = 0x00000008,
12 | DMO_OUTPUT_STREAMF_OPTIONAL = 0x00000010
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/ViewModel/ViewModelBase.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace NAudioWpfDemo.ViewModel
4 | {
5 | class ViewModelBase : INotifyPropertyChanged
6 | {
7 | public event PropertyChangedEventHandler PropertyChanged;
8 |
9 | protected virtual void OnPropertyChanged(string propertyName)
10 | {
11 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/EnumMediaFoundationTransforms/EnumMftDemo.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace NAudioWpfDemo.EnumMediaFoundationTransforms
4 | {
5 | class EnumMftModule : ModuleBase
6 | {
7 | protected override UserControl CreateViewAndViewModel()
8 | {
9 | return new EnumMftView() { DataContext = new EnumMftViewModel() };
10 | }
11 |
12 | public override string Name => "Enumerate MFTs";
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoInPlaceProcessFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | ///
6 | /// DMO Inplace Process Flags
7 | ///
8 | [Flags]
9 | public enum DmoInPlaceProcessFlags
10 | {
11 | ///
12 | /// DMO_INPLACE_NORMAL
13 | ///
14 | Normal = 0,
15 | ///
16 | /// DMO_INPLACE_ZERO
17 | ///
18 | Zero = 0x1
19 | }
20 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/AudioPlaybackDemo/IOutputDevicePlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using NAudio.Wave;
4 | using System.Windows.Forms;
5 |
6 | namespace NAudioDemo.AudioPlaybackDemo
7 | {
8 | public interface IOutputDevicePlugin
9 | {
10 | IWavePlayer CreateDevice(int latency);
11 | UserControl CreateSettingsPanel();
12 | string Name { get; }
13 | bool IsAvailable { get; }
14 | int Priority { get; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/WasapiCaptureDemo/RecordingsView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Controls;
4 |
5 | namespace NAudioWpfDemo.WasapiCaptureDemo
6 | {
7 | ///
8 | /// Interaction logic for RecordingsView.xaml
9 | ///
10 | public partial class RecordingsView : UserControl
11 | {
12 | public RecordingsView()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/WaveFormats/OggWaveFormat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.Wave
5 | {
6 | //http://svn.xiph.org/tags/vorbisacm_20020708/src/vorbisacm/vorbisacm.h
7 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack=2)]
8 | class OggWaveFormat : WaveFormat
9 | {
10 | //public short cbSize;
11 | public uint dwVorbisACMVersion;
12 | public uint dwLibVorbisVersion;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/FireAndForgetPlayback/FireAndForgetPlaybackView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace NAudioWpfDemo.FireAndForgetPlayback
4 | {
5 | ///
6 | /// Interaction logic for FireAndForgetPlaybackView.xaml
7 | ///
8 | public partial class FireAndForgetPlaybackView : UserControl
9 | {
10 | public FireAndForgetPlaybackView()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/CashCommodities/MapleLib/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/AudioClientShareMode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.CoreAudioApi
4 | {
5 | ///
6 | /// AUDCLNT_SHAREMODE
7 | ///
8 | public enum AudioClientShareMode
9 | {
10 | ///
11 | /// AUDCLNT_SHAREMODE_SHARED,
12 | ///
13 | Shared,
14 | ///
15 | /// AUDCLNT_SHAREMODE_EXCLUSIVE
16 | ///
17 | Exclusive,
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/EnumMediaFoundationTransforms/EnumMftView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Controls;
4 |
5 | namespace NAudioWpfDemo.EnumMediaFoundationTransforms
6 | {
7 | ///
8 | /// Interaction logic for EnumMftView.xaml
9 | ///
10 | public partial class EnumMftView : UserControl
11 | {
12 | public EnumMftView()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Compression/AcmStreamSizeFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave.Compression
6 | {
7 | enum AcmStreamSizeFlags
8 | {
9 | ///
10 | /// ACM_STREAMSIZEF_SOURCE
11 | ///
12 | Source = 0x00000000,
13 | ///
14 | /// ACM_STREAMSIZEF_DESTINATION
15 | ///
16 | Destination = 0x00000001
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/DrumMachineDemo/DrumMachineDemoView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Controls;
4 |
5 | namespace NAudioWpfDemo.DrumMachineDemo
6 | {
7 | ///
8 | /// Interaction logic for DrumMachineDemoView.xaml
9 | ///
10 | public partial class DrumMachineDemoView : UserControl
11 | {
12 | public DrumMachineDemoView()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/SimplePlaybackDemo/SimplePlaybackPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Forms;
4 |
5 | namespace NAudioDemo.SimplePlaybackDemo
6 | {
7 | class SimplePlaybackPlugin : INAudioDemoPlugin
8 | {
9 | public string Name
10 | {
11 | get { return "Simple Playback"; }
12 | }
13 |
14 | public Control CreatePanel()
15 | {
16 | return new SimplePlaybackPanel();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/AudioPlaybackDemo/AudioPlaybackDemoView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Controls;
4 |
5 | namespace NAudioWpfDemo.AudioPlaybackDemo
6 | {
7 | ///
8 | /// Interaction logic for AudioPlaybackDemo.xaml
9 | ///
10 | public partial class AudioPlaybackDemoView : UserControl
11 | {
12 | public AudioPlaybackDemoView()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/EqualizationDemo/EqualizationDemoView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Controls;
4 |
5 | namespace NAudioWpfDemo.EqualizationDemo
6 | {
7 | ///
8 | /// Interaction logic for EqualizationDemoView.xaml
9 | ///
10 | public partial class EqualizationDemoView : UserControl
11 | {
12 | public EqualizationDemoView()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/MediaFoundationPlayback/MediaFoundationPlaybackView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace NAudioWpfDemo.MediaFoundationPlayback
4 | {
5 | ///
6 | /// Interaction logic for MediaFoundationPlaybackView.xaml
7 | ///
8 | public partial class MediaFoundationPlaybackView : UserControl
9 | {
10 | public MediaFoundationPlaybackView()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoProcessOutputFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | ///
6 | /// DMO Process Output Flags
7 | ///
8 | [Flags]
9 | public enum DmoProcessOutputFlags
10 | {
11 | ///
12 | /// None
13 | ///
14 | None,
15 | ///
16 | /// DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER
17 | ///
18 | DiscardWhenNoBuffer = 0x00000001
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dsp/Complex.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Dsp
6 | {
7 | ///
8 | /// Type to represent complex number
9 | ///
10 | public struct Complex
11 | {
12 | ///
13 | /// Real Part
14 | ///
15 | public float X;
16 | ///
17 | /// Imaginary Part
18 | ///
19 | public float Y;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/AudioPlaybackDemo/AudioPlaybackPanelPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Forms;
4 |
5 | namespace NAudioDemo.AudioPlaybackDemo
6 | {
7 | public class AudioPlaybackPanelPlugin : INAudioDemoPlugin
8 | {
9 | public string Name
10 | {
11 | get { return "Audio File Playback"; }
12 | }
13 |
14 | public Control CreatePanel()
15 | {
16 | return new AudioPlaybackPanel();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows;
3 |
4 | namespace NAudioWpfDemo
5 | {
6 | ///
7 | /// Interaction logic for MainWindow.xaml
8 | ///
9 | public partial class MainWindow : Window
10 | {
11 | public MainWindow()
12 | {
13 | InitializeComponent();
14 | this.Title = this.Title + ((System.Runtime.InteropServices.Marshal.SizeOf(IntPtr.Zero) == 8) ? " (x64)" : " (x86)");
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IAudioSessionEnumerator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Runtime.InteropServices;
4 |
5 | namespace NAudio.CoreAudioApi.Interfaces
6 | {
7 | [Guid("E2F5BB11-0570-40CA-ACDD-3AA01277DEE8"),
8 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
9 | internal interface IAudioSessionEnumerator
10 | {
11 | int GetCount(out int sessionCount);
12 |
13 | int GetSession(int sessionCount, out IAudioSessionControl session);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/MediaFoundationEncode/MediaFoundationEncodePlugin.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace NAudioWpfDemo.MediaFoundationEncode
4 | {
5 | class MediaFoundationEncodePlugin : ModuleBase
6 | {
7 | protected override UserControl CreateViewAndViewModel()
8 | {
9 | return new MediaFoundationEncodeView() {DataContext = new MediaFoundationEncodeViewModel()};
10 | }
11 |
12 | public override string Name => "Media Foundation Encode";
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/MediaFoundationEncode/MediaFoundationEncodeView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Controls;
4 |
5 | namespace NAudioWpfDemo.MediaFoundationEncode
6 | {
7 | ///
8 | /// Interaction logic for MediaFoundationEncodeView.xaml
9 | ///
10 | public partial class MediaFoundationEncodeView : UserControl
11 | {
12 | public MediaFoundationEncodeView()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/MediaFoundationResample/MediaFoundationEncodePlugin.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace NAudioWpfDemo.MediaFoundationResample
4 | {
5 | class MediaFoundationResamplePlugin : ModuleBase
6 | {
7 | protected override UserControl CreateViewAndViewModel()
8 | {
9 | return new MediaFoundationResampleView() {DataContext = new MediaFoundationResampleViewModel()};
10 | }
11 |
12 | public override string Name => "Media Foundation Resample";
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/MediaFoundationPlayback/MediaFoundationPlaybackPlugin.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace NAudioWpfDemo.MediaFoundationPlayback
4 | {
5 | class MediaFoundationPlaybackPlugin : ModuleBase
6 | {
7 | protected override UserControl CreateViewAndViewModel()
8 | {
9 | return new MediaFoundationPlaybackView() { DataContext = new MediaFoundationPlaybackViewModel() };
10 | }
11 |
12 | public override string Name => "Media Foundation Playback";
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/MediaFoundationResample/MediaFoundationResampleView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Controls;
4 |
5 | namespace NAudioWpfDemo.MediaFoundationResample
6 | {
7 | ///
8 | /// Interaction logic for MediaFoundationResampleView.xaml
9 | ///
10 | public partial class MediaFoundationResampleView : UserControl
11 | {
12 | public MediaFoundationResampleView()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoInPlaceProcessReturn.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.Dmo
2 | {
3 | ///
4 | /// Return value when Process is executed with IMediaObjectInPlace
5 | ///
6 | public enum DmoInPlaceProcessReturn
7 | {
8 | ///
9 | /// Success. There is no remaining data to process.
10 | ///
11 | Normal = 0x0,
12 | ///
13 | /// Success. There is still data to process.
14 | ///
15 | HasEffectTail = 0x1,
16 | }
17 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IAudioRenderClient.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | [Guid("F294ACFC-3146-4483-A7BF-ADDCA7C260E2"),
7 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
8 | ComImport]
9 | interface IAudioRenderClient
10 | {
11 | int GetBuffer(int numFramesRequested, out IntPtr dataBufferPointer);
12 | int ReleaseBuffer(int numFramesWritten, AudioClientBufferFlags bufferFlags);
13 | }
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/AudioPlaybackDemo/IVisualizationPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using NAudio.Dsp;
4 |
5 | namespace NAudioWpfDemo.AudioPlaybackDemo
6 | {
7 | interface IVisualizationPlugin
8 | {
9 | string Name { get; }
10 | object Content { get; }
11 |
12 | // n.b. not great design, need to refactor so visualizations can attach to the playback graph and measure just what they need
13 | void OnMaxCalculated(float min, float max);
14 | void OnFftCalculated(Complex[] result);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio.Universal/CoreAudioApi/PropVariantNative.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | class PropVariantNative
7 | {
8 | // Windows 10 requires api-ms-win-core-com-l1-1-1.dll
9 | [DllImport("api-ms-win-core-com-l1-1-1.dll")]
10 | internal static extern int PropVariantClear(ref PropVariant pvar);
11 |
12 | [DllImport("api-ms-win-core-com-l1-1-1.dll")]
13 | internal static extern int PropVariantClear(IntPtr pvar);
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows.Forms;
4 |
5 | namespace MarkHeath.AudioUtils
6 | {
7 | static class Program
8 | {
9 | ///
10 | /// The main entry point for the application.
11 | ///
12 | [STAThread]
13 | static void Main()
14 | {
15 | Application.EnableVisualStyles();
16 | Application.SetCompatibleTextRenderingDefault(false);
17 | Application.Run(new MixDiffForm());
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace NAudioDemo
5 | {
6 | static class Program
7 | {
8 | ///
9 | /// The main entry point for the application.
10 | ///
11 | [STAThread]
12 | static void Main()
13 | {
14 | Application.EnableVisualStyles();
15 | Application.SetCompatibleTextRenderingDefault(false);
16 |
17 | var mainForm = new MainForm();
18 | Application.Run(mainForm);
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MidiFileConverter/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows.Forms;
4 |
5 | namespace MarkHeath.MidiUtils
6 | {
7 | static class Program
8 | {
9 | ///
10 | /// The main entry point for the application.
11 | ///
12 | [STAThread]
13 | static void Main()
14 | {
15 | Application.EnableVisualStyles();
16 | Application.SetCompatibleTextRenderingDefault(false);
17 | Application.Run(new MainForm());
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/Utils/ReflectionHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | namespace NAudioDemo.Utils
6 | {
7 | static class ReflectionHelper
8 | {
9 | public static IEnumerable CreateAllInstancesOf()
10 | {
11 | return typeof (ReflectionHelper).Assembly.GetTypes()
12 | .Where(t => typeof (T).IsAssignableFrom(t))
13 | .Where(t => !t.IsAbstract && t.IsClass)
14 | .Select(t => (T) Activator.CreateInstance(t));
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/WaveStreams/AudioFileReaderTests.cs:
--------------------------------------------------------------------------------
1 | using NAudio.Wave;
2 | using NUnit.Framework;
3 |
4 | namespace NAudioTests.WaveStreams
5 | {
6 | [TestFixture]
7 | public class AudioFileReaderTests
8 | {
9 | [Test]
10 | [Category("IntegrationTest")]
11 | public void CanBeDisposedMoreThanOnce()
12 | {
13 | var reader = new AudioFileReader(@"..\..\..\SampleData\Drums\closed-hat-trimmed.wav");
14 | reader.Dispose();
15 | Assert.DoesNotThrow(() => reader.Dispose());
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CashCommodities/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/Utils/ReflectionHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | namespace NAudioWpfDemo.Utils
6 | {
7 | static class ReflectionHelper
8 | {
9 | public static IEnumerable CreateAllInstancesOf()
10 | {
11 | return typeof (ReflectionHelper).Assembly.GetTypes()
12 | .Where(t => typeof (T).IsAssignableFrom(t))
13 | .Where(t => !t.IsAbstract && t.IsClass)
14 | .Select(t => (T) Activator.CreateInstance(t));
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoPartialMediaType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | ///
6 | /// DMO_PARTIAL_MEDIATYPE
7 | ///
8 | struct DmoPartialMediaType
9 | {
10 | Guid type;
11 | Guid subtype;
12 |
13 | public Guid Type
14 | {
15 | get { return type; }
16 | internal set { type = value; }
17 | }
18 |
19 | public Guid Subtype
20 | {
21 | get { return subtype; }
22 | internal set { subtype = value; }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/WaveOutputs/PlaybackState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave
6 | {
7 | ///
8 | /// Playback State
9 | ///
10 | public enum PlaybackState
11 | {
12 | ///
13 | /// Stopped
14 | ///
15 | Stopped,
16 | ///
17 | /// Playing
18 | ///
19 | Playing,
20 | ///
21 | /// Paused
22 | ///
23 | Paused
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/StorageAccessMode.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.CoreAudioApi.Interfaces
2 | {
3 | ///
4 | /// MMDevice STGM enumeration
5 | ///
6 | public enum StorageAccessMode
7 | {
8 | ///
9 | /// Read-only access mode.
10 | ///
11 | Read,
12 | ///
13 | /// Write-only access mode.
14 | ///
15 | Write,
16 | ///
17 | /// Read-write access mode.
18 | ///
19 | ReadWrite
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoHResults.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | ///
6 | /// MediaErr.h
7 | ///
8 | enum DmoHResults
9 | {
10 | DMO_E_INVALIDSTREAMINDEX = unchecked((int)0x80040201),
11 | DMO_E_INVALIDTYPE = unchecked((int)0x80040202),
12 | DMO_E_TYPE_NOT_SET = unchecked((int)0x80040203),
13 | DMO_E_NOTACCEPTING = unchecked((int)0x80040204),
14 | DMO_E_TYPE_NOT_ACCEPTED = unchecked((int)0x80040205),
15 | DMO_E_NO_MORE_ITEMS = unchecked((int)0x80040206),
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_STATUS.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.MediaFoundation
4 | {
5 | ///
6 | /// Process Output Status flags
7 | ///
8 | [Flags]
9 | public enum _MFT_PROCESS_OUTPUT_STATUS
10 | {
11 | ///
12 | /// None
13 | ///
14 | None = 0,
15 | ///
16 | /// The Media Foundation transform (MFT) has created one or more new output streams.
17 | ///
18 | MFT_PROCESS_OUTPUT_STATUS_NEW_STREAMS = 0x00000100
19 | }
20 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/MediaFoundation/_MFT_INPUT_STATUS_FLAGS.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.MediaFoundation
4 | {
5 | ///
6 | /// Indicates the status of an input stream on a Media Foundation transform (MFT).
7 | ///
8 | [Flags]
9 | public enum _MFT_INPUT_STATUS_FLAGS
10 | {
11 | ///
12 | /// None
13 | ///
14 | None = 0,
15 | ///
16 | /// The input stream can receive more data at this time.
17 | ///
18 | MFT_INPUT_STATUS_ACCEPT_DATA = 0x00000001
19 | }
20 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/MediaFoundation/_MFT_SET_TYPE_FLAGS.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.MediaFoundation
4 | {
5 | ///
6 | /// Defines flags for the setting or testing the media type on a Media Foundation transform (MFT).
7 | ///
8 | [Flags]
9 | public enum _MFT_SET_TYPE_FLAGS
10 | {
11 | ///
12 | /// None
13 | ///
14 | None = 0,
15 | ///
16 | /// Test the proposed media type, but do not set it.
17 | ///
18 | MFT_SET_TYPE_TEST_ONLY = 0x00000001
19 | }
20 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/VolumeMixerDemo/VolumeMixerPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Forms;
4 |
5 | namespace NAudioDemo.VolumeMixerDemo
6 | {
7 | ///
8 | /// Volume mixer with functionality of Win Vista and higher Volume Mixer.
9 | ///
10 | class VolumeMixerPlugin : INAudioDemoPlugin
11 | {
12 | public string Name
13 | {
14 | get { return "Volume Mixer"; }
15 | }
16 |
17 | public Control CreatePanel()
18 | {
19 | return new VolumeMixerPanel();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioUniversalDemo/ViewModelBase.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Runtime.CompilerServices;
3 |
4 | namespace NAudioUniversalDemo
5 | {
6 | internal class ViewModelBase : INotifyPropertyChanged
7 | {
8 | public event PropertyChangedEventHandler PropertyChanged;
9 |
10 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
11 | {
12 | PropertyChangedEventHandler handler = PropertyChanged;
13 | if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/CashCommodities/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Windows.Forms;
4 | using CashCommodities.Properties;
5 |
6 | namespace CashCommodities {
7 | static class Program {
8 | ///
9 | /// The main entry point for the application.
10 | ///
11 | [STAThread]
12 | static void Main() {
13 | File.Delete(Resources.FileLogger);
14 |
15 | Application.EnableVisualStyles();
16 | Application.SetCompatibleTextRenderingDefault(false);
17 | Application.Run(new MainWindow());
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/MediaFoundation/_MFT_OUTPUT_STATUS_FLAGS.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.MediaFoundation
4 | {
5 | ///
6 | /// Indicates whether a Media Foundation transform (MFT) can produce output data.
7 | ///
8 | [Flags]
9 | public enum _MFT_OUTPUT_STATUS_FLAGS
10 | {
11 | ///
12 | /// None
13 | ///
14 | None = 0,
15 | ///
16 | /// There is a sample available for at least one output stream.
17 | ///
18 | MFT_OUTPUT_STATUS_SAMPLE_READY = 0x00000001
19 | }
20 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Compression/AcmStreamConvertFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave
6 | {
7 | [Flags]
8 | enum AcmStreamConvertFlags
9 | {
10 | ///
11 | /// ACM_STREAMCONVERTF_BLOCKALIGN
12 | ///
13 | BlockAlign = 0x00000004,
14 | ///
15 | /// ACM_STREAMCONVERTF_START
16 | ///
17 | Start = 0x00000010,
18 | ///
19 | /// ACM_STREAMCONVERTF_END
20 | ///
21 | End = 0x00000020,
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/AudioClientStreamOptions.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.CoreAudioApi
2 | {
3 | ///
4 | /// Defines values that describe the characteristics of an audio stream.
5 | ///
6 | public enum AudioClientStreamOptions
7 | {
8 | ///
9 | /// No stream options.
10 | ///
11 | None = 0,
12 | ///
13 | /// 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.
14 | ///
15 | Raw = 0x1
16 | }
17 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/SoundFont/SampleDataChunk.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace NAudio.SoundFont
5 | {
6 | class SampleDataChunk
7 | {
8 | private byte[] sampleData;
9 | public SampleDataChunk(RiffChunk chunk)
10 | {
11 | string header = chunk.ReadChunkID();
12 | if(header != "sdta")
13 | {
14 | throw new InvalidDataException(String.Format("Not a sample data chunk ({0})",header));
15 | }
16 | sampleData = chunk.GetData();
17 | }
18 |
19 | public byte[] SampleData
20 | {
21 | get
22 | {
23 | return sampleData;
24 | }
25 | }
26 | }
27 |
28 | } // end of namespace
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioUniversalDemo/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml.Controls;
2 |
3 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
4 |
5 | namespace NAudioUniversalDemo
6 | {
7 | ///
8 | /// An empty page that can be used on its own or navigated to within a Frame.
9 | ///
10 | public sealed partial class MainPage : Page
11 | {
12 | public MainPage()
13 | {
14 | this.InitializeComponent();
15 | this.DataContext = new MainPageViewModel() { MediaElement = me };
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/DrumMachineDemo/DrumPatternEditor.xaml:
--------------------------------------------------------------------------------
1 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Compression/AcmDriverEnumFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave.Compression
6 | {
7 | [Flags]
8 | enum AcmDriverEnumFlags
9 | {
10 | ///
11 | /// ACM_DRIVERENUMF_NOLOCAL, Only global drivers should be included in the enumeration
12 | ///
13 | NoLocal = 0x40000000,
14 | ///
15 | /// ACM_DRIVERENUMF_DISABLED, Disabled ACM drivers should be included in the enumeration
16 | ///
17 | Disabled = unchecked((int)0x80000000),
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/SoundFont/SampleMode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.SoundFont
4 | {
5 | ///
6 | /// SoundFont sample modes
7 | ///
8 | public enum SampleMode
9 | {
10 | ///
11 | /// No loop
12 | ///
13 | NoLoop,
14 | ///
15 | /// Loop Continuously
16 | ///
17 | LoopContinuously,
18 | ///
19 | /// Reserved no loop
20 | ///
21 | ReservedNoLoop,
22 | ///
23 | /// Loop and continue
24 | ///
25 | LoopAndContinue
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/MediaFoundation/MFT_REGISTER_TYPE_INFO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.MediaFoundation
5 | {
6 | ///
7 | /// Contains media type information for registering a Media Foundation transform (MFT).
8 | ///
9 | [StructLayout(LayoutKind.Sequential)]
10 | public class MFT_REGISTER_TYPE_INFO
11 | {
12 | ///
13 | /// The major media type.
14 | ///
15 | public Guid guidMajorType;
16 | ///
17 | /// The Media Subtype
18 | ///
19 | public Guid guidSubtype;
20 | }
21 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Compression/AcmStreamHeaderStatusFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave.Compression
6 | {
7 | [Flags]
8 | enum AcmStreamHeaderStatusFlags
9 | {
10 | ///
11 | /// ACMSTREAMHEADER_STATUSF_DONE
12 | ///
13 | Done = 0x00010000,
14 | ///
15 | /// ACMSTREAMHEADER_STATUSF_PREPARED
16 | ///
17 | Prepared = 0x00020000,
18 | ///
19 | /// ACMSTREAMHEADER_STATUSF_INQUEUE
20 | ///
21 | InQueue = 0x00100000,
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/Utils/OSUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NUnit.Framework;
3 |
4 | namespace NAudioTests.Utils
5 | {
6 | static class OSUtils
7 | {
8 | public static void RequireVista()
9 | {
10 | if (Environment.OSVersion.Version.Major < 6)
11 | {
12 | Assert.Ignore("This test requires Windows Vista or newer");
13 | }
14 | }
15 |
16 | public static void RequireXP()
17 | {
18 | if (Environment.OSVersion.Version.Major >= 6)
19 | {
20 | Assert.Ignore("This test requires Windows XP");
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/NetworkChatDemo/TrueSpeechChatCodec.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using NAudio.Wave;
4 |
5 | namespace NAudioDemo.NetworkChatDemo
6 | {
7 | ///
8 | /// DSP Group TrueSpeech codec, using ACM
9 | /// n.b. Windows XP came with a TrueSpeech codec built in
10 | /// - looks like Windows 7 doesn't
11 | ///
12 | class TrueSpeechChatCodec : AcmChatCodec
13 | {
14 | public TrueSpeechChatCodec()
15 | : base(new WaveFormat(8000, 16, 1), new TrueSpeechWaveFormat())
16 | {
17 | }
18 |
19 | public override string Name => "DSP Group TrueSpeech";
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/NetworkChatDemo/UdpAudioSender.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using System.Net.Sockets;
3 |
4 | namespace NAudioDemo.NetworkChatDemo
5 | {
6 | class UdpAudioSender : IAudioSender
7 | {
8 | private readonly UdpClient udpSender;
9 | public UdpAudioSender(IPEndPoint endPoint)
10 | {
11 | udpSender = new UdpClient();
12 | udpSender.Connect(endPoint);
13 | }
14 |
15 | public void Send(byte[] payload)
16 | {
17 | udpSender.Send(payload, payload.Length);
18 | }
19 |
20 | public void Dispose()
21 | {
22 | udpSender?.Close();
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/Mp3/MpegLayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave
6 | {
7 | ///
8 | /// MPEG Layer flags
9 | ///
10 | public enum MpegLayer
11 | {
12 | ///
13 | /// Reserved
14 | ///
15 | Reserved,
16 | ///
17 | /// Layer 3
18 | ///
19 | Layer3,
20 | ///
21 | /// Layer 2
22 | ///
23 | Layer2,
24 | ///
25 | /// Layer 1
26 | ///
27 | Layer1
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Utils/NativeMethods.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.Utils
5 | {
6 | ///
7 | /// General purpose native methods for internal NAudio use
8 | ///
9 | class NativeMethods
10 | {
11 | #if !NETFX_CORE
12 | [DllImport("kernel32.dll")]
13 | public static extern IntPtr LoadLibrary(string dllToLoad);
14 | #endif
15 |
16 | [DllImport("kernel32.dll")]
17 | public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName);
18 |
19 | [DllImport("kernel32.dll")]
20 | public static extern bool FreeLibrary(IntPtr hModule);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/NetworkChatDemo/TcpAudioSender.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 | using System.Net.Sockets;
4 |
5 | namespace NAudioDemo.NetworkChatDemo
6 | {
7 | class TcpAudioSender : IAudioSender
8 | {
9 | private readonly TcpClient tcpSender;
10 | public TcpAudioSender(IPEndPoint endPoint)
11 | {
12 | tcpSender = new TcpClient();
13 | tcpSender.Connect(endPoint);
14 | }
15 |
16 | public void Send(byte[] payload)
17 | {
18 | tcpSender.Client.Send(payload);
19 | }
20 |
21 | public void Dispose()
22 | {
23 | tcpSender?.Close();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IPropertyStore.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | ///
7 | /// is defined in propsys.h
8 | ///
9 | [Guid("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99"),
10 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
11 | interface IPropertyStore
12 | {
13 | int GetCount(out int propCount);
14 | int GetAt(int property, out PropertyKey key);
15 | int GetValue(ref PropertyKey key, out PropVariant value);
16 | int SetValue(ref PropertyKey key, ref PropVariant value);
17 | int Commit();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/DirectSound/DirectSoundTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using NUnit.Framework;
5 | using NAudio.Wave;
6 | using System.Diagnostics;
7 |
8 | namespace NAudioTests.DirectSound
9 | {
10 | [TestFixture]
11 | public class DirectSoundTests
12 | {
13 | [Test]
14 | [Category("IntegrationTest")]
15 | public void CanEnumerateDevices()
16 | {
17 | foreach(var device in DirectSoundOut.Devices)
18 | {
19 | Debug.WriteLine(String.Format("{0} {1} {2}", device.Description, device.ModuleName, device.Guid));
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/Mp3/ChannelMode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave
6 | {
7 | ///
8 | /// Channel Mode
9 | ///
10 | public enum ChannelMode
11 | {
12 | ///
13 | /// Stereo
14 | ///
15 | Stereo,
16 | ///
17 | /// Joint Stereo
18 | ///
19 | JointStereo,
20 | ///
21 | /// Dual Channel
22 | ///
23 | DualChannel,
24 | ///
25 | /// Mono
26 | ///
27 | Mono
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/Mp3/MpegVersion.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave
6 | {
7 | ///
8 | /// MPEG Version Flags
9 | ///
10 | public enum MpegVersion
11 | {
12 | ///
13 | /// Version 2.5
14 | ///
15 | Version25,
16 | ///
17 | /// Reserved
18 | ///
19 | Reserved,
20 | ///
21 | /// Version 2
22 | ///
23 | Version2,
24 | ///
25 | /// Version 1
26 | ///
27 | Version1
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Utils/WavePositionExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NAudio.Wave;
3 |
4 | namespace NAudio.Utils
5 | {
6 | ///
7 | /// WavePosition extension methods
8 | ///
9 | public static class WavePositionExtensions
10 | {
11 | ///
12 | /// Get Position as timespan
13 | ///
14 | public static TimeSpan GetPositionTimeSpan(this IWavePosition @this)
15 | {
16 | var pos = @this.GetPosition() / (@this.OutputWaveFormat.Channels * @this.OutputWaveFormat.BitsPerSample / 8);
17 | return TimeSpan.FromMilliseconds(pos * 1000.0 / @this.OutputWaveFormat.SampleRate);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/SampleChunkConverters/ISampleChunkConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave.SampleProviders
6 | {
7 | ///
8 | /// Sample provider interface to make WaveChannel32 extensible
9 | /// Still a bit ugly, hence internal at the moment - and might even make these into
10 | /// bit depth converting WaveProviders
11 | ///
12 | interface ISampleChunkConverter
13 | {
14 | bool Supports(WaveFormat format);
15 | void LoadNextChunk(IWaveProvider sourceProvider, int samplePairsRequired);
16 | bool GetNextSample(out float sampleLeft, out float sampleRight);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/AudioSessionNotification.cs:
--------------------------------------------------------------------------------
1 | using NAudio.CoreAudioApi.Interfaces;
2 | using System;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 |
6 | namespace NAudio.CoreAudioApi
7 | {
8 | internal class AudioSessionNotification : IAudioSessionNotification
9 | {
10 | private AudioSessionManager parent;
11 |
12 | internal AudioSessionNotification(AudioSessionManager parent)
13 | {
14 | this.parent = parent;
15 | }
16 |
17 | [PreserveSig]
18 | public int OnSessionCreated(IAudioSessionControl newSession)
19 | {
20 | parent.FireSessionCreated(newSession);
21 | return 0;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/IEnumDmo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.Dmo
5 | {
6 | [Guid("2c3cd98a-2bfa-4a53-9c27-5249ba64ba0f"),
7 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
8 | interface IEnumDmo
9 | {
10 | // int Next(int itemsToFetch, CLSID[] clsids, string[] names, out int itemsFetched);
11 | // lets do one at a time to keep it simple - don't call with itemsToFetch > 1
12 | int Next(int itemsToFetch, out Guid clsid, out IntPtr name, out int itemsFetched);
13 |
14 | int Skip(int itemsToSkip);
15 |
16 | int Reset();
17 |
18 | int Clone(out IEnumDmo enumPointer);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/AudioPlaybackDemo/PolygonWaveFormVisualization.cs:
--------------------------------------------------------------------------------
1 | namespace NAudioWpfDemo.AudioPlaybackDemo
2 | {
3 | class PolygonWaveFormVisualization : IVisualizationPlugin
4 | {
5 | private readonly PolygonWaveFormControl polygonWaveFormControl = new PolygonWaveFormControl();
6 |
7 | public string Name => "Polygon WaveForm Visualization";
8 |
9 | public object Content => polygonWaveFormControl;
10 |
11 | public void OnMaxCalculated(float min, float max)
12 | {
13 | polygonWaveFormControl.AddValue(max, min);
14 | }
15 |
16 | public void OnFftCalculated(NAudio.Dsp.Complex[] result)
17 | {
18 | // nothing to do
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/ModuleBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Controls;
3 |
4 | namespace NAudioWpfDemo
5 | {
6 | abstract class ModuleBase : IModule
7 | {
8 | private UserControl view;
9 |
10 | protected abstract UserControl CreateViewAndViewModel();
11 |
12 | public abstract string Name { get; }
13 |
14 | public UserControl UserInterface => view ?? (view = CreateViewAndViewModel());
15 |
16 | public void Deactivate()
17 | {
18 | if (view != null)
19 | {
20 | var d = view.DataContext as IDisposable;
21 | d?.Dispose();
22 | view = null;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/IWMResamplerProps.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.Dmo
5 | {
6 | ///
7 | /// Windows Media Resampler Props
8 | /// wmcodecdsp.h
9 | ///
10 | [Guid("E7E9984F-F09F-4da4-903F-6E2E0EFE56B5"),
11 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
12 | interface IWMResamplerProps
13 | {
14 | ///
15 | /// Range is 1 to 60
16 | ///
17 | int SetHalfFilterLength(int outputQuality);
18 |
19 | ///
20 | /// Specifies the channel matrix.
21 | ///
22 | int SetUserChannelMtx([In] float[] channelConversionMatrix);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/AudioPlaybackDemo/SpectrumAnalyzerVisualization.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 |
4 | namespace NAudioWpfDemo.AudioPlaybackDemo
5 | {
6 | class SpectrumAnalyzerVisualization : IVisualizationPlugin
7 | {
8 | private readonly SpectrumAnalyser spectrumAnalyser = new SpectrumAnalyser();
9 |
10 | public string Name => "Spectrum Analyser";
11 |
12 | public object Content => spectrumAnalyser;
13 |
14 | public void OnMaxCalculated(float min, float max)
15 | {
16 | // nothing to do
17 | }
18 |
19 | public void OnFftCalculated(NAudio.Dsp.Complex[] result)
20 | {
21 | spectrumAnalyser.Update(result);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/AudioPlaybackDemo/PolylineWaveFormVisualization.cs:
--------------------------------------------------------------------------------
1 | namespace NAudioWpfDemo.AudioPlaybackDemo
2 | {
3 | class PolylineWaveFormVisualization : IVisualizationPlugin
4 | {
5 | private readonly PolylineWaveFormControl polylineWaveFormControl = new PolylineWaveFormControl();
6 |
7 | public string Name => "Polyline WaveForm Visualization";
8 |
9 | public object Content => polylineWaveFormControl;
10 |
11 | public void OnMaxCalculated(float min, float max)
12 | {
13 | polylineWaveFormControl.AddValue(max, min);
14 | }
15 |
16 | public void OnFftCalculated(NAudio.Dsp.Complex[] result)
17 | {
18 | // nothing to do
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/Docs/PlayAudioFromUrl.md:
--------------------------------------------------------------------------------
1 | # Play Audio From URL
2 |
3 | The `MediaFoundationReader` class provides the capability of playing audio directly from a URL and supports many common audio file formats such as MP3.
4 |
5 | In this example designed to be run from a console app, we use `MediaFoundationReader` to load the audio from the network and then simply block until playback has finished.
6 |
7 | ```c#
8 | var url = "http://media.ch9.ms/ch9/2876/fd36ef30-cfd2-4558-8412-3cf7a0852876/AzureWebJobs103.mp3";
9 | using(var mf = new MediaFoundationReader(url))
10 | using(var wo = new WaveOutEvent())
11 | {
12 | wo.Init(mf);
13 | wo.Play();
14 | while (wo.PlaybackState == PlaybackState.Playing)
15 | {
16 | Thread.Sleep(1000);
17 | }
18 | }
19 | ```
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | -1
7 |
8 |
9 | True
10 |
11 |
12 | 5
13 |
14 |
15 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/SoundFont/SFVersion.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace NAudio.SoundFont
5 | {
6 | ///
7 | /// SoundFont Version Structure
8 | ///
9 | public class SFVersion
10 | {
11 | private short major;
12 | private short minor;
13 |
14 | ///
15 | /// Major Version
16 | ///
17 | public short Major
18 | {
19 | get
20 | {
21 | return major;
22 | }
23 | set
24 | {
25 | major = value;
26 | }
27 | }
28 |
29 | ///
30 | /// Minor Version
31 | ///
32 | public short Minor
33 | {
34 | get
35 | {
36 | return minor;
37 | }
38 | set
39 | {
40 | minor = value;
41 | }
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoInputDataBufferFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | ///
6 | /// DMO Input Data Buffer Flags
7 | ///
8 | [Flags]
9 | public enum DmoInputDataBufferFlags
10 | {
11 | ///
12 | /// None
13 | ///
14 | None,
15 | ///
16 | /// DMO_INPUT_DATA_BUFFERF_SYNCPOINT
17 | ///
18 | SyncPoint = 0x00000001,
19 | ///
20 | /// DMO_INPUT_DATA_BUFFERF_TIME
21 | ///
22 | Time = 0x00000002,
23 | ///
24 | /// DMO_INPUT_DATA_BUFFERF_TIMELENGTH
25 | ///
26 | TimeLength = 0x00000004
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Role.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.CoreAudioApi
4 | {
5 | ///
6 | /// The ERole enumeration defines constants that indicate the role
7 | /// that the system has assigned to an audio endpoint device
8 | ///
9 | public enum Role
10 | {
11 | ///
12 | /// Games, system notification sounds, and voice commands.
13 | ///
14 | Console,
15 |
16 | ///
17 | /// Music, movies, narration, and live music recording
18 | ///
19 | Multimedia,
20 |
21 | ///
22 | /// Voice communications (talking to another person).
23 | ///
24 | Communications,
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/Effect/ChorusPhase.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.Dmo.Effect
2 | {
3 | ///
4 | /// Chorus Phase
5 | ///
6 | public enum ChorusPhase : int
7 | {
8 | ///
9 | /// DSFXCHORUS_PHASE_NEG_180
10 | ///
11 | Neg180 = 0,
12 | ///
13 | /// DSFXCHORUS_PHASE_NEG_90
14 | ///
15 | Neg90 = 1,
16 | ///
17 | /// DSFXCHORUS_PHASE_ZERO
18 | ///
19 | Zero = 2,
20 | ///
21 | /// DSFXCHORUS_PHASE_90
22 | ///
23 | Pos90 = 3,
24 | ///
25 | /// DSFXCHORUS_PHASE_180
26 | ///
27 | Pos180 = 4,
28 | }
29 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/Effect/IDmoEffector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo.Effect
4 | {
5 | ///
6 | /// Interface of DMO Effectors
7 | ///
8 | /// Parameters of the effect to be used
9 | public interface IDmoEffector : IDisposable
10 | {
11 | ///
12 | /// Media Object
13 | ///
14 | MediaObject MediaObject { get; }
15 |
16 | ///
17 | /// Media Object InPlace
18 | ///
19 | MediaObjectInPlace MediaObjectInPlace { get; }
20 |
21 | ///
22 | /// Effect Parameter
23 | ///
24 | TParameters EffectParams { get; }
25 | }
26 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/AudioClientBufferFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.CoreAudioApi
4 | {
5 | ///
6 | /// Audio Client Buffer Flags
7 | ///
8 | [Flags]
9 | public enum AudioClientBufferFlags
10 | {
11 | ///
12 | /// None
13 | ///
14 | None,
15 | ///
16 | /// AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY
17 | ///
18 | DataDiscontinuity = 0x1,
19 | ///
20 | /// AUDCLNT_BUFFERFLAGS_SILENT
21 | ///
22 | Silent = 0x2,
23 | ///
24 | /// AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR
25 | ///
26 | TimestampError = 0x4
27 |
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | ///
6 | /// Contains the name and CLSID of a DirectX Media Object
7 | ///
8 | public class DmoDescriptor
9 | {
10 | ///
11 | /// Name
12 | ///
13 | public string Name { get; private set; }
14 |
15 | ///
16 | /// CLSID
17 | ///
18 | public Guid Clsid { get; private set; }
19 |
20 | ///
21 | /// Initializes a new instance of DmoDescriptor
22 | ///
23 | public DmoDescriptor(string name, Guid clsid)
24 | {
25 | Name = name;
26 | Clsid = clsid;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/Effect/FlangerPhase.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.Dmo.Effect
2 | {
3 | ///
4 | /// Flanger Phase
5 | ///
6 | public enum FlangerPhase : int
7 | {
8 | ///
9 | /// DSFXFLANGER_PHASE_NEG_180
10 | ///
11 | Neg180 = 0,
12 | ///
13 | /// DSFXFLANGER_PHASE_NEG_90
14 | ///
15 | Neg90 = 1,
16 | ///
17 | /// DSFXFLANGER_PHASE_ZERO
18 | ///
19 | Zero = 2,
20 | ///
21 | /// DSFXFLANGER_PHASE_90
22 | ///
23 | Pos90 = 3,
24 | ///
25 | /// DSFXFLANGER_PHASE_180
26 | ///
27 | Pos180 = 4,
28 | }
29 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows;
4 | using NAudioWpfDemo.Utils;
5 |
6 | namespace NAudioWpfDemo
7 | {
8 | ///
9 | /// Interaction logic for App.xaml
10 | ///
11 | public partial class App : Application
12 | {
13 | private void Application_Startup(object sender, StartupEventArgs e)
14 | {
15 | var mainWindow = new MainWindow();
16 |
17 | var modules = ReflectionHelper.CreateAllInstancesOf();
18 |
19 | var vm = new MainWindowViewModel(modules);
20 | mainWindow.DataContext = vm;
21 | mainWindow.Closing += (s, args) => vm.SelectedModule.Deactivate();
22 | mainWindow.Show();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IMMDevice.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | [Guid("D666063F-1587-4E43-81F1-B948E807363F"),
7 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
8 | interface IMMDevice
9 | {
10 | // activationParams is a propvariant
11 | int Activate(ref Guid id, ClsCtx clsCtx, IntPtr activationParams,
12 | [MarshalAs(UnmanagedType.IUnknown)] out object interfacePointer);
13 |
14 | int OpenPropertyStore(StorageAccessMode stgmAccess, out IPropertyStore properties);
15 |
16 | int GetId([MarshalAs(UnmanagedType.LPWStr)] out string id);
17 |
18 | int GetState(out DeviceState state);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/StopwatchExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Diagnostics;
6 |
7 | namespace System.Diagnostics
8 | {
9 | public static class StopwatchExtensions
10 | {
11 | public static long Time(this Stopwatch sw, Action action, int iterations)
12 | {
13 | sw.Reset();
14 | sw.Start();
15 | for (int i = 0; i < iterations; i++)
16 | {
17 | action();
18 | }
19 | sw.Stop();
20 |
21 | return sw.ElapsedMilliseconds;
22 | }
23 |
24 | public static long Time(this Stopwatch sw, Action action)
25 | {
26 | return Time(sw, action, 1);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/PropertyKey.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.CoreAudioApi
4 | {
5 | ///
6 | /// PROPERTYKEY is defined in wtypes.h
7 | ///
8 | public struct PropertyKey
9 | {
10 | ///
11 | /// Format ID
12 | ///
13 | public Guid formatId;
14 | ///
15 | /// Property ID
16 | ///
17 | public int propertyId;
18 | ///
19 | ///
20 | ///
21 | ///
22 | public PropertyKey(Guid formatId, int propertyId)
23 | {
24 | this.formatId = formatId;
25 | this.propertyId = propertyId;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/MmeInterop/WaveCallbackStrategy.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave
6 | {
7 | ///
8 | /// Wave Callback Strategy
9 | ///
10 | public enum WaveCallbackStrategy
11 | {
12 | ///
13 | /// Use a function
14 | ///
15 | FunctionCallback,
16 | ///
17 | /// Create a new window (should only be done if on GUI thread)
18 | ///
19 | NewWindow,
20 | ///
21 | /// Use an existing window handle
22 | ///
23 | ExistingWindow,
24 | ///
25 | /// Use an event handle
26 | ///
27 | Event,
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/SoundFont/StructureBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Collections;
5 |
6 | namespace NAudio.SoundFont
7 | {
8 |
9 | ///
10 | /// base class for structures that can read themselves
11 | ///
12 | internal abstract class StructureBuilder
13 | {
14 | protected List data;
15 |
16 | public StructureBuilder()
17 | {
18 | Reset();
19 | }
20 |
21 | public abstract T Read(BinaryReader br);
22 | public abstract void Write(BinaryWriter bw,T o);
23 | public abstract int Length { get; }
24 |
25 | public void Reset()
26 | {
27 | data = new List();
28 | }
29 |
30 | public T[] Data
31 | {
32 | get
33 | {
34 | return data.ToArray();
35 | }
36 | }
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/MmeInterop/WaveOutSupport.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Wave
4 | {
5 | ///
6 | /// Flags indicating what features this WaveOut device supports
7 | ///
8 | [Flags]
9 | enum WaveOutSupport
10 | {
11 | /// supports pitch control (WAVECAPS_PITCH)
12 | Pitch = 0x0001,
13 | /// supports playback rate control (WAVECAPS_PLAYBACKRATE)
14 | PlaybackRate = 0x0002,
15 | /// supports volume control (WAVECAPS_VOLUME)
16 | Volume = 0x0004,
17 | /// supports separate left-right volume control (WAVECAPS_LRVOLUME)
18 | LRVolume = 0x0008,
19 | /// (WAVECAPS_SYNC)
20 | Sync = 0x0010,
21 | /// (WAVECAPS_SAMPLEACCURATE)
22 | SampleAccurate = 0x0020,
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/azure-pipelines.yml:
--------------------------------------------------------------------------------
1 | # .NET Desktop
2 | # Build and run tests for .NET Desktop or Windows classic desktop solutions.
3 | # Add steps that publish symbols, save build artifacts, and more:
4 | # https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
5 |
6 | pool:
7 | vmImage: 'VS2017-Win2016'
8 |
9 | variables:
10 | solution: '**/*.sln'
11 | buildPlatform: 'Any CPU'
12 | buildConfiguration: 'Release'
13 |
14 | steps:
15 | - task: NuGetToolInstaller@0
16 |
17 | - task: NuGetCommand@2
18 | inputs:
19 | restoreSolution: '$(solution)'
20 |
21 | - task: VSBuild@1
22 | inputs:
23 | solution: '$(solution)'
24 | platform: '$(buildPlatform)'
25 | configuration: '$(buildConfiguration)'
26 |
27 | - task: VSTest@2
28 | inputs:
29 | platform: '$(buildPlatform)'
30 | configuration: '$(buildConfiguration)'
31 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/MediaFoundation/_MFT_PROCESS_OUTPUT_FLAGS.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.MediaFoundation
4 | {
5 | ///
6 | /// Defines flags for processing output samples in a Media Foundation transform (MFT).
7 | ///
8 | [Flags]
9 | public enum _MFT_PROCESS_OUTPUT_FLAGS
10 | {
11 | ///
12 | /// None
13 | ///
14 | None,
15 | ///
16 | /// Do not produce output for streams in which the pSample member of the MFT_OUTPUT_DATA_BUFFER structure is NULL.
17 | ///
18 | MFT_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER = 0x00000001,
19 | ///
20 | /// Regenerates the last output sample.
21 | ///
22 | MFT_PROCESS_OUTPUT_REGENERATE_LAST_OUTPUT = 0x00000002
23 | }
24 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Compression/AcmDriverAddFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave.Compression
6 | {
7 | ///
8 | /// Flags for use with acmDriverAdd
9 | ///
10 | enum AcmDriverAddFlags
11 | {
12 | // also ACM_DRIVERADDF_TYPEMASK = 0x00000007;
13 |
14 | ///
15 | /// ACM_DRIVERADDF_LOCAL
16 | ///
17 | Local = 0,
18 | ///
19 | /// ACM_DRIVERADDF_GLOBAL
20 | ///
21 | Global = 8,
22 | ///
23 | /// ACM_DRIVERADDF_FUNCTION
24 | ///
25 | Function = 3,
26 | ///
27 | /// ACM_DRIVERADDF_NOTIFYHWND
28 | ///
29 | NotifyWindowHandle = 4,
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/WaveStreams/ChunkIdentifierTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using NAudio.Utils;
6 | using NAudio.Wave;
7 | using NUnit.Framework;
8 |
9 | namespace NAudioTests.WaveStreams
10 | {
11 | [TestFixture]
12 | public class ChunkIdentifierTests
13 | {
14 | [TestCase("WAVE")]
15 | [TestCase("data")]
16 | [TestCase("fmt ")]
17 | [TestCase("RF64")]
18 | [TestCase("ds64")]
19 | [TestCase("labl")]
20 | [TestCase("cue ")]
21 | public void CanConvertChunkIndentiferToInt(string chunkIdentifier)
22 | {
23 | var x = WaveInterop.mmioStringToFOURCC(chunkIdentifier, 0);
24 | Assert.AreEqual(x, ChunkIdentifier.ChunkIdentifierToInt32(chunkIdentifier));
25 | }
26 |
27 |
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/WaveStreams/MonoToStereoSampleProviderTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NAudio.Wave;
3 | using NUnit.Framework;
4 |
5 | namespace NAudioTests.WaveStreams
6 | {
7 | [Category("UnitTest")]
8 | public class MonoToStereoSampleProviderTests
9 | {
10 | [Test]
11 | public void LeftChannelOnly()
12 | {
13 | var stereoStream = new TestSampleProvider(44100,1).ToStereo(1.0f, 0.0f);
14 | var buffer = new float[2000];
15 | var read = stereoStream.Read(buffer, 0, 2000);
16 | Assert.AreEqual(2000, read);
17 | for (int n = 0; n < read; n+=2)
18 | {
19 | Assert.AreEqual(n/2, buffer[n], String.Format("left sample[{0}]",n));
20 | Assert.AreEqual(0, buffer[n+1], String.Format("right sample[{0}]",n+1));
21 | }
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/AudioFileInspector/FindForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace AudioFileInspector
10 | {
11 | public partial class FindForm : Form
12 | {
13 | RichTextBox richTextBox;
14 | public FindForm(RichTextBox richTextBox)
15 | {
16 | InitializeComponent();
17 | this.richTextBox = richTextBox;
18 | }
19 |
20 | private void buttonFind_Click(object sender, EventArgs e)
21 | {
22 | richTextBox.Find(textBoxFind.Text,
23 | richTextBox.SelectionStart +
24 | richTextBox.SelectionLength,
25 | RichTextBoxFinds.None);
26 | richTextBox.ScrollToCaret();
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IAudioSessionNotification.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Runtime.InteropServices;
4 |
5 | namespace NAudio.CoreAudioApi.Interfaces
6 | {
7 | ///
8 | /// Windows CoreAudio IAudioSessionNotification interface
9 | /// Defined in AudioPolicy.h
10 | ///
11 | [Guid("641DD20B-4D41-49CC-ABA3-174B9477BB08"),
12 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
13 | public interface IAudioSessionNotification
14 | {
15 |
16 | ///
17 | ///
18 | ///
19 | /// session being added
20 | /// An HRESULT code indicating whether the operation succeeded of failed.
21 | [PreserveSig]
22 | int OnSessionCreated(IAudioSessionControl newSession);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IMMDeviceEnumerator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | [Guid("A95664D2-9614-4F35-A746-DE8DB63617E6"),
7 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
8 | interface IMMDeviceEnumerator
9 | {
10 | int EnumAudioEndpoints(DataFlow dataFlow, DeviceState stateMask,
11 | out IMMDeviceCollection devices);
12 |
13 | [PreserveSig]
14 | int GetDefaultAudioEndpoint(DataFlow dataFlow, Role role, out IMMDevice endpoint);
15 |
16 | int GetDevice(string id, out IMMDevice deviceName);
17 |
18 | int RegisterEndpointNotificationCallback(IMMNotificationClient client);
19 |
20 | int UnregisterEndpointNotificationCallback(IMMNotificationClient client);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/IMediaObjectInPlace.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.Dmo
5 | {
6 | ///
7 | /// defined in mediaobj.h
8 | ///
9 | [ComImport, System.Security.SuppressUnmanagedCodeSecurity,
10 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
11 | Guid("651B9AD0-0FC7-4AA9-9538-D89931010741")]
12 | internal interface IMediaObjectInPlace
13 | {
14 | [PreserveSig]
15 | int Process(
16 | [In] int size,
17 | [In] IntPtr data,
18 | [In] long refTimeStart,
19 | [In] DmoInPlaceProcessFlags dwFlags);
20 |
21 | [PreserveSig]
22 | int Clone([MarshalAs(UnmanagedType.Interface)] out IMediaObjectInPlace mediaObjectInPlace);
23 |
24 | [PreserveSig]
25 | int GetLatency(out long latencyTime);
26 | }
27 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Compression/WaveFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.Wave.Compression
5 | {
6 | ///
7 | /// Summary description for WaveFilter.
8 | ///
9 | [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
10 | public class WaveFilter
11 | {
12 | ///
13 | /// cbStruct
14 | ///
15 | public int StructureSize = Marshal.SizeOf(typeof(WaveFilter));
16 | ///
17 | /// dwFilterTag
18 | ///
19 | public int FilterTag = 0;
20 | ///
21 | /// fdwFilter
22 | ///
23 | public int Filter = 0;
24 | ///
25 | /// reserved
26 | ///
27 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=5)]
28 | public int []Reserved = null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/WasapiCaptureDemo/WasapiCaptureDemoPlugin.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace NAudioWpfDemo.WasapiCaptureDemo
4 | {
5 | class WasapiCaptureDemoPlugin : IModule
6 | {
7 | private WasapiCaptureViewModel viewModel;
8 | private WasapiCaptureDemoView view;
9 |
10 | public string Name => "WASAPI Capture";
11 |
12 | public UserControl UserInterface
13 | {
14 | get { if (view == null) CreateView(); return view; }
15 | }
16 |
17 | private void CreateView()
18 | {
19 | view = new WasapiCaptureDemoView();
20 | viewModel = new WasapiCaptureViewModel();
21 | view.DataContext = viewModel;
22 | }
23 |
24 | public void Deactivate()
25 | {
26 | viewModel.Dispose();
27 | view = null;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/MediaFoundation/MFT_OUTPUT_STREAM_INFO.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | namespace NAudio.MediaFoundation
4 | {
5 | ///
6 | /// Contains information about an output stream on a Media Foundation transform (MFT).
7 | ///
8 | [StructLayout(LayoutKind.Sequential)]
9 | public struct MFT_OUTPUT_STREAM_INFO
10 | {
11 | ///
12 | /// Bitwise OR of zero or more flags from the _MFT_OUTPUT_STREAM_INFO_FLAGS enumeration.
13 | ///
14 | public _MFT_OUTPUT_STREAM_INFO_FLAGS dwFlags;
15 | ///
16 | /// Minimum size of each output buffer, in bytes.
17 | ///
18 | public int cbSize;
19 | ///
20 | /// The memory alignment required for output buffers.
21 | ///
22 | public int cbAlignment;
23 | }
24 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/EqualizationDemo/EqualizationDemoPlugin.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace NAudioWpfDemo.EqualizationDemo
4 | {
5 | class EqualizationPlaybackDemoPlugin : IModule
6 | {
7 | private EqualizationDemoView view;
8 | private EqualizationDemoViewModel viewModel;
9 |
10 | public string Name => "Graphic EQ";
11 |
12 | public UserControl UserInterface
13 | {
14 | get { if (view == null) CreateView(); return view; }
15 | }
16 |
17 | private void CreateView()
18 | {
19 | view = new EqualizationDemoView();
20 | viewModel = new EqualizationDemoViewModel();
21 | view.DataContext = viewModel;
22 | }
23 |
24 | public void Deactivate()
25 | {
26 | viewModel.Dispose();
27 | view = null;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/AudioPlaybackDemo/DirectSoundOutSettingsPanel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Forms;
4 | using NAudio.Wave;
5 |
6 | namespace NAudioDemo.AudioPlaybackDemo
7 | {
8 | public partial class DirectSoundOutSettingsPanel : UserControl
9 | {
10 | public DirectSoundOutSettingsPanel()
11 | {
12 | InitializeComponent();
13 | InitialiseDirectSoundControls();
14 | }
15 |
16 | private void InitialiseDirectSoundControls()
17 | {
18 | comboBoxDirectSound.DisplayMember = "Description";
19 | comboBoxDirectSound.ValueMember = "Guid";
20 | comboBoxDirectSound.DataSource = DirectSoundOut.Devices;
21 | }
22 |
23 | public Guid SelectedDevice
24 | {
25 | get { return (Guid)comboBoxDirectSound.SelectedValue; }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoOutputDataBufferFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | ///
6 | /// DMO Output Data Buffer Flags
7 | ///
8 | [Flags]
9 | public enum DmoOutputDataBufferFlags
10 | {
11 | ///
12 | /// None
13 | ///
14 | None,
15 | ///
16 | /// DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT
17 | ///
18 | SyncPoint = 0x00000001,
19 | ///
20 | /// DMO_OUTPUT_DATA_BUFFERF_TIME
21 | ///
22 | Time = 0x00000002,
23 | ///
24 | /// DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH
25 | ///
26 | TimeLength = 0x00000004,
27 | ///
28 | /// DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE
29 | ///
30 | Incomplete = 0x01000000
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/AudioClientStreamFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.CoreAudioApi
4 | {
5 | ///
6 | /// AUDCLNT_STREAMFLAGS
7 | ///
8 | [Flags]
9 | public enum AudioClientStreamFlags
10 | {
11 | ///
12 | /// None
13 | ///
14 | None,
15 | ///
16 | /// AUDCLNT_STREAMFLAGS_CROSSPROCESS
17 | ///
18 | CrossProcess = 0x00010000,
19 | ///
20 | /// AUDCLNT_STREAMFLAGS_LOOPBACK
21 | ///
22 | Loopback = 0x00020000,
23 | ///
24 | /// AUDCLNT_STREAMFLAGS_EVENTCALLBACK
25 | ///
26 | EventCallback = 0x00040000,
27 | ///
28 | /// AUDCLNT_STREAMFLAGS_NOPERSIST
29 | ///
30 | NoPersist = 0x00080000,
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/WaveOutputs/IWaveProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Wave
4 | {
5 | ///
6 | /// Generic interface for all WaveProviders.
7 | ///
8 | public interface IWaveProvider
9 | {
10 | ///
11 | /// Gets the WaveFormat of this WaveProvider.
12 | ///
13 | /// The wave format.
14 | WaveFormat WaveFormat { get; }
15 |
16 | ///
17 | /// Fill the specified buffer with wave data.
18 | ///
19 | /// The buffer to fill of wave data.
20 | /// Offset into buffer
21 | /// The number of bytes to read
22 | /// the number of bytes written to the buffer.
23 | int Read(byte[] buffer, int offset, int count);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Utils/ChunkIdentifier.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Text;
4 |
5 | namespace NAudio.Utils
6 | {
7 | ///
8 | /// Chunk Identifier helpers
9 | ///
10 | public class ChunkIdentifier
11 | {
12 | ///
13 | /// Chunk identifier to Int32 (replaces mmioStringToFOURCC)
14 | ///
15 | /// four character chunk identifier
16 | /// Chunk identifier as int 32
17 | public static int ChunkIdentifierToInt32(string s)
18 | {
19 | if (s.Length != 4) throw new ArgumentException("Must be a four character string");
20 | var bytes = Encoding.UTF8.GetBytes(s);
21 | if (bytes.Length != 4) throw new ArgumentException("Must encode to exactly four bytes");
22 | return BitConverter.ToInt32(bytes, 0);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Utils/FieldDescriptionAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Utils
4 | {
5 | ///
6 | /// Allows us to add descriptions to interop members
7 | ///
8 | [AttributeUsage(AttributeTargets.Field)]
9 | public class FieldDescriptionAttribute : Attribute
10 | {
11 | ///
12 | /// The description
13 | ///
14 | public string Description { get; }
15 |
16 | ///
17 | /// Field description
18 | ///
19 | public FieldDescriptionAttribute(string description)
20 | {
21 | Description = description;
22 | }
23 |
24 | ///
25 | /// String representation
26 | ///
27 | ///
28 | public override string ToString()
29 | {
30 | return Description;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Compression/AcmFormatSuggestFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave.Compression
6 | {
7 | [Flags]
8 | enum AcmFormatSuggestFlags
9 | {
10 | ///
11 | /// ACM_FORMATSUGGESTF_WFORMATTAG
12 | ///
13 | FormatTag = 0x00010000,
14 | ///
15 | /// ACM_FORMATSUGGESTF_NCHANNELS
16 | ///
17 | Channels = 0x00020000,
18 | ///
19 | /// ACM_FORMATSUGGESTF_NSAMPLESPERSEC
20 | ///
21 | SamplesPerSecond = 0x00040000,
22 | ///
23 | /// ACM_FORMATSUGGESTF_WBITSPERSAMPLE
24 | ///
25 | BitsPerSample = 0x00080000,
26 | ///
27 | /// ACM_FORMATSUGGESTF_TYPEMASK
28 | ///
29 | TypeMask = 0x00FF0000,
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/FireAndForgetPlayback/AutoDisposeFileReader.cs:
--------------------------------------------------------------------------------
1 | using NAudio.Wave;
2 |
3 | namespace NAudioWpfDemo.FireAndForgetPlayback
4 | {
5 | class AutoDisposeFileReader : ISampleProvider
6 | {
7 | private readonly AudioFileReader reader;
8 | private bool isDisposed;
9 | public AutoDisposeFileReader(AudioFileReader reader)
10 | {
11 | this.reader = reader;
12 | WaveFormat = reader.WaveFormat;
13 | }
14 |
15 | public int Read(float[] buffer, int offset, int count)
16 | {
17 | if (isDisposed)
18 | return 0;
19 | int read = reader.Read(buffer, offset, count);
20 | if (read == 0)
21 | {
22 | reader.Dispose();
23 | isDisposed = true;
24 | }
25 | return read;
26 | }
27 |
28 | public WaveFormat WaveFormat { get; }
29 | }
30 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/SoundFont/SFSampleLink.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.SoundFont
2 | {
3 | ///
4 | /// Sample Link Type
5 | ///
6 | public enum SFSampleLink : ushort
7 | {
8 | ///
9 | /// Mono Sample
10 | ///
11 | MonoSample = 1,
12 | ///
13 | /// Right Sample
14 | ///
15 | RightSample = 2,
16 | ///
17 | /// Left Sample
18 | ///
19 | LeftSample = 4,
20 | ///
21 | /// Linked Sample
22 | ///
23 | LinkedSample = 8,
24 | ///
25 | /// ROM Mono Sample
26 | ///
27 | RomMonoSample = 0x8001,
28 | ///
29 | /// ROM Right Sample
30 | ///
31 | RomRightSample = 0x8002,
32 | ///
33 | /// ROM Left Sample
34 | ///
35 | RomLeftSample = 0x8004,
36 | ///
37 | /// ROM Linked Sample
38 | ///
39 | RomLinkedSample = 0x8008
40 | }
41 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/Docs/PlayAudioFileConsoleApp.md:
--------------------------------------------------------------------------------
1 | ## Play an Audio File from a Console application
2 |
3 | To play a file from a console application, we will use `AudioFileReader` as a simple way of opening our audio file, and `WaveOutEvent` as the output device.
4 |
5 | We simply need to pass the `audioFile` into the `outputDevice` with the `Init` method, and then call `Play`.
6 |
7 | Since `Play` only means "start playing" and isn't blocking, we can wait in a loop until playback finishes.
8 |
9 | Afterwards, we need to `Dispose` our `audioFile` and `outputDevice`, which in this example we do by virtue of putting them inside `using` blocks.
10 |
11 | ```c#
12 | using(var audioFile = new AudioFileReader(audioFile))
13 | using(var outputDevice = new WaveOutEvent())
14 | {
15 | outputDevice.Init(audioFile);
16 | outputDevice.Play();
17 | while (outputDevice.PlaybackState == PlaybackState.Playing)
18 | {
19 | Thread.Sleep(1000);
20 | }
21 | }
22 | ```
--------------------------------------------------------------------------------
/CashCommodities/MapleLib/WzLib/WzExtended.cs:
--------------------------------------------------------------------------------
1 | /* MapleLib - A general-purpose MapleStory library
2 | * Copyright (C) 2009, 2010, 2015 Snow and haha01haha01
3 |
4 | * This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | * This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .*/
16 |
17 | namespace MapleLib.WzLib
18 | {
19 | public abstract class WzExtended : WzImageProperty
20 | {
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Midi/MidiOutTechnology.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Midi
4 | {
5 | ///
6 | /// Represents the different types of technology used by a MIDI out device
7 | ///
8 | /// from mmsystem.h
9 | public enum MidiOutTechnology
10 | {
11 | /// The device is a MIDI port
12 | MidiPort = 1,
13 | /// The device is a MIDI synth
14 | Synth = 2,
15 | /// The device is a square wave synth
16 | SquareWaveSynth = 3,
17 | /// The device is an FM synth
18 | FMSynth = 4,
19 | /// The device is a MIDI mapper
20 | MidiMapper = 5,
21 | /// The device is a WaveTable synth
22 | WaveTableSynth = 6,
23 | /// The device is a software synth
24 | SoftwareSynth = 7
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/WaveStreams/SampleToWaveProvider24Tests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using NAudio.Wave;
7 | using NAudio.Wave.SampleProviders;
8 | using NUnit.Framework;
9 |
10 | namespace NAudioTests.WaveStreams
11 | {
12 | [TestFixture]
13 | public class SampleToWaveProvider24Tests
14 | {
15 | [Test]
16 | public void ConvertAFile()
17 | {
18 | const string input = @"C:\Users\Mark\Downloads\Region-1.wav";
19 | if (!File.Exists(input)) Assert.Ignore("Test file not found");
20 | using (var reader = new WaveFileReader(input))
21 | {
22 | var sp = reader.ToSampleProvider();
23 | var wp24 = new SampleToWaveProvider24(sp);
24 | WaveFileWriter.CreateWaveFile(@"C:\Users\Mark\Downloads\Region1-24.wav", wp24);
25 | }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/WaveOutputs/StoppedEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | // ReSharper disable once CheckNamespace
4 | namespace NAudio.Wave
5 | {
6 | ///
7 | /// Stopped Event Args
8 | ///
9 | public class StoppedEventArgs : EventArgs
10 | {
11 | private readonly Exception exception;
12 |
13 | ///
14 | /// Initializes a new instance of StoppedEventArgs
15 | ///
16 | /// An exception to report (null if no exception)
17 | public StoppedEventArgs(Exception exception = null)
18 | {
19 | this.exception = exception;
20 | }
21 |
22 | ///
23 | /// An exception. Will be null if the playback or record operation stopped due to
24 | /// the user requesting stop or reached the end of the input audio
25 | ///
26 | public Exception Exception => exception;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/VolumeMixerDemo/IconExtractor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Drawing;
4 | using System.Linq;
5 | using System.Runtime.InteropServices;
6 | using System.Text;
7 |
8 | namespace NAudioDemo.VolumeMixerDemo
9 | {
10 | public class IconExtractor
11 | {
12 | public static Icon Extract(string file, int number, bool largeIcon)
13 | {
14 | IntPtr large;
15 | IntPtr small;
16 | ExtractIconEx(file, number, out large, out small, 1);
17 | try
18 | {
19 | return Icon.FromHandle(largeIcon ? large : small);
20 | }
21 | catch
22 | {
23 | return null;
24 | }
25 | }
26 |
27 | [DllImport("Shell32.dll")]
28 | private static extern int ExtractIconEx(string sFile, int iIndex, out IntPtr piLargeVersion, out IntPtr piSmallVersion, int amountIcons);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/EnumMediaFoundationTransforms/EnumMftView.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/FireAndForgetPlayback/CachedSoundSampleProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NAudio.Wave;
3 |
4 | namespace NAudioWpfDemo.FireAndForgetPlayback
5 | {
6 | class CachedSoundSampleProvider : ISampleProvider
7 | {
8 | private readonly CachedSound cachedSound;
9 | private long position;
10 |
11 | public CachedSoundSampleProvider(CachedSound cachedSound)
12 | {
13 | this.cachedSound = cachedSound;
14 | }
15 |
16 | public int Read(float[] buffer, int offset, int count)
17 | {
18 | var availableSamples = cachedSound.AudioData.Length - position;
19 | var samplesToCopy = Math.Min(availableSamples, count);
20 | Array.Copy(cachedSound.AudioData, position, buffer, offset, samplesToCopy);
21 | position += samplesToCopy;
22 | return (int)samplesToCopy;
23 | }
24 |
25 | public WaveFormat WaveFormat => cachedSound.WaveFormat;
26 | }
27 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IAudioCaptureClient.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | [Guid("C8ADBD64-E71E-48a0-A4DE-185C395CD317"),
7 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport]
8 | interface IAudioCaptureClient
9 | {
10 | /*HRESULT GetBuffer(
11 | BYTE** ppData,
12 | UINT32* pNumFramesToRead,
13 | DWORD* pdwFlags,
14 | UINT64* pu64DevicePosition,
15 | UINT64* pu64QPCPosition
16 | );*/
17 |
18 | int GetBuffer(
19 | out IntPtr dataBuffer,
20 | out int numFramesToRead,
21 | out AudioClientBufferFlags bufferFlags,
22 | out long devicePosition,
23 | out long qpcPosition);
24 |
25 | int ReleaseBuffer(int numFramesRead);
26 |
27 | int GetNextPacketSize(out int numFramesInNextPacket);
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/Utils/SampleProviderTestHelpers.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using NUnit.Framework;
4 | using NAudio.Wave;
5 |
6 | namespace NAudioTests.Utils
7 | {
8 | public static class SampleProviderTestHelpers
9 | {
10 | public static void AssertReadsExpected(this ISampleProvider sampleProvider, float[] expected)
11 | {
12 | AssertReadsExpected(sampleProvider, expected, expected.Length);
13 | }
14 |
15 | public static void AssertReadsExpected(this ISampleProvider sampleProvider, float[] expected, int readSize)
16 | {
17 | var buffer = new float[readSize];
18 | var read = sampleProvider.Read(buffer, 0, readSize);
19 | Assert.AreEqual(expected.Length, read, "Number of samples read");
20 | for (int n = 0; n < read; n++)
21 | {
22 | Assert.AreEqual(expected[n], buffer[n], $"Buffer at index {n}");
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/DrumMachineDemo/DrumMachineDemoPlugin.cs:
--------------------------------------------------------------------------------
1 | namespace NAudioWpfDemo.DrumMachineDemo
2 | {
3 | class DrumMachineDemoPlugin : IModule
4 | {
5 | private DrumMachineDemoView view;
6 | private DrumMachineDemoViewModel viewModel;
7 |
8 | public string Name => "Drum Machine";
9 |
10 | public System.Windows.Controls.UserControl UserInterface
11 | {
12 | get
13 | {
14 | if (view == null)
15 | {
16 | view = new DrumMachineDemoView();
17 | viewModel = new DrumMachineDemoViewModel(view.drumPatternEditor1.DrumPattern);
18 | view.DataContext = viewModel;
19 | }
20 | return view;
21 | }
22 | }
23 |
24 | public void Deactivate()
25 | {
26 | viewModel?.Dispose();
27 | view = null;
28 | viewModel = null;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/AudioPlaybackDemo/AsioOutPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using NAudio.Wave;
4 | using System.Windows.Forms;
5 |
6 | namespace NAudioDemo.AudioPlaybackDemo
7 | {
8 | class AsioOutPlugin : IOutputDevicePlugin
9 | {
10 | AsioOutSettingsPanel settingsPanel;
11 |
12 | public IWavePlayer CreateDevice(int latency)
13 | {
14 | return new AsioOut(settingsPanel.SelectedDeviceName);
15 | }
16 |
17 | public UserControl CreateSettingsPanel()
18 | {
19 | settingsPanel = new AsioOutSettingsPanel();
20 | return settingsPanel;
21 | }
22 |
23 | public string Name
24 | {
25 | get { return "AsioOut"; }
26 | }
27 |
28 | public bool IsAvailable
29 | {
30 | get { return AsioOut.isSupported(); }
31 | }
32 |
33 | public int Priority
34 | {
35 | get { return 4; }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/WaveStreams/WaveChannel32Tests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using NUnit.Framework;
5 | using NAudio.Wave;
6 | using NAudioTests.Utils;
7 | using System.IO;
8 |
9 | namespace NAudioTests.WaveStreams
10 | {
11 | [TestFixture]
12 | public class WaveChannel32Tests
13 | {
14 | [Test]
15 | [Category("IntegrationTest")]
16 | public void CanCreateWavFileFromWaveChannel32()
17 | {
18 | string inFile = @"F:\Recording\wav\pcm\16bit mono 8kHz.wav";
19 | string outFile = @"F:\Recording\wav\pcm\32bit stereo 8kHz.wav";
20 | if (!File.Exists(inFile))
21 | {
22 | Assert.Ignore("Input test file not found");
23 | }
24 | var audio32 = new WaveChannel32(new WaveFileReader(inFile));
25 | audio32.PadWithZeroes = false;
26 | WaveFileWriter.CreateWaveFile(outFile, audio32);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/SoundFont/Instrument.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.SoundFont
4 | {
5 | ///
6 | /// SoundFont instrument
7 | ///
8 | public class Instrument
9 | {
10 | private string name;
11 | internal ushort startInstrumentZoneIndex;
12 | internal ushort endInstrumentZoneIndex;
13 | private Zone[] zones;
14 |
15 | ///
16 | /// instrument name
17 | ///
18 | public string Name
19 | {
20 | get
21 | {
22 | return name;
23 | }
24 | set
25 | {
26 | // TODO: validate
27 | name = value;
28 | }
29 | }
30 |
31 | ///
32 | /// Zones
33 | ///
34 | public Zone[] Zones
35 | {
36 | get
37 | {
38 | return zones;
39 | }
40 | set
41 | {
42 | zones = value;
43 | }
44 | }
45 |
46 | ///
47 | ///
48 | ///
49 | public override string ToString()
50 | {
51 | return this.name;
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/MediaFoundation/MFT_OUTPUT_DATA_BUFFER.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | namespace NAudio.MediaFoundation
4 | {
5 | ///
6 | /// Contains information about an output buffer for a Media Foundation transform.
7 | ///
8 | [StructLayout(LayoutKind.Sequential)]
9 | public struct MFT_OUTPUT_DATA_BUFFER
10 | {
11 | ///
12 | /// Output stream identifier.
13 | ///
14 | public int dwStreamID;
15 | ///
16 | /// Pointer to the IMFSample interface.
17 | ///
18 | public IMFSample pSample;
19 | ///
20 | /// Before calling ProcessOutput, set this member to zero.
21 | ///
22 | public _MFT_OUTPUT_DATA_BUFFER_FLAGS dwStatus;
23 | ///
24 | /// Before calling ProcessOutput, set this member to NULL.
25 | ///
26 | public IMFCollection pEvents;
27 | }
28 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/SoundFont/ModulatorBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace NAudio.SoundFont {
5 | class ModulatorBuilder : StructureBuilder {
6 | public override Modulator Read(BinaryReader br)
7 | {
8 | Modulator m = new Modulator();
9 | m.SourceModulationData = new ModulatorType(br.ReadUInt16());
10 | m.DestinationGenerator = (GeneratorEnum) br.ReadUInt16();
11 | m.Amount = br.ReadInt16();
12 | m.SourceModulationAmount = new ModulatorType(br.ReadUInt16());
13 | m.SourceTransform = (TransformEnum) br.ReadUInt16();
14 | data.Add(m);
15 | return m;
16 | }
17 |
18 | public override void Write(BinaryWriter bw, Modulator o)
19 | {
20 | //Zone z = (Zone) o;
21 | //bw.Write(p.---);
22 | }
23 |
24 | public override int Length {
25 | get {
26 | return 10;
27 | }
28 | }
29 |
30 | public Modulator[] Modulators
31 | {
32 | get
33 | {
34 | return data.ToArray();
35 | }
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/SoundFont/SFVersionBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace NAudio.SoundFont
5 | {
6 | ///
7 | /// Builds a SoundFont version
8 | ///
9 | class SFVersionBuilder : StructureBuilder
10 | {
11 | ///
12 | /// Reads a SoundFont Version structure
13 | ///
14 | public override SFVersion Read(BinaryReader br)
15 | {
16 | SFVersion v = new SFVersion();
17 | v.Major = br.ReadInt16();
18 | v.Minor = br.ReadInt16();
19 | data.Add(v);
20 | return v;
21 | }
22 |
23 | ///
24 | /// Writes a SoundFont Version structure
25 | ///
26 | public override void Write(BinaryWriter bw, SFVersion v)
27 | {
28 | bw.Write(v.Major);
29 | bw.Write(v.Minor);
30 | }
31 |
32 | ///
33 | /// Gets the length of this structure
34 | ///
35 | public override int Length
36 | {
37 | get
38 | {
39 | return 4;
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/Utils/TestFileBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using NAudio.MediaFoundation;
4 | using NAudio.Wave;
5 | using NAudio.Wave.SampleProviders;
6 |
7 | namespace NAudioTests.Utils
8 | {
9 | static class TestFileBuilder
10 | {
11 | public static string CreateMp3File(int durationSeconds, int sampleRate=44100, int channels=2)
12 | {
13 | var testSignal = new SignalGenerator(sampleRate, channels) { Frequency = 1000, Gain = 0.25 }
14 | .Take(TimeSpan.FromSeconds(durationSeconds))
15 | .ToWaveProvider();
16 | var path = Path.Combine(Path.GetTempPath(), "NAudioTests");
17 | if (!Directory.Exists(path)) Directory.CreateDirectory(path);
18 | var file = Path.Combine(Path.GetTempPath(), @"NAudioTests\TestSignal.mp3");
19 | MediaFoundationApi.Startup();
20 | MediaFoundationEncoder.EncodeToMp3(testSignal, file, 96000);
21 | return file;
22 | }
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | NAudio
5 | @build.number@
6 | Mark Heath
7 | Mark Heath
8 | https://github.com/naudio/NAudio/blob/master/license.txt
9 | https://github.com/naudio/NAudio
10 | false
11 | NAudio, an audio library for .NET
12 |
13 | C# .NET audio sound
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Utils/MarshalHelpers.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.Utils
5 | {
6 | ///
7 | /// Support for Marshal Methods in both UWP and .NET 3.5
8 | ///
9 | public static class MarshalHelpers
10 | {
11 | ///
12 | /// SizeOf a structure
13 | ///
14 | public static int SizeOf()
15 | {
16 | return Marshal.SizeOf(typeof (T));
17 | }
18 |
19 | ///
20 | /// Offset of a field in a structure
21 | ///
22 | public static IntPtr OffsetOf(string fieldName)
23 | {
24 | return Marshal.OffsetOf(typeof(T), fieldName);
25 | }
26 |
27 | ///
28 | /// Pointer to Structure
29 | ///
30 | public static T PtrToStructure(IntPtr pointer)
31 | {
32 | return (T)Marshal.PtrToStructure(pointer, typeof(T));
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Mixer/CustomMixerControl.cs:
--------------------------------------------------------------------------------
1 | // created on 13/12/2002 at 22:07
2 | using System;
3 | using System.Runtime.InteropServices;
4 |
5 | namespace NAudio.Mixer
6 | {
7 | ///
8 | /// Custom Mixer control
9 | ///
10 | public class CustomMixerControl : MixerControl
11 | {
12 | internal CustomMixerControl(MixerInterop.MIXERCONTROL mixerControl, IntPtr mixerHandle, MixerFlags mixerHandleType, int nChannels)
13 | {
14 | this.mixerControl = mixerControl;
15 | this.mixerHandle = mixerHandle;
16 | this.mixerHandleType = mixerHandleType;
17 | this.nChannels = nChannels;
18 | this.mixerControlDetails = new MixerInterop.MIXERCONTROLDETAILS();
19 | GetControlDetails();
20 | }
21 |
22 | ///
23 | /// Get the data for this custom control
24 | ///
25 | /// pointer to memory to receive data
26 | protected override void GetDetails(IntPtr pDetails)
27 | {
28 | }
29 |
30 | // TODO: provide a way of getting / setting data
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/WaveInputs/IWaveIn.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | // ReSharper disable once CheckNamespace
4 | namespace NAudio.Wave
5 | {
6 | ///
7 | /// Generic interface for wave recording
8 | ///
9 | public interface IWaveIn : IDisposable
10 | {
11 | ///
12 | /// Recording WaveFormat
13 | ///
14 | WaveFormat WaveFormat { get; set; }
15 |
16 | ///
17 | /// Start Recording
18 | ///
19 | void StartRecording();
20 |
21 | ///
22 | /// Stop Recording
23 | ///
24 | void StopRecording();
25 |
26 | ///
27 | /// Indicates recorded data is available
28 | ///
29 | event EventHandler DataAvailable;
30 |
31 | ///
32 | /// Indicates that all recorded data has now been received.
33 | ///
34 | event EventHandler RecordingStopped;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/DataFlow.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.CoreAudioApi
2 | {
3 | ///
4 | /// The EDataFlow enumeration defines constants that indicate the direction
5 | /// in which audio data flows between an audio endpoint device and an application
6 | ///
7 | public enum DataFlow
8 | {
9 | ///
10 | /// Audio rendering stream.
11 | /// Audio data flows from the application to the audio endpoint device, which renders the stream.
12 | ///
13 | Render,
14 | ///
15 | /// Audio capture stream. Audio data flows from the audio endpoint device that captures the stream,
16 | /// to the application
17 | ///
18 | Capture,
19 | ///
20 | /// Audio rendering or capture stream. Audio data can flow either from the application to the audio
21 | /// endpoint device, or from the audio endpoint device to the application.
22 | ///
23 | All
24 | };
25 |
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/MediaFoundation/MediaFoundationReaderTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Linq;
4 | using NAudio.Wave;
5 | using NUnit.Framework;
6 |
7 | namespace NAudioTests.MediaFoundation
8 | {
9 | [TestFixture]
10 | [Category("IntegrationTest")]
11 | public class MediaFoundationReaderTests
12 | {
13 | [Test]
14 | public void CanReadAnAac()
15 | {
16 | var testFile = @"C:\Users\mheath\Downloads\NAudio\AAC\halfspeed.aac";
17 | if (!File.Exists(testFile)) Assert.Ignore("Missing test file");
18 | var reader = new MediaFoundationReader(testFile);
19 | Console.WriteLine(reader.WaveFormat);
20 | var buffer = new byte[reader.WaveFormat.AverageBytesPerSecond];
21 | int bytesRead;
22 | long total = 0;
23 | while((bytesRead = reader.Read(buffer, 0, buffer.Length)) > 0)
24 | {
25 | total += bytesRead;
26 | }
27 | Assert.IsTrue(total > 0);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Mixer/ListTextMixerControl.cs:
--------------------------------------------------------------------------------
1 | // created on 13/12/2002 at 22:06
2 | using System;
3 | using System.Runtime.InteropServices;
4 |
5 | namespace NAudio.Mixer
6 | {
7 | ///
8 | /// List text mixer control
9 | ///
10 | public class ListTextMixerControl : MixerControl
11 | {
12 | internal ListTextMixerControl(MixerInterop.MIXERCONTROL mixerControl, IntPtr mixerHandle, MixerFlags mixerHandleType, int nChannels)
13 | {
14 | this.mixerControl = mixerControl;
15 | this.mixerHandle = mixerHandle;
16 | this.mixerHandleType = mixerHandleType;
17 | this.nChannels = nChannels;
18 | this.mixerControlDetails = new MixerInterop.MIXERCONTROLDETAILS();
19 |
20 | GetControlDetails();
21 |
22 | }
23 |
24 | ///
25 | /// Get the details for this control
26 | ///
27 | /// Memory location to read to
28 | protected override void GetDetails(IntPtr pDetails)
29 | {
30 | }
31 |
32 | // TODO: provide a way of getting / setting data
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/Mp3/IMp3FrameDecompressor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave
6 | {
7 | ///
8 | /// Interface for MP3 frame by frame decoder
9 | ///
10 | public interface IMp3FrameDecompressor : IDisposable
11 | {
12 | ///
13 | /// Decompress a single MP3 frame
14 | ///
15 | /// Frame to decompress
16 | /// Output buffer
17 | /// Offset within output buffer
18 | /// Bytes written to output buffer
19 | int DecompressFrame(Mp3Frame frame, byte[] dest, int destOffset);
20 |
21 | ///
22 | /// Tell the decoder that we have repositioned
23 | ///
24 | void Reset();
25 |
26 | ///
27 | /// PCM format that we are converting into
28 | ///
29 | WaveFormat OutputFormat { get; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/WaveOutputs/IWaveProviderFloat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave
6 | {
7 | ///
8 | /// Like IWaveProvider, but makes it much simpler to put together a 32 bit floating
9 | /// point mixing engine
10 | ///
11 | public interface ISampleProvider
12 | {
13 | ///
14 | /// Gets the WaveFormat of this Sample Provider.
15 | ///
16 | /// The wave format.
17 | WaveFormat WaveFormat { get; }
18 |
19 | ///
20 | /// Fill the specified buffer with 32 bit floating point samples
21 | ///
22 | /// The buffer to fill with samples.
23 | /// Offset into buffer
24 | /// The number of samples to read
25 | /// the number of samples written to the buffer.
26 | int Read(float[] buffer, int offset, int count);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/Utils/ByteEncodingTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using NAudio.Utils;
4 | using NUnit.Framework;
5 |
6 | namespace NAudioTests.Utils
7 | {
8 | [TestFixture]
9 | public class ByteEncodingTests
10 | {
11 | [Test]
12 | public void CanDecodeString()
13 | {
14 | var b = new byte[] { (byte)'H', (byte)'e', (byte)'l', (byte)'l', (byte)'o', };
15 | Assert.AreEqual("Hello", ByteEncoding.Instance.GetString(b));
16 | }
17 |
18 | [Test]
19 | public void CanTruncate()
20 | {
21 | var b = new byte[] {(byte) 'H', (byte) 'e', (byte) 'l', (byte) 'l', (byte) 'o', 0};
22 | Assert.AreEqual("Hello", ByteEncoding.Instance.GetString(b));
23 | }
24 |
25 | [Test]
26 | public void CanTruncateWithThreeParamOverride()
27 | {
28 | var b = new byte[] { (byte)'H', (byte)'e', (byte)'l', (byte)'l', (byte)'o', 0 };
29 | Assert.AreEqual("Hello", ByteEncoding.Instance.GetString(b,0,b.Length));
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/FireAndForgetPlayback/FireAndForgetDemoPlugin.cs:
--------------------------------------------------------------------------------
1 | namespace NAudioWpfDemo.FireAndForgetPlayback
2 | {
3 | class FireAndForgetPlaybackDemoPlugin : IModule
4 | {
5 | private FireAndForgetPlaybackView view;
6 | private FireAndForgetPlaybackViewModel viewModel;
7 |
8 | public string Name => "Fire and Forget";
9 |
10 | public System.Windows.Controls.UserControl UserInterface
11 | {
12 | get
13 | {
14 | if (view == null)
15 | {
16 | view = new FireAndForgetPlaybackView();
17 | viewModel = new FireAndForgetPlaybackViewModel();
18 | view.DataContext = viewModel;
19 | }
20 | return view;
21 | }
22 | }
23 |
24 | public void Deactivate()
25 | {
26 | if (view != null)
27 | {
28 | viewModel.Dispose();
29 | view = null;
30 | viewModel = null;
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/CashCommodities/MapleLib/PacketLib/SessionType.cs:
--------------------------------------------------------------------------------
1 | /* MapleLib - A general-purpose MapleStory library
2 | * Copyright (C) 2009, 2010, 2015 Snow and haha01haha01
3 |
4 | * This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | * This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .*/
16 |
17 | using System;
18 | using System.Collections.Generic;
19 | using System.Linq;
20 | using System.Text;
21 |
22 | namespace MapleLib.PacketLib
23 | {
24 | public enum SessionType
25 | {
26 | SERVER_TO_CLIENT,
27 | CLIENT_TO_SERVER
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio.Universal/Utils/MarshalHelpers.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Runtime.InteropServices;
4 |
5 | // ReSharper disable once CheckNamespace
6 | namespace NAudio.Utils
7 | {
8 | ///
9 | /// Support for Marshal Methods in both UWP and .NET 3.5
10 | ///
11 | public static class MarshalHelpers
12 | {
13 | ///
14 | /// SizeOf a structure
15 | ///
16 | public static int SizeOf()
17 | {
18 | return Marshal.SizeOf();
19 | }
20 |
21 | ///
22 | /// Offset of a field in a structure
23 | ///
24 | public static IntPtr OffsetOf(string fieldName)
25 | {
26 | return Marshal.OffsetOf(fieldName);
27 | }
28 |
29 | ///
30 | /// Pointer to Structure
31 | ///
32 | public static T PtrToStructure(IntPtr pointer)
33 | {
34 | return Marshal.PtrToStructure(pointer);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/DmoInterop.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using System.Runtime.InteropServices;
4 |
5 | namespace NAudio.Dmo
6 | {
7 | static class DmoInterop
8 | {
9 | [DllImport("msdmo.dll")]
10 | public static extern int DMOEnum(
11 | [In] ref Guid guidCategory,
12 | DmoEnumFlags flags,
13 | int inTypes,
14 | [In] DmoPartialMediaType[] inTypesArray,
15 | int outTypes,
16 | [In] DmoPartialMediaType[] outTypesArray,
17 | out IEnumDmo enumDmo);
18 |
19 | [DllImport("msdmo.dll")]
20 | public static extern int MoFreeMediaType(
21 | [In] ref DmoMediaType mediaType);
22 |
23 | [DllImport("msdmo.dll")]
24 | public static extern int MoInitMediaType(
25 | [In,Out] ref DmoMediaType mediaType, int formatBlockBytes);
26 |
27 | [DllImport("msdmo.dll")]
28 | public static extern int DMOGetName([In] ref Guid clsidDMO,
29 | // preallocate 80 characters
30 | [Out] StringBuilder name);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IAudioClock2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | ///
7 | /// Defined in AudioClient.h
8 | ///
9 | [Guid("CD63314F-3FBA-4a1b-812C-EF96358728E7"),
10 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
11 | internal interface IAudioClock
12 | {
13 | [PreserveSig]
14 | int GetFrequency(out ulong frequency);
15 |
16 | [PreserveSig]
17 | int GetPosition(out ulong devicePosition, out ulong qpcPosition);
18 |
19 | [PreserveSig]
20 | int GetCharacteristics(out uint characteristics);
21 | }
22 |
23 | ///
24 | /// Defined in AudioClient.h
25 | ///
26 | [Guid("6f49ff73-6727-49AC-A008-D98CF5E70048"),
27 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
28 | internal interface IAudioClock2 : IAudioClock
29 | {
30 | [PreserveSig]
31 | int GetDevicePosition(out ulong devicePosition, out ulong qpcPosition);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/CashCommodities/MapleLib/WzLib/WzObjectType.cs:
--------------------------------------------------------------------------------
1 | /* MapleLib - A general-purpose MapleStory library
2 | * Copyright (C) 2009, 2010, 2015 Snow and haha01haha01
3 |
4 | * This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | * This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .*/
16 |
17 | using System;
18 | using System.Collections.Generic;
19 | using System.Linq;
20 | using System.Text;
21 |
22 | namespace MapleLib.WzLib
23 | {
24 | public enum WzObjectType
25 | {
26 | File,
27 | Image,
28 | Directory,
29 | Property,
30 | List
31 | }
32 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/WaveStreams/TestWaveProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using NAudio.Wave;
6 |
7 | namespace NAudioTests.WaveStreams
8 | {
9 | class TestWaveProvider : IWaveProvider
10 | {
11 | private int length;
12 | public int ConstValue { get; set; }
13 |
14 | public TestWaveProvider(WaveFormat format, int lengthInBytes = Int32.MaxValue)
15 | {
16 | this.WaveFormat = format;
17 | this.length = lengthInBytes;
18 | this.ConstValue = -1;
19 | }
20 |
21 | public int Read(byte[] buffer, int offset, int count)
22 | {
23 | int n = 0;
24 | while (n < count && Position < length)
25 | {
26 | buffer[n + offset] = (ConstValue == -1) ? (byte)Position : (byte)ConstValue;
27 | n++; Position++;
28 | }
29 | return n;
30 | }
31 |
32 | public WaveFormat WaveFormat { get; set; }
33 |
34 | public int Position { get; set; }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Compression/AcmDriverDetailsSupportFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Wave.Compression
4 | {
5 | ///
6 | /// Flags indicating what support a particular ACM driver has
7 | ///
8 | [Flags]
9 | public enum AcmDriverDetailsSupportFlags
10 | {
11 | /// ACMDRIVERDETAILS_SUPPORTF_CODEC - Codec
12 | Codec = 0x00000001,
13 | /// ACMDRIVERDETAILS_SUPPORTF_CONVERTER - Converter
14 | Converter = 0x00000002,
15 | /// ACMDRIVERDETAILS_SUPPORTF_FILTER - Filter
16 | Filter = 0x00000004,
17 | /// ACMDRIVERDETAILS_SUPPORTF_HARDWARE - Hardware
18 | Hardware = 0x00000008,
19 | /// ACMDRIVERDETAILS_SUPPORTF_ASYNC - Async
20 | Async = 0x00000010,
21 | /// ACMDRIVERDETAILS_SUPPORTF_LOCAL - Local
22 | Local = 0x40000000,
23 | /// ACMDRIVERDETAILS_SUPPORTF_DISABLED - Disabled
24 | Disabled = unchecked((int)0x80000000),
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/WaveStreams/TestSampleProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using NAudio.Wave;
4 |
5 | namespace NAudioTests.WaveStreams
6 | {
7 | class TestSampleProvider : ISampleProvider
8 | {
9 | private readonly int length;
10 |
11 | public TestSampleProvider(int sampleRate, int channels, int length = Int32.MaxValue)
12 | {
13 | this.WaveFormat = WaveFormat.CreateIeeeFloatWaveFormat(sampleRate, channels);
14 | this.length = length;
15 | }
16 |
17 | public int Read(float[] buffer, int offset, int count)
18 | {
19 | int n = 0;
20 | while (n < count && Position < length)
21 | {
22 | buffer[n + offset] = (UseConstValue) ? ConstValue : Position;
23 | n++; Position++;
24 | }
25 | return n;
26 | }
27 |
28 | public WaveFormat WaveFormat { get; set; }
29 |
30 | public int Position { get; set; }
31 |
32 | public bool UseConstValue { get; set; }
33 | public int ConstValue { get; set; }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/NetworkChatDemo/INetworkChatCodec.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NAudio.Wave;
3 |
4 | namespace NAudioDemo.NetworkChatDemo
5 | {
6 | public interface INetworkChatCodec : IDisposable
7 | {
8 | ///
9 | /// Friendly Name for this codec
10 | ///
11 | string Name { get; }
12 | ///
13 | /// Tests whether the codec is available on this system
14 | ///
15 | bool IsAvailable { get; }
16 | ///
17 | /// Bitrate
18 | ///
19 | int BitsPerSecond { get; }
20 | ///
21 | /// Preferred PCM format for recording in (usually 8kHz mono 16 bit)
22 | ///
23 | WaveFormat RecordFormat { get; }
24 | ///
25 | /// Encodes a block of audio
26 | ///
27 | byte[] Encode(byte[] data, int offset, int length);
28 | ///
29 | /// Decodes a block of audio
30 | ///
31 | byte[] Decode(byte[] data, int offset, int length);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/Utils/NullWaveStream.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NAudio.Wave;
3 |
4 | namespace NAudioTests.Utils
5 | {
6 | class NullWaveStream : WaveStream
7 | {
8 | private readonly long length;
9 | private long position;
10 |
11 | public NullWaveStream(WaveFormat format, long length)
12 | {
13 | WaveFormat = format;
14 | this.length = length;
15 | }
16 |
17 | public override WaveFormat WaveFormat { get; }
18 |
19 | public override long Length => length;
20 |
21 | public override long Position
22 | {
23 | get { return position; }
24 | set { position = value; }
25 | }
26 |
27 | public override int Read(byte[] buffer, int offset, int count)
28 | {
29 | if (position > length)
30 | {
31 | return 0;
32 | }
33 | count = (int)Math.Min(count, length - position);
34 | Array.Clear(buffer, offset, count);
35 | position += count;
36 | return count;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio.sln.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | System
3 | System.Linq
4 | <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
5 | <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
6 | <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Utils/Decibels.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Utils
4 | {
5 | ///
6 | /// A util class for conversions
7 | ///
8 | public class Decibels
9 | {
10 | // 20 / ln( 10 )
11 | private const double LOG_2_DB = 8.6858896380650365530225783783321;
12 |
13 | // ln( 10 ) / 20
14 | private const double DB_2_LOG = 0.11512925464970228420089957273422;
15 |
16 | ///
17 | /// linear to dB conversion
18 | ///
19 | /// linear value
20 | /// decibel value
21 | public static double LinearToDecibels(double lin)
22 | {
23 | return Math.Log(lin) * LOG_2_DB;
24 | }
25 |
26 | ///
27 | /// dB to linear conversion
28 | ///
29 | /// decibel value
30 | /// linear value
31 | public static double DecibelsToLinear(double dB)
32 | {
33 | return Math.Exp(dB * DB_2_LOG);
34 | }
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio.Universal.sln.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | System
3 | System.Linq
4 | <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
5 | <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
6 | <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/IAudioStreamVolume.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Runtime.InteropServices;
4 |
5 | namespace NAudio.CoreAudioApi.Interfaces
6 | {
7 | [Guid("93014887-242D-4068-8A15-CF5E93B90FE3"),
8 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
9 | interface IAudioStreamVolume
10 | {
11 | [PreserveSig]
12 | int GetChannelCount(
13 | [Out] out uint dwCount);
14 |
15 | [PreserveSig]
16 | int SetChannelVolume(
17 | [In] uint dwIndex,
18 | [In] float fLevel);
19 |
20 | [PreserveSig]
21 | int GetChannelVolume(
22 | [In] uint dwIndex,
23 | [Out] out float fLevel);
24 |
25 | [PreserveSig]
26 | int SetAllVoumes(
27 | [In] uint dwCount,
28 | [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R4, SizeParamIndex=0)] float[] fVolumes);
29 |
30 | [PreserveSig]
31 | int GetAllVolumes(
32 | [In] uint dwCount,
33 | [MarshalAs(UnmanagedType.LPArray)] float []pfVolumes);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/WaveStreams/ISampleNotifier.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | // ReSharper disable once CheckNamespace
4 | namespace NAudio.Wave
5 | {
6 | ///
7 | /// An interface for WaveStreams which can report notification of individual samples
8 | ///
9 | public interface ISampleNotifier
10 | {
11 | ///
12 | /// A sample has been detected
13 | ///
14 | event EventHandler Sample;
15 | }
16 |
17 | ///
18 | /// Sample event arguments
19 | ///
20 | public class SampleEventArgs : EventArgs
21 | {
22 | ///
23 | /// Left sample
24 | ///
25 | public float Left { get; set; }
26 | ///
27 | /// Right sample
28 | ///
29 | public float Right { get; set; }
30 |
31 | ///
32 | /// Constructor
33 | ///
34 | public SampleEventArgs(float left, float right)
35 | {
36 | Left = left;
37 | Right = right;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Asio/Asio64Bit.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | namespace NAudio.Wave.Asio
4 | {
5 | ///
6 | /// ASIO 64 bit value
7 | /// Unfortunately the ASIO API was implemented it before compiler supported consistently 64 bit
8 | /// integer types. By using the structure the data layout on a little-endian system like the
9 | /// Intel x86 architecture will result in a "non native" storage of the 64 bit data. The most
10 | /// significant 32 bit are stored first in memory, the least significant bits are stored in the
11 | /// higher memory space. However each 32 bit is stored in the native little-endian fashion
12 | ///
13 | [StructLayout(LayoutKind.Sequential, Pack = 4)]
14 | public struct Asio64Bit
15 | {
16 | ///
17 | /// most significant bits (Bits 32..63)
18 | ///
19 | public uint hi;
20 | ///
21 | /// least significant bits (Bits 0..31)
22 | ///
23 | public uint lo;
24 | // TODO: IMPLEMENT AN EASY WAY TO CONVERT THIS TO double AND long
25 | };
26 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Asio/AsioChannelInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | namespace NAudio.Wave.Asio
4 | {
5 | ///
6 | /// ASIO Channel Info
7 | ///
8 | [StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Ansi)]
9 | public struct AsioChannelInfo
10 | {
11 | ///
12 | /// on input, channel index
13 | ///
14 | public int channel;
15 | ///
16 | /// Is Input
17 | ///
18 | public bool isInput;
19 | ///
20 | /// Is Active
21 | ///
22 | public bool isActive;
23 | ///
24 | /// Channel Info
25 | ///
26 | public int channelGroup;
27 | ///
28 | /// ASIO Sample Type
29 | ///
30 | [MarshalAs(UnmanagedType.U4)]
31 | public AsioSampleType type;
32 | ///
33 | /// Name
34 | ///
35 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
36 | public string name;
37 | };
38 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/FireAndForgetPlayback/FireAndForgetPlaybackView.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/WaveProviders/SilenceWaveProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 |
4 | // ReSharper disable once CheckNamespace
5 | namespace NAudio.Wave
6 | {
7 | ///
8 | /// Silence producing wave provider
9 | /// Useful for playing silence when doing a WASAPI Loopback Capture
10 | ///
11 | public class SilenceProvider : IWaveProvider
12 | {
13 | ///
14 | /// Creates a new silence producing wave provider
15 | ///
16 | /// Desired WaveFormat (should be PCM / IEE float
17 | public SilenceProvider(WaveFormat wf) { WaveFormat = wf; }
18 |
19 | ///
20 | /// Read silence from into the buffer
21 | ///
22 | public int Read(byte[] buffer, int offset, int count)
23 | {
24 | Array.Clear(buffer, offset, count);
25 | return count;
26 | }
27 |
28 | ///
29 | /// WaveFormat of this silence producing wave provider
30 | ///
31 | public WaveFormat WaveFormat { get; private set; }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioTests/WaveStreams/SilenceProviderTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using NAudio.Wave;
4 | using NUnit.Framework;
5 |
6 | namespace NAudioTests.WaveStreams
7 | {
8 | [TestFixture]
9 | public class SilenceProviderTests
10 | {
11 | [Test]
12 | public void CanReadSilence()
13 | {
14 | var sp = new SilenceProvider(new WaveFormat(44100, 2));
15 | var length = 1000;
16 | var b = Enumerable.Range(1, length).Select(n => (byte) 1).ToArray();
17 | var read = sp.Read(b, 0, length);
18 | Assert.AreEqual(length, read);
19 | Assert.AreEqual(new byte[length], b);
20 | }
21 |
22 | [Test]
23 | public void RespectsOffsetAndCount()
24 | {
25 | var sp = new SilenceProvider(new WaveFormat(44100, 2));
26 | var length = 10;
27 | var b = Enumerable.Range(1, length).Select(n => (byte)1).ToArray();
28 | var read = sp.Read(b, 2, 4);
29 | Assert.AreEqual(4, read);
30 | Assert.AreEqual(new byte[] { 1, 1, 0, 0, 0, 0, 1, 1, 1, 1}, b);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/IMediaParamInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.Dmo
5 | {
6 | ///
7 | /// defined in Medparam.h
8 | ///
9 | [ComImport,
10 | #if !NETFX_CORE
11 | System.Security.SuppressUnmanagedCodeSecurity,
12 | #endif
13 | Guid("6d6cbb60-a223-44aa-842f-a2f06750be6d"),
14 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
15 | interface IMediaParamInfo
16 | {
17 | [PreserveSig]
18 | int GetParamCount(out int paramCount);
19 |
20 | [PreserveSig] // MP_PARAMINFO
21 | int GetParamInfo(int paramIndex, ref MediaParamInfo paramInfo);
22 |
23 | [PreserveSig]
24 | int GetParamText(int paramIndex, out IntPtr paramText);
25 |
26 | [PreserveSig]
27 | int GetNumTimeFormats(out int numTimeFormats);
28 |
29 | [PreserveSig]
30 | int GetSupportedTimeFormat(int formatIndex, out Guid guidTimeFormat);
31 |
32 | [PreserveSig] // MP_TIMEDATA is a DWORD
33 | int GetCurrentTimeFormat(out Guid guidTimeFormat, out int mediaTimeData);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/FireAndForgetPlayback/CachedSound.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using NAudio.Wave;
4 |
5 | namespace NAudioWpfDemo.FireAndForgetPlayback
6 | {
7 | class CachedSound
8 | {
9 | public float[] AudioData { get; }
10 | public WaveFormat WaveFormat { get; }
11 | public CachedSound(string audioFileName)
12 | {
13 | using (var audioFileReader = new AudioFileReader(audioFileName))
14 | {
15 | // TODO: could add resampling in here if required
16 | WaveFormat = audioFileReader.WaveFormat;
17 | var wholeFile = new List((int)(audioFileReader.Length / 4));
18 | var readBuffer = new float[audioFileReader.WaveFormat.SampleRate * audioFileReader.WaveFormat.Channels];
19 | int samplesRead;
20 | while ((samplesRead = audioFileReader.Read(readBuffer, 0, readBuffer.Length)) > 0)
21 | {
22 | wholeFile.AddRange(readBuffer.Take(samplesRead));
23 | }
24 | AudioData = wholeFile.ToArray();
25 | }
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/CashCommodities/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace CashCommodities.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CashCommodities/MapleLib/PacketLib/AbstractPacket.cs:
--------------------------------------------------------------------------------
1 | /* MapleLib - A general-purpose MapleStory library
2 | * Copyright (C) 2009, 2010, 2015 Snow and haha01haha01
3 |
4 | * This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | * This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .*/
16 |
17 | using System;
18 | using System.Collections.Generic;
19 | using System.Linq;
20 | using System.Text;
21 | using System.IO;
22 |
23 | namespace MapleLib.PacketLib
24 | {
25 | public abstract class AbstractPacket
26 | {
27 | protected MemoryStream _buffer;
28 |
29 | public byte[] ToArray()
30 | {
31 | return _buffer.ToArray();
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Gui/VolumeMeter.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.Gui
2 | {
3 | partial class VolumeMeter
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/MmeInterop/WaveInEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave
6 | {
7 | ///
8 | /// Event Args for WaveInStream event
9 | ///
10 | public class WaveInEventArgs : EventArgs
11 | {
12 | private byte[] buffer;
13 | private int bytes;
14 |
15 | ///
16 | /// Creates new WaveInEventArgs
17 | ///
18 | public WaveInEventArgs(byte[] buffer, int bytes)
19 | {
20 | this.buffer = buffer;
21 | this.bytes = bytes;
22 | }
23 |
24 | ///
25 | /// Buffer containing recorded data. Note that it might not be completely
26 | /// full.
27 | ///
28 | public byte[] Buffer
29 | {
30 | get { return buffer; }
31 | }
32 |
33 | ///
34 | /// The number of recorded bytes in Buffer.
35 | ///
36 | public int BytesRecorded
37 | {
38 | get { return bytes; }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio.Universal/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("NAudio.Universal")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("NAudio.Universal")]
13 | [assembly: AssemblyCopyright("Copyright © Mark Heath 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/MediaFoundation/_MFT_OUTPUT_DATA_BUFFER_FLAGS.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.MediaFoundation
4 | {
5 | ///
6 | /// Defines flags for the IMFTransform::ProcessOutput method.
7 | ///
8 | [Flags]
9 | public enum _MFT_OUTPUT_DATA_BUFFER_FLAGS
10 | {
11 | ///
12 | /// None
13 | ///
14 | None = 0,
15 | ///
16 | /// The MFT can still generate output from this stream without receiving any more input.
17 | ///
18 | MFT_OUTPUT_DATA_BUFFER_INCOMPLETE = 0x01000000,
19 | ///
20 | /// The format has changed on this output stream, or there is a new preferred format for this stream.
21 | ///
22 | MFT_OUTPUT_DATA_BUFFER_FORMAT_CHANGE = 0x00000100,
23 | ///
24 | /// The MFT has removed this output stream.
25 | ///
26 | MFT_OUTPUT_DATA_BUFFER_STREAM_END = 0x00000200,
27 | ///
28 | /// There is no sample ready for this stream.
29 | ///
30 | MFT_OUTPUT_DATA_BUFFER_NO_SAMPLE = 0x00000300
31 |
32 | };
33 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioUniversalDemo/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("NAudioUniversalDemo")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("NAudioUniversalDemo")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.225
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace NAudioWpfDemo.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/MixDiff/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | -1
12 |
13 |
14 | True
15 |
16 |
17 | 5
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Gui/WaveformPainter.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace NAudio.Gui
2 | {
3 | partial class WaveformPainter
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/DrumMachineDemo/DrumPattern.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | namespace NAudioWpfDemo.DrumMachineDemo
6 | {
7 | public class DrumPattern
8 | {
9 | private readonly byte[,] hits;
10 | private readonly List noteNames;
11 |
12 | public DrumPattern(IEnumerable notes, int steps)
13 | {
14 | noteNames = new List(notes);
15 | Steps = steps;
16 | hits = new byte[Notes, steps];
17 | }
18 |
19 | public int Steps { get; }
20 |
21 | public int Notes => noteNames.Count;
22 |
23 | public byte this[int note, int step]
24 | {
25 | get => hits[note, step];
26 | set
27 | {
28 | if (hits[note, step] != value)
29 | {
30 | hits[note, step] = value;
31 | PatternChanged?.Invoke(this, EventArgs.Empty);
32 | }
33 | }
34 | }
35 |
36 | public event EventHandler PatternChanged;
37 |
38 | public IList NoteNames => noteNames.AsReadOnly();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/AudioFileInspector/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace AudioFileInspector.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/NetworkChatDemo/UncompressedPcmChatCodec.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NAudio.Wave;
3 |
4 | namespace NAudioDemo.NetworkChatDemo
5 | {
6 | class UncompressedPcmChatCodec : INetworkChatCodec
7 | {
8 | public UncompressedPcmChatCodec()
9 | {
10 | RecordFormat = new WaveFormat(8000, 16, 1);
11 | }
12 |
13 | public string Name => "PCM 8kHz 16 bit uncompressed";
14 |
15 | public WaveFormat RecordFormat { get; private set; }
16 |
17 | public byte[] Encode(byte[] data, int offset, int length)
18 | {
19 | var encoded = new byte[length];
20 | Array.Copy(data, offset, encoded, 0, length);
21 | return encoded;
22 | }
23 |
24 | public byte[] Decode(byte[] data, int offset, int length)
25 | {
26 | var decoded = new byte[length];
27 | Array.Copy(data, offset, decoded, 0, length);
28 | return decoded;
29 | }
30 |
31 | public int BitsPerSecond => RecordFormat.AverageBytesPerSecond * 8;
32 |
33 | public void Dispose() { }
34 |
35 | public bool IsAvailable => true;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/FileFormats/SoundFont/Zone.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.SoundFont
4 | {
5 | ///
6 | /// A SoundFont zone
7 | ///
8 | public class Zone
9 | {
10 | internal ushort generatorIndex;
11 | internal ushort modulatorIndex;
12 | internal ushort generatorCount;
13 | internal ushort modulatorCount;
14 | private Modulator[] modulators;
15 | private Generator[] generators;
16 |
17 | ///
18 | ///
19 | ///
20 | public override string ToString()
21 | {
22 | return String.Format("Zone {0} Gens:{1} {2} Mods:{3}",generatorCount,generatorIndex,
23 | modulatorCount,modulatorIndex);
24 | }
25 |
26 | ///
27 | /// Modulators for this Zone
28 | ///
29 | public Modulator[] Modulators
30 | {
31 | get
32 | {
33 | return modulators;
34 | }
35 | set
36 | {
37 | modulators = value;
38 | }
39 | }
40 |
41 | ///
42 | /// Generators for this Zone
43 | ///
44 | public Generator[] Generators
45 | {
46 | get
47 | {
48 | return generators;
49 | }
50 | set
51 | {
52 | generators = value;
53 | }
54 | }
55 |
56 | }
57 | }
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/MmeInterop/WaveHeader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace NAudio.Wave
5 | {
6 | ///
7 | /// WaveHeader interop structure (WAVEHDR)
8 | /// http://msdn.microsoft.com/en-us/library/dd743837%28VS.85%29.aspx
9 | ///
10 | [StructLayout(LayoutKind.Sequential)]
11 | class WaveHeader
12 | {
13 | /// pointer to locked data buffer (lpData)
14 | public IntPtr dataBuffer;
15 | /// length of data buffer (dwBufferLength)
16 | public int bufferLength;
17 | /// used for input only (dwBytesRecorded)
18 | public int bytesRecorded;
19 | /// for client's use (dwUser)
20 | public IntPtr userData;
21 | /// assorted flags (dwFlags)
22 | public WaveHeaderFlags flags;
23 | /// loop control counter (dwLoops)
24 | public int loops;
25 | /// PWaveHdr, reserved for driver (lpNext)
26 | public IntPtr next;
27 | /// reserved for driver
28 | public IntPtr reserved;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/CoreAudioApi/Interfaces/ClsCtx.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | // ReSharper disable InconsistentNaming
3 |
4 | namespace NAudio.CoreAudioApi.Interfaces
5 | {
6 | ///
7 | /// is defined in WTypes.h
8 | ///
9 | [Flags]
10 | enum ClsCtx
11 | {
12 | INPROC_SERVER = 0x1,
13 | INPROC_HANDLER = 0x2,
14 | LOCAL_SERVER = 0x4,
15 | INPROC_SERVER16 = 0x8,
16 | REMOTE_SERVER = 0x10,
17 | INPROC_HANDLER16 = 0x20,
18 | //RESERVED1 = 0x40,
19 | //RESERVED2 = 0x80,
20 | //RESERVED3 = 0x100,
21 | //RESERVED4 = 0x200,
22 | NO_CODE_DOWNLOAD = 0x400,
23 | //RESERVED5 = 0x800,
24 | NO_CUSTOM_MARSHAL = 0x1000,
25 | ENABLE_CODE_DOWNLOAD = 0x2000,
26 | NO_FAILURE_LOG = 0x4000,
27 | DISABLE_AAA = 0x8000,
28 | ENABLE_AAA = 0x10000,
29 | FROM_DEFAULT_CONTEXT = 0x20000,
30 | ACTIVATE_32_BIT_SERVER = 0x40000,
31 | ACTIVATE_64_BIT_SERVER = 0x80000,
32 | ENABLE_CLOAKING = 0x100000,
33 | PS_DLL = unchecked ( (int) 0x80000000 ),
34 | INPROC = INPROC_SERVER | INPROC_HANDLER,
35 | SERVER = INPROC_SERVER | LOCAL_SERVER | REMOTE_SERVER,
36 | ALL = SERVER | INPROC_HANDLER
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioDemo/AudioPlaybackDemo/DirectSoundOutPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using NAudio.Wave;
4 | using System.Windows.Forms;
5 |
6 | namespace NAudioDemo.AudioPlaybackDemo
7 | {
8 | class DirectSoundOutPlugin : IOutputDevicePlugin
9 | {
10 | private DirectSoundOutSettingsPanel settingsPanel;
11 | private readonly bool isAvailable;
12 |
13 | public DirectSoundOutPlugin()
14 | {
15 | isAvailable = DirectSoundOut.Devices.Any();
16 | }
17 |
18 | public IWavePlayer CreateDevice(int latency)
19 | {
20 | return new DirectSoundOut(settingsPanel.SelectedDevice, latency);
21 | }
22 |
23 | public UserControl CreateSettingsPanel()
24 | {
25 | settingsPanel = new DirectSoundOutSettingsPanel();
26 | return settingsPanel;
27 | }
28 |
29 | public string Name
30 | {
31 | get { return "DirectSound"; }
32 | }
33 |
34 | public bool IsAvailable
35 | {
36 | get { return isAvailable; }
37 | }
38 |
39 | public int Priority
40 | {
41 | get { return 2; }
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Dmo/MediaObjectSizeInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NAudio.Dmo
4 | {
5 | ///
6 | /// Media Object Size Info
7 | ///
8 | public class MediaObjectSizeInfo
9 | {
10 | ///
11 | /// Minimum Buffer Size, in bytes
12 | ///
13 | public int Size { get; private set; }
14 |
15 | ///
16 | /// Max Lookahead
17 | ///
18 | public int MaxLookahead { get; }
19 |
20 | ///
21 | /// Alignment
22 | ///
23 | public int Alignment { get; }
24 |
25 | ///
26 | /// Media Object Size Info
27 | ///
28 | public MediaObjectSizeInfo(int size, int maxLookahead, int alignment)
29 | {
30 | Size = size;
31 | MaxLookahead = maxLookahead;
32 | Alignment = alignment;
33 | }
34 |
35 | ///
36 | /// ToString
37 | ///
38 | public override string ToString()
39 | {
40 | return $"Size: {Size}, Alignment {Alignment}, MaxLookahead {MaxLookahead}";
41 | }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudioWpfDemo/DrumMachineDemo/DrumKit.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using NAudio.Wave;
3 |
4 | namespace NAudioWpfDemo.DrumMachineDemo
5 | {
6 | class DrumKit
7 | {
8 | private readonly List sampleSources;
9 |
10 | public DrumKit()
11 | {
12 | var kickSample = SampleSource.CreateFromWaveFile("Samples\\kick-trimmed.wav");
13 | var snareSample = SampleSource.CreateFromWaveFile("Samples\\snare-trimmed.wav");
14 | var closedHatsSample = SampleSource.CreateFromWaveFile("Samples\\closed-hat-trimmed.wav");
15 | var openHatsSample = SampleSource.CreateFromWaveFile("Samples\\open-hat-trimmed.wav");
16 | sampleSources = new List {kickSample, snareSample, closedHatsSample, openHatsSample};
17 |
18 | WaveFormat = WaveFormat.CreateIeeeFloatWaveFormat(openHatsSample.SampleWaveFormat.SampleRate, openHatsSample.SampleWaveFormat.Channels);
19 | }
20 |
21 | public virtual WaveFormat WaveFormat { get; }
22 |
23 | public MusicSampleProvider GetSampleProvider(int note)
24 | {
25 | return new MusicSampleProvider(sampleSources[note]);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CashCommodities/NAudio/NAudio/Wave/Compression/AcmFormatChooseStyleFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace NAudio.Wave.Compression
6 | {
7 | [Flags]
8 | enum AcmFormatChooseStyleFlags
9 | {
10 | ///
11 | /// None
12 | ///
13 | None = 0,
14 | ///
15 | /// ACMFORMATCHOOSE_STYLEF_SHOWHELP
16 | ///
17 | ShowHelp = 0x00000004,
18 | ///
19 | /// ACMFORMATCHOOSE_STYLEF_ENABLEHOOK
20 | ///
21 | EnableHook = 0x00000008,
22 | ///
23 | /// ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE
24 | ///
25 | EnableTemplate = 0x00000010,
26 | ///
27 | /// ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE
28 | ///
29 | EnableTemplateHandle = 0x00000020,
30 | ///
31 | /// ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT
32 | ///
33 | InitToWfxStruct = 0x00000040,
34 | ///
35 | /// ACMFORMATCHOOSE_STYLEF_CONTEXTHELP
36 | ///
37 | ContextHelp = 0x00000080
38 | }
39 | }
40 |
--------------------------------------------------------------------------------