We know that when we playe videos, there is usually a compensation for the latency of audio output device, to synchronise the sound and pictures.
To achieve this, one must have some way to know the value of the latency.
How is that achieved? Is there a portable api to get this value? This sounds very simple, but after searching a bit, I have not found anything. Latency is a complicated issue, but such an api should tell us about at least part of the latency. (If it is hard to find portable api, then platform-specific apis are also fine.)
It would be really helpful if I can find a simple demo implementation of a media player with latency compensation.
Related
I have been tirelessly trying to decide on the best option for getting phones to talk to each other that are nearby, I need something with the ability to broadcast and receive. It is kind of like NFC with more range, I'd like to be able to send messages 30 to 50 feet away using nothing but a phone.
Bluetooth cannot broadcast and receive to more than 8 devices still, there might be changes to that in Apple's new OS but Android and Windows are still going to be lacking, so Bluetooth is out of the question.
I was thinking of maybe trying to use Wifi, but I have not found very many good resources on how I would go about doing that without making a virtual server, I'd much rather not go that route if possible.
I could even use GPS although with the power consumption of GPS and having to be an always on feature I am not certain I would like to use GPS if I can avoid it.
The one I really want to use, uses sounds made and received by the phone. I have been playing around with a listener that converts different frequencies to 1's and 0's, but with all things sound, it gets increasingly hard if lots of people are talking, or there is music playing, or if there are objects in the way, the Doppler effect and more. Is there someone out there who has already made a filter for this? Some other problems would be, what is the range sound travels at 20khz through air? I can also not find much good documentation anywhere for devices whose speakers can make sound above 20khz but it seems most can, the problem then is what microphones can hear sounds above 20khz.
I would really love to use sound as I think it is interesting, and it would make the app work without any internet or phone connection which I think is pretty cool. This is a side-project I am working on, and really don't want to spend hours down a path that will ultimately fail.
If anyone thinks it's possible to do this with sound over other devices, I'd much rather like to do it that way, I think there is a lot of interesting things you could do with that technology, I just don't know how viable it is over using wifi or bluetooth or even GPS.
At ios you have no controll to low level "things". You can read the current connected wlan ssid, but not all wlan ids which the operation system can see.
I would first try the location services approach. Settig to 1000m acuarcy will usually disable GPS, but enable cell-tower an wlan locationing.
Especially the wlan locationing gives an indirect hint that the persons are near the same wlan
I need to open the incoming audio stream from the microphone and address it instantly to the headphones so you hear what is being acquired by the microphone.
it is not possible to do this using xna microphone, because it is necessary to pass through a buffer that slows down the headphone listening. I think needs to use Windows.Phone.Media.Capture as AudioDevice and perhaps AudioSink but do not understand how. Do you have any suggestions?
thanks
It looks you've got tighter latency requirements than the a previous question in this area. For phone 8 the best latency result is probably going to be to use the DirectX audio APIs from C++.
The documentation on MSDN will tell you which APIs you can use from the phone, but if I know MSDN I expect you will need to go digging to find examples of how to use them - and when you find them you'll need to be familiar with C/C++, and how to set up a "hybrid" C#/C++ project in Visual Studio.
Even then you'll have to try and it out on a real phone to see if the latency performance is good enough for your purposes.
I'm evaluating building an application which, simplifying the requirements, records from a microphone equipped small computer (eg: a Raspberry PI) and streams the digitalized sound over wireless connection in almost realtime to a server on the same LAN (No Internet involved). Ideally, the server application would record different streams from various wifi microphones and mix them together..
I'm currently looking into obtain a pretty good quality out of this, comparable somehow to a 128Kb stereo MP3.
At this point, I'm still evaluating options here, so I'm also looking to see your opinion on the feasibility of this.. if you think it's doable, what libraries, APIs, protocols would you use? Consider that this will be likely deployed on Linux based embedded computers (for the wifi mic part) and Linux based servers.
Thanks for your help.
I listen often Shoutcast on the iPad. This sounds pretty good to me. I do not know the kb/s rate there, I think they stream mp3. So I do not think this would be a big issue if you can live with the quality loss which comes with mp3. The bigger issue might be, how good your wireless connection is. When your network is pretty busy, there are more errors and lower speed. It also depends on the wireless standard and the hardware you are using. You may think about buffering, too.
Can anyone suggest a good audio QOS monitoring tool?
If its a open source one and freely available, it will be great. Its fine otherwise too.
Iam trying to measure QOS for a softphone on a PC and also on a mobile.
Try the following link and search for QoS: http://www.slac.stanford.edu/xorg/nmtf/nmtf-tools.html
Bear in mind that a users perception of the quality of a voice call is not an absolute thing so treat any results with this in mind. See: http://en.wikipedia.org/wiki/PESQ for one way (probably the most accepted way) to measure and score voice quality.
You can measure absolutely the delay and packet loss which may give you the information you need.
We have developed a tool for Measuring QoS for both Audio and Video and have some patented algorithms to find out the MOS for Video and used E-model for Audio MOS.
It has been tested on VoIP calls over LTE.
You can check one more tool from EMpirix called Hammer Call analyser or any Elecard tool as well.
But i don't know of any freeware tool in this domain.
I have done voice quality monitoring system for conferencing services provider. Tools used: Empirix Hammer and CallMaster. System in a nutshell: every so often two virtual participants called into conference call. Then each of them spoke a phrase and the other one measured PESQ score. Results were sent to another monitoring system. This worked well. I think PESQ measurement is the way to go for automated testing.
which API or library on which mobile OS is to be used when one needs to write a code to use the phone's IrDA to create the necessary impulses to remote control consumer electronics e.g. a HDD media player?
Is maybe a certain mobile OS better suited for that kind of application than others?
First you need to know that IrDA is not the best choice for remote control. It can be done, but IrDA is by design high speed/low range, you can emulate low speeds but ranges (IMO) are far from practical usage (Nokia e50 is able to control digital camera shutter from 2-3m... with very, very careful aiming). The amount of hacking needed to achieve this is shown here, you basically need to trick IrDA to send correct impulses with correct frequency.
The second thing is that CIR remote control is not as simple as you might think. There are countless standards that differ in used frequency, modulation, wavelength, command codes and so on. You need to know what you want to support. LIRC site can be very helpful in determining that http://lirc.sourceforge.net/remotes/. Approachable explanation of what it all means is available here: http://www.sbprojects.com/knowledge/ir/ir.htm
As for ready made libraries and platforms... I honestly don't know. I've seen it done on PocketPC (nevo among others) and Symbian S60 (irRemote). Haven't seen working J2ME app yet.
Last time I needed the IR remote I hacked it together using IR diode, AVR ATTiny and surprisingly short piece of assembly :)