Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public AudioSample(string FilePath, Resolution BufferKind = Resolution.Short)
     : base(BufferKind)
 {
     Sample = Bass.LoadSample(FilePath, 0, 0, 1, BufferKind.ToBassFlag());
     Handle = Bass.SampleGetChannel(Sample, true);
 }