コード例 #1
0
ファイル: Buffer.cs プロジェクト: alexbv16/LiveSPICE
        public Buffer(WAVEFORMATEX Format, int Count)
        {
            handle = GCHandle.Alloc(this);

            size = BlockAlignedSize(Format, Count);
            samples = new Audio.SampleBuffer(Count) { Tag = this };

            header = new WAVEHDR();
            header.lpData = Marshal.AllocHGlobal(size);
            header.dwUser = (IntPtr)handle;
            header.dwBufferLength = (uint)size;
            header.dwFlags = 0;
            pin = GCHandle.Alloc(header, GCHandleType.Pinned);
        }
コード例 #2
0
ファイル: Buffer.cs プロジェクト: mikeoliphant/LiveSPICE
        public Buffer(WAVEFORMATEX Format, int Count)
        {
            samples = new Audio.SampleBuffer(Count)
            {
                Tag = this
            };

            int size = BlockAlignedSize(Format, Count);

            data                  = new byte[size];
            dataPin               = GCHandle.Alloc(data, GCHandleType.Pinned);
            header                = new WAVEHDR();
            headerPin             = GCHandle.Alloc(header, GCHandleType.Pinned);
            header.lpData         = dataPin.AddrOfPinnedObject();
            header.dwBufferLength = (uint)size;
            header.dwFlags        = 0;
        }
コード例 #3
0
        public Buffer(WAVEFORMATEX Format, int Count)
        {
            handle = GCHandle.Alloc(this);

            size    = BlockAlignedSize(Format, Count);
            samples = new Audio.SampleBuffer(Count)
            {
                Tag = this
            };

            header                = new WAVEHDR();
            header.lpData         = Marshal.AllocHGlobal(size);
            header.dwUser         = (IntPtr)handle;
            header.dwBufferLength = (uint)size;
            header.dwFlags        = 0;
            pin = GCHandle.Alloc(header, GCHandleType.Pinned);
        }
コード例 #4
0
ファイル: Winmm.cs プロジェクト: alexbv16/LiveSPICE
 public static extern MMRESULT waveOutWrite(IntPtr hWaveOut, ref WAVEHDR lpWaveOutHdr, int uSize);
コード例 #5
0
ファイル: Winmm.cs プロジェクト: alexbv16/LiveSPICE
 public static extern MMRESULT waveOutUnprepareHeader(IntPtr hWaveOut, ref WAVEHDR lpWaveOutHdr, int uSize);
コード例 #6
0
ファイル: Winmm.cs プロジェクト: alexbv16/LiveSPICE
 public static extern MMRESULT waveInPrepareHeader(IntPtr hWaveIn, ref WAVEHDR lpWaveInHdr, int uSize);
コード例 #7
0
ファイル: Winmm.cs プロジェクト: alexbv16/LiveSPICE
 public static extern MMRESULT waveInAddBuffer(IntPtr hwi, ref WAVEHDR pwh, int cbwh);
コード例 #8
0
ファイル: Winmm.cs プロジェクト: mikeoliphant/LiveSPICE
 public static extern MMRESULT waveInUnprepareHeader(IntPtr hWaveIn, WAVEHDR lpWaveInHdr, int uSize);
コード例 #9
0
ファイル: Winmm.cs プロジェクト: mikeoliphant/LiveSPICE
 public static extern MMRESULT waveInAddBuffer(IntPtr hwi, WAVEHDR pwh, int cbwh);
コード例 #10
0
ファイル: Winmm.cs プロジェクト: mikeoliphant/LiveSPICE
 public static extern MMRESULT waveOutWrite(IntPtr hWaveOut, WAVEHDR lpWaveOutHdr, int uSize);
コード例 #11
0
ファイル: Winmm.cs プロジェクト: mikeoliphant/LiveSPICE
 public static extern MMRESULT waveOutPrepareHeader(IntPtr hWaveOut, WAVEHDR lpWaveOutHdr, int uSize);