internal Sound(AudioBuffer buffer) { Buffer = buffer; }
/// <summary> /// Constructs a new sound with the given audio sample data. /// </summary> /// <param name="data">The audio samples to use as the sound data.</param> /// <param name="stereo">If the data is stereo interleaved samples.</param> /// <param name="hz">The natural playback rate for the data, between 8,000 and 48,000.</param> public Sound(ReadOnlySpan <short> data, bool stereo, uint hz) { Buffer = new AudioBuffer(); Buffer.SetData(data, stereo, hz); }