real-time

Debugging strange error that depends on the selected scheduler

99封情书 提交于 2019-12-12 06:21:31
问题 I am experiencing a strange behavior in a software I am working on. It is a realtime-machine-controller, written in C++, running on Linux and it is making extensive use of multithreading. When I run the program without asking it to be realtime, everything works like I expect it to. But when I ask it to switch to its realtime mode, there is a clearly reproducible bug that lets the application crash. It must be some deadlock-thing I guess, because it is a mutex that runs into a timeout and

Capturing audio and processing rythm in realtime

我的梦境 提交于 2019-12-12 06:01:59
问题 I would like to capture audio and show the rythm in realtime. Are there some examples available as how to do something like this? I've searched the web for audio processing libraries, but I can't figure out how to get it to work, because most libs have examples for recording audio. Please point me in the right direction. Kind regards, Maarten 来源: https://stackoverflow.com/questions/13661809/capturing-audio-and-processing-rythm-in-realtime

object tracking in real time via opencv and python

喜欢而已 提交于 2019-12-12 04:18:28
问题 I'm looking for good algorithm to do object tracking in real time. the best one I found so far was camshift but the problem with that is that I need to object detection will come from out side image.(I give the algorithm an image and he find it in the video...) and camshift required to select the ROI points with the mouse. I tried to change it but it didn't succeed. I'm open to learn new algorithm or to change the camshift. Thanks. 回答1: I don't know camshift very well, but i'm guessing you

xenomai xddp with std::thread

放肆的年华 提交于 2019-12-12 03:33:53
问题 I need to perform RT to NRT communication on a Xenomai machine. I'm actually able to compile and run the example proposed here But if try to replace the pthreads with std::thread , as follows: #include <sys/mman.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <string.h> #include <malloc.h> #include <pthread.h> #include <fcntl.h> #include <errno.h> #include <rtdk.h> #include <rtdm/rtipc.h> #include <iostream> #include <thread> #define XDDP_PORT_LABEL

how to display a realtime variable in nodejs in HTML

谁说我不能喝 提交于 2019-12-12 03:31:45
问题 I am using the setInterval() function to update a few variables(prices from various API's) every 'x' seconds in NodeJS I want to display these variables in HTML and have them update real time every 'x' seconds. How do I go about this using Socket.io or without using it 回答1: If you don't want to use socket.io , you can use AJAX calls but I think it's the more painful way... If you use socket.io , there are great examples on their GitHub : Chat example. In your NodeJS : var io = require('socket

ASP.NET MVC 3 real time events.

╄→гoц情女王★ 提交于 2019-12-12 03:18:09
问题 I'm looking for advice regarding asp.net mvc 3 support for real time events display and handling. The typical scenario would be events like startup,shutdown, soft-reset, cache complete etc, issued on the the server and displayed immediately in the brower app, in near real time. What is the typical mechanism to support real time events in asp.net mvc 3? Is there a listener mechanism similar to WPF event handing, or would I need to poll for them using AJAX. I'm not planning to use any external

Firebase rooms with limited number of participants

女生的网名这么多〃 提交于 2019-12-12 03:09:52
问题 In Firebase, creating "rooms" such as for chats is easy, just as documented in their various samples. For the data structure of the chat, I would use something like this: rooms room1 member_count members user1 user2 messages message1 But now I would like to create to create a limit on the number of participants per room, say 3 users per chat room. How can you do this? In their docs, the one thing that looked most promising was using transactions. Can you verify that this is a good way to go?

Is it possible to lose events when using long-polling to retrieve real time notifications?

会有一股神秘感。 提交于 2019-12-12 02:56:22
问题 When subscribing to real-time notifications, I go through the normal handshake, subscribe, connect flow. Once the connection returns with events, I reconnect and wait for the next response to return. My question is: If events are generated the first response and the next reconnect, could they be lost? As an example: A synchronous application which processes returned response data after it returns and only reconnects once the data processing has finished could cause a significant delay between

Android realtime audio acquisition - losing some samples?

痞子三分冷 提交于 2019-12-12 02:34:23
问题 I wrote this class, to acquire audio data. I want to use the audio input to sample realtime RF signals. I sample @ 44kHz, and I expect to know the elapsed time by measuring the total acquired samples, knowing the sample frequency. I don't know why I found a delta time between elapsed time measured by system.nanoTime and acquired samples divided by frequency. Why this delta of about 170ms changing each time I start/stop acquisition? Am I losing samples from acquired signal? Basically, what I

C# cmd output in real time

感情迁移 提交于 2019-12-12 02:34:06
问题 I am writing a program that uses a hidden console CMD. Starts in the codec "ffmpeg". When converting all the time gets feedback. I wish every 1 second charge results from the console. Unfortunately, all the codes available on the internet work on the principle that gets refund after the conversion and I want to be watching you all the time what was happening. public void ExecuteCommandSync(object command) { try { // create the ProcessStartInfo using "cmd" as the program to be run, // and "/c