UWP Real time audio on windows 10 - c#

I would like to ask you: In my company I should develop the communication app. Something like Skype etc. We have our custom SIP implementation. Data are encrypted by RSA, or something like that. Now, I'm looking for some solution, how to implement capturing audio on windows 10 (desktop, phone)
I found something about WASAPI, XAudio2. I think, the best option is WASAPI. But It will be working on Windows 10 Mobile? Or would you recommend me any third part libraries like SharpDX, NAudio? I need echo cancellation, and Im not sure, if WASAPI supports echo cancellation.
All advices will be appreciated.

WASAPI is definitely available on windows mobile 10.
but you could capture the audio directly with the "voice capture dsp"
https://msdn.microsoft.com/en-us/library/ff819492(v=VS.85).aspx
i found no info about its availability on win mobile 10, but it's really probable you can use it there too.

Related

Developing for BLE windows 8.1

I've found scatterings around the web but no concise answer. Everyone talks about developing BLE for Android and iOS, but how does one develop for Windows in C# (.NET)?
I've found this
http://social.msdn.microsoft.com/Forums/windowsapps/en-US/2f236b71-a6ac-4c42-aef3-723c3691cbf8/how-to-discover-connectdisconnect-and-reconnect-to-bluetooth-low-energy-device-from-windows-81?forum=wdk
I've tried the C# example, but I don't have any devices with health profiles (and I don't know how to set searching for a generic device). I did try modifying the code but it didn't help
I have a sensor tag and also a generic BLE HM-10 module useful for arduino projects. My iPhone can find both of these devices using the SensorTag application or LightBlue.
I also found this
http://orcs.sebsoft.com/openvision/index.php/8-vision/37-how-to-acquire-data-by-c-from-bluetooth-4-bluetooth-low-energy-ti-ble-keyfob-ti-sensor-tag
I tried starting it up and scanning, but it didn't find any BLE devices. I don't even know if what I'm doing it right.
I have a BT 4.0 USB dongle.
How on earth do I detect a bluetooth device?
Thanks
Here is a two-part blog post about enumerating and configuring BLE devices in Windows 8.1.
BLE for developers in Windows 8.1 Part I
BLE for developers in Windows 8.1 Part II
After reading this, the documentation on MSDN seemed to make a lot more sense.
This is just a guess, but if you're using a generic HM-10 BT module, you might need to program it first to be discoverable and pairable.
You do that using AT commands which you can find in the HM-10 datasheet. The way to send those commands to the module is up to you, you can either use a microcontroller, Arduino for example, or via a serial console.

How to detect unplugged headphone jack in WinRT?

Is there a way to get notified whenever a headphone jack is unplugged in a WinRT app? I want to be able to pause MediaElement playback when it happens to prevent the sound from leaking out through loudspeakers.
Try the following:
Windows::Devices::Enumeration::DeviceInformation::CreateWatcher(Windows::Devices::Enumeration::DeviceClass::AudioRender);
This works on WinRT.
See MSDN for more detail on the method:
http://msdn.microsoft.com/en-us/library/ie/windows.devices.enumeration.deviceinformation.createwatcher
Jack detection notification is exposed through IMMNotificationClient::OnDeviceStateChanged. Just tried it on win8 desktop, OnDeviceStateChanged gets called with DEVICE_STATE_UNPLUGGED and DEVICE_STATE_ACTIVE when (un)plugging a device. Sadly that part of wasapi is documented as desktop only so i guess there's no way to do it in WinRT.
The only way it should be possible is through WASAPI - Windows Audio Session API (see WASAPI sample).
Sadly, WASAPI isn't exposed in c#, only in C++ (but I'm not sure if it covers jack detection or not. I honestly don't believe that they expose jack detection at the API level...).
Hopes this help.

how to make call from pc using local landline phone services

I have a desktop application of address diary, developed in C# .Net.
I want to make call from software throw land line phone service,
in my office we have 8 phone lines, so i want to select line before call,
i want to use headphone and mic in place of phone instrument.
how to connect phone lines to pc. i have more then 8 phone lines
is it possible ? if yes then how and which hardware i need for this.
Have you thought of the Skype API: http://developer.skype.com/public/skypekit
or
http://www.twilio.com
Get rid of the landlines and use a service. Much easier in my opinion. Then it would be far more scalable as well.
If you want to go down the telephony services path check out this library: https://github.com/markjulmar/atapi.net/
Hardware for landlines would just include 8 modems and selecting which one to use, before making a call.
I would assume that the atapi library contains functions to select the audio input and output. If not there are plenty of c# libraries for recording audio, in which you could pass the stream through to the library.
I wasn't going to point you down this direction but as per #Saif Khan comment you can use Asterix.
Using Asterix
Step 1 - Get a server install Asterix on it. http://www.asterisk.org. It's open source.
Step 2 - Get supported hardware e.g. http://www.asterisk.org/hardware
Step 3 - Communicate to it with http://sourceforge.net/projects/asterisk-dotnet/ (open source c# to asterisk library.
This maybe overkill for you, I don't know. I suppose I shouldn't assume :)
Since Google Voice is still free in United States and Canada. You can use this Google Voice API in C#.
http://sourceforge.net/projects/gvoicedotnet/
Doesn't want to sound like a noob, but did you try out Windows Dialer? You will need x number of 56k dialup voice modem depending on the no. of connections you have and you want to use.
It should work just fine. Test it out, and if it works well, you can get your app synced with your existing software to export the number to the dialer upon calling. (There is no such functions on the dialer app yet.)

Windows mobile, how do I receive callbacks from the camera?

I am developing an C# app in WM 6. I am using CameraCaptureDialog to open the camera.
I would need to receive callbacks from the camera, I know this method is not implemented by CameraCaptureDialog.
I would need for Windows Mobile, sth similar to this method in Android:
camera.setOneShotPreviewCallback(previewCallback);
Do you know any other library I can use to do this?
The CameraCaptureDialog isn't going to be of much use at all. To get access to the camera on a WinMo device, you need to use a DirectShow filtergraph. There's a reasonably good article on CodeGuru that covers WinMo specifically.

How can I control my winmo phone?

I have been trying to find a way to control my winmo phone from my pc. (HTC S740)
What I want is to be able to call a number from an application, answer the phone from an application and hangup the phone from an application. It should also be able to track how long the ongoing call has been.
Any libraries out there that lets me make such an application with C#?
(The phone is connected to the pc via usb in Windows 7.)
You can use RAPI to invoke functionality on the device. You might need to write a wrapper.
I believe that this answer by ctacke should help you perform the task.
You can look at OpenNETCF library, which have many utilities to call native APIs that can help you, but i didn't hear of any library to help control your phone remotely.

Categories

Resources