Skip to content

Instantly share code, notes, and snippets.

View jtbrower's full-sized avatar

Jason Brower jtbrower

View GitHub Profile
@jtbrower
jtbrower / SimpleSoundPlayer.cs
Created September 25, 2020 16:23
Play a Sound Wave File in .Net, NetCore and Net5.0 without additional Media Libraries
namespace Gist
{
using System.Runtime.InteropServices;
//NOTICE : Applicable only to Windows and wav files
////////////////////////////////////////////////////////////////////////////////////////////////////
/// <summary>
/// A class that uses PInvoke to play a wave file in DotNet Core, .Net and Net5.0. This function
/// will not work on non Windows platforms, but does work on alternative UI frameworks such as