SoundPlayerControl 0.9.0.4
See the version list below for details.
dotnet add package SoundPlayerControl --version 0.9.0.4
NuGet\Install-Package SoundPlayerControl -Version 0.9.0.4
<PackageReference Include="SoundPlayerControl" Version="0.9.0.4" />
paket add SoundPlayerControl --version 0.9.0.4
#r "nuget: SoundPlayerControl, 0.9.0.4"
// Install SoundPlayerControl as a Cake Addin #addin nuget:?package=SoundPlayerControl&version=0.9.0.4 // Install SoundPlayerControl as a Cake Tool #tool nuget:?package=SoundPlayerControl&version=0.9.0.4
This control can be used by dragging and dropping it onto a form, or programattically. Uses Dot NET 4.8
Features:
- Uses NAudio
- Output sound to a selected sound device (not just the default)
- Detects changes to audio outputs
- An event to capture when playback is stopped
- Hide / show controls on the player to suit your needs
- Drag and drop the control onto a form, and its ready to go for loading and playing a sound (no code required)
- and more...
A very simple code based example (Check the test code in GitHub for more examples)
SoundPlayer sp;
private void btnPlaySound_Click(object sender, EventArgs e) { ... sp = new SoundPlayer(@"C:\Windows\Media\Alarm01.wav", 95); sp.PlaybackStopped += SoundPlayer_PlaybackStopped; sp.PlaySound(); ... }
private void SoundPlayer_PlaybackStopped(object sender, NAudio.Wave.StoppedEventArgs e) { MessageBox.Show("Programmatic sound has finished playing"); sp.Dispose(); }
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
-
- NAudio (>= 1.9.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Summary of changes made in this release of the package.