namespace SFXR; public enum Waveform { Square, Sawtooth, Sine, Noise } public enum SampleRate { Hz22050 = 22050, Hz44100 = 44100, } public enum BitDepth { Bit0 = 0, Bit8 = 8, Bit16 = 16, } public static partial class SFXR { public static float GetMaxValue( this BitDepth depth ) { switch ( depth ) { case BitDepth.Bit0: return 1; case BitDepth.Bit8: return 127; case BitDepth.Bit16: return 32767; default: throw new System.ArgumentException( "Invalid bit depth" ); } } }