private void Emulator_InsideInterruptChanged(object sender, EventArgs e) { if (!_device.Emulator.InsideInterrupt && Frames.Count == 0 && Possibilities.Count > 0 && !_receivingData && (_receivedData == null || _dataReceiveComplete)) { Task.Factory.StartNew(() => { _dataReceiveComplete = false; var bytes = Possibilities.Peek(); var sb = new StringBuilder(); foreach (var b in bytes) { sb.Append(string.Format("{0} ", b.ToString("X02"))); } Console.WriteLine("PCM receiving bytes: " + sb.ToString().Trim()); if (_receivedData == null) { _receivedData = new List <byte>(); } Thread.Sleep(2000); var clone = new List <byte>(); foreach (var b in bytes) { clone.Add(b); } Frames.Enqueue(clone); _device.Emulator.Interrupt = (0x1C0 / 4) - 0x18; _device.Emulator.InterruptMaskLevel = _device.Emulator.Interrupt - 1; }); } }
public void Add(MediaFrameReference frame) { if (frame == null) { FailureReasons.Enqueue(ExampleMediaFrameCollectionFailureReason.NullMediaFrameReference); return; } if (frame.VideoMediaFrame == null) { FailureReasons.Enqueue(ExampleMediaFrameCollectionFailureReason.NullVideoMediaFrame); return; } if (frame.SystemRelativeTime == null) { FailureReasons.Enqueue(ExampleMediaFrameCollectionFailureReason.NullSystemRelativeTime); return; } Frames.Enqueue(new ExampleMediaFrame(frame.VideoMediaFrame)); Update(frame.SystemRelativeTime.Value); }
public void AddFrame(PoolEntry <ushort> depth, PoolEntry <byte> color) { Frames.Enqueue(depth); ColorFrames.Enqueue(color); }
public void Add(ImportedSkeleton skel, int maxSize) { windowFixedSize = maxSize; Frames.Enqueue(skel); FixFramesLenght(); }