public AudioSample(byte[] Memory, int Length, Resolution BufferKind = Resolution.Short) : base(BufferKind) { // Pin GCPin = GCHandle.Alloc(Memory, GCHandleType.Pinned); Sample = Bass.LoadSample(GCPin.AddrOfPinnedObject(), 0, Length, 1, BufferKind.ToBassFlag()); Handle = Bass.SampleGetChannel(Sample, true); }
public AudioSample(string FilePath, Resolution BufferKind = Resolution.Short) : base(BufferKind) { Sample = Bass.LoadSample(FilePath, 0, 0, 1, BufferKind.ToBassFlag()); Handle = Bass.SampleGetChannel(Sample, true); }