public Windows.Kinect.AudioBeamSubFrame SubFrame()
        {
            if (_pNative == RootSystem.IntPtr.Zero)
            {
                throw new RootSystem.ObjectDisposedException("AudioBeamFrame");
            }

            AudioBeamSubFrame obj = null;

            if (_subFrames == null)
            {
                int collectionSize = Windows_Kinect_AudioBeamFrame_get_SubFrames_Length(_pNative);
                var outCollection  = new RootSystem.IntPtr[collectionSize];
                //_subFrames = new Windows.Kinect.AudioBeamSubFrame[collectionSize];

                collectionSize = Windows_Kinect_AudioBeamFrame_get_SubFrames(_pNative, outCollection, collectionSize);
                Helper.ExceptionHelper.CheckLastError();

                for (int i = 0; i < collectionSize; i++)
                {
                    if (outCollection[i] == RootSystem.IntPtr.Zero)
                    {
                        continue;
                    }

                    obj = Helper.NativeObjectCache.GetObject <Windows.Kinect.AudioBeamSubFrame>(outCollection[i]);
                    if (obj == null)
                    {
                        obj = new Windows.Kinect.AudioBeamSubFrame(outCollection[i]);
                        Helper.NativeObjectCache.AddObject <Windows.Kinect.AudioBeamSubFrame>(outCollection[i], obj);
                    }
                }
            }
            return(obj);
        }
Exemplo n.º 2
0
 // Token: 0x06002875 RID: 10357 RVA: 0x000D1CC2 File Offset: 0x000D00C2
 public void CopyFrameDataToIntPtr(IntPtr frameData, uint size)
 {
     if (this._pNative == IntPtr.Zero)
     {
         throw new ObjectDisposedException("AudioBeamSubFrame");
     }
     AudioBeamSubFrame.Windows_Kinect_AudioBeamSubFrame_CopyFrameDataToIntPtr(this._pNative, frameData, size);
     ExceptionHelper.CheckLastError();
 }
Exemplo n.º 3
0
        // Token: 0x0600288D RID: 10381 RVA: 0x000D1FCC File Offset: 0x000D03CC
        public void CopyFrameDataToArray(byte[] frameData)
        {
            if (this._pNative == IntPtr.Zero)
            {
                throw new ObjectDisposedException("AudioBeamSubFrame");
            }
            SmartGCHandle smartGCHandle = new SmartGCHandle(GCHandle.Alloc(frameData, GCHandleType.Pinned));
            IntPtr        frameData2    = smartGCHandle.AddrOfPinnedObject();

            AudioBeamSubFrame.Windows_Kinect_AudioBeamSubFrame_CopyFrameDataToArray(this._pNative, frameData2, frameData.Length);
            ExceptionHelper.CheckLastError();
        }
Exemplo n.º 4
0
 // Token: 0x0600287C RID: 10364 RVA: 0x000D1DA4 File Offset: 0x000D01A4
 private void Dispose(bool disposing)
 {
     if (this._pNative == IntPtr.Zero)
     {
         return;
     }
     this.__EventCleanup();
     NativeObjectCache.RemoveObject <AudioBeamSubFrame>(this._pNative);
     if (disposing)
     {
         AudioBeamSubFrame.Windows_Kinect_AudioBeamSubFrame_Dispose(this._pNative);
     }
     AudioBeamSubFrame.Windows_Kinect_AudioBeamSubFrame_ReleaseObject(ref this._pNative);
     this._pNative = IntPtr.Zero;
 }
Exemplo n.º 5
0
        // Token: 0x06002877 RID: 10359 RVA: 0x000D1CF8 File Offset: 0x000D00F8
        public KinectBuffer LockAudioBuffer()
        {
            if (this._pNative == IntPtr.Zero)
            {
                throw new ObjectDisposedException("AudioBeamSubFrame");
            }
            IntPtr intPtr = AudioBeamSubFrame.Windows_Kinect_AudioBeamSubFrame_LockAudioBuffer(this._pNative);

            ExceptionHelper.CheckLastError();
            if (intPtr == IntPtr.Zero)
            {
                return(null);
            }
            return(NativeObjectCache.CreateOrGetObject <KinectBuffer>(intPtr, (IntPtr n) => new KinectBuffer(n)));
        }
Exemplo n.º 6
0
 // Token: 0x06002873 RID: 10355 RVA: 0x000D1CA8 File Offset: 0x000D00A8
 internal AudioBeamSubFrame(IntPtr pNative)
 {
     this._pNative = pNative;
     AudioBeamSubFrame.Windows_Kinect_AudioBeamSubFrame_AddRefObject(ref this._pNative);
 }