Access system audio in UWP App - windows

I would like to write an app that
accesses the audio by being played by the user in another app
analyzes that audio
displays the analysis to the user
however, I have not found anything that makes this seem possible. Can apps access access the audio being played through the user's speakers as a byte stream or is this not built into the API?

Can apps access access the audio being played through the user's
speakers as a byte stream or is this not built into the API?
You can do that(Loopback recording), but you need to program with low level APIs - WASAPI. For available APIs for UWP, check the Core Audio part in Win32 and COM for Windows Runtime apps and Universal Windows Platform (UWP) apps (multimedia)
Here is an old article for 8.1 app, but it still applies to UWP on concept level. And Microsoft has provided a sample on GitHub about WASAPI and Core Audio API, which may help you to familiar with the APIs and understand how to make it work in UWP app.

Use the MediaCapture class to capture audio. link to docs

Related

Apple DriverKit SDK Camera driver registration

I am new to the Apple DriverKit SDK an i am not clear about how register my device driver so it would be available as a Camera in the OS. Do i have to register a streaming function in the Start function of the IOService? I searched all over the internet for an answer but i could not find on.
I need to read data from a custom USB Camera and then make it available via a custom driver.
Can any of you guys help me?
Support for cameras and video capture devices is not implemented as special I/O Kit classes in macOS (and therefore also not in DriverKit), but rather entirely in user space, via the Core Media I/O framework. Depending on the type of device a DriverKit component may be necessary. (e.g. PCI/Thunderbolt, which is not available directly from userspace, or USB devices where the camera functionality is not cleanly isolated to a USB interface descriptor) This dext would expose an entirely custom API that in turn can then be used from the user space CoreMediaIO based driver.
From macOS 13 (Ventura) onwards, the Core Media I/O extensions API should be used to implement a driver as this will run in its own standalone process and can be used from all apps using Core Media.
Prior to that (macOS 12 and earlier), only a so-called Device Abstraction Layer (DAL) plug-in API existed, which involved writing a dynamic library in a bundle, which would be loaded on-demand by any application wishing to use the device in question. Unfortunately, this raised code signing issues: applications built with the hardened runtime and library-validation flags can only load libraries signed by Apple or by the same team as signed the application itself. This means such apps can't load third party camera drivers. Examples of such apps are all of Apple's own, including FaceTime.

Xamarin and play videos with FairPlay or other DRM

I'm trying to stream a content from Azure Media Services, but I can't get it to work, so I'm wondering if it's doable, and if so, how do I achieve it? The content is protected by FairPlay. Similar issues on Android and Windows.
I tried to use Xamarin Media Player but it doesn't work with FairPlay because it requires an ExoPlayer2 implementation which is not yet in the plugin.
I don't think that is possible with the current version of the Xamarin Media Manager. Let me also correct the mistaken assumption about ExoPlayer2. ExoPlayer is a strictly Android only playback component, and so has nothing to do with FairPlay at all, as FairPlay is Apple only technology.
For FairPlay to work, you have to listen to events that are specific for FairPlay to handle the license exchange. Those do not seem to be implemented in Xamarin Media Manager as far as i can see. So you would have to do those platform specific implementations yourself. Information about these can be found on the Apple Developer site.
For Android, you would likely want to go with Widevine, which is implemented in ExoPlayer. I can't find any documentation for Xamarin Media Manager on how to set that up either though.

VOIP application - MediaElement output on ear-piece

I am developing a SIP based VOIP Application and stuck on following issue,
1 -- I am Able to play with the SIP Protocol and Server and able to get Audio data in PCM 8000 Sampling rate format,
2 -- for Playing Audio i am using MediaElement framework, and using this framework its giving output in SmartPhone multimedia Speaker, Is there anyway to get default output on the Ear-Piece, and let user to choose, whether they want to attend the call trough Speaker or through Speaker,
it seems WP8 has got this support, but i didn't find it for WP7
This is not possible.
Unless, you'll contact Microsoft and negotiate yourself a privilege to compile native ARM code. Some companies (e.g. Tango, Spotify, Garmin) did.

Is there a new Midi API for Windows Vista/7/8?

I know the midiXxx API, but I saw it is currently listed under 'legacy' in msdn.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd743619(v=vs.85).aspx
Is there some other API i should use to target the newer Windows versions?
Will the old API still work on Windows 7 and 8?
Thanx,
Marc
Last Friday Microsoft released a preview Windows Runtime API for MIDI. Check out the //build/ session here:
http://channel9.msdn.com/Events/Build/2014/3-548
MSDN: http://msdn.microsoft.com/en-us/library/windows/apps/dn643522.aspx
Although a preview, apps can go live and be deployed to the Windows Store. Please let us know what you like or don't like. Happy app building!
For dektop applications (non metro) you can still use the legacy API safely.
Sadly for WinRT/Metro, there is no midi support at all (see this discussion on msdn).
Hope they will change that.
Catflier is correct that there is no direct support (at the API level) for MIDI in WinRT. However, if you are wanting to have MIDI-like capabilities in your app, there are workarounds. A protocol growing in popularity is the network-based OSC (Open Sound Control). Since it is network-based, you can use that.
For example, one can use external hardware like The Missing Link which translates from MIDI to OSC. You hook up your MIDI device to The Missing Link, which then translates to OSC messages that are sent to the computer. Your app can then receive OSC messages and talk to the MIDI device. I don't have any code to show here, but I've seen demos of this working in-action.
You can see OSC in use on iOS as well with popular apps like TouchOSC.

Windows phone based live video streaming Application

i am hoping to develop a live video streaming app for windows phone.
I want to know what protocols and libraries support are provided for windows phone?
I want to implement a sort of Video chat application..
An example for Android and Iphone:
http://techcrunch.com/2010/03/24/knocking-live-video-now-lets-you-stream-between-android-and-iphone-devices/
As you have an IIS-7.5 tag I am going to assume you are talking about streaming from a server to multiple WP7 devices. In which case you may want to consider using IIS 7.X for the streaming portion. The following link shows how you can build the client app for Windows Phone 7: http://www.iis.net/community/default.aspx?tabid=34&g=6&i=2020
The sample requires the IIS Smooth Streaming Client (1.1), Silverlight 4, and the Visual Studio Windows Phone 7 Developer Tools.
At the moment live streaming is possible but it ill not be allowed on AppHub for distribution. This is because you have to hack the dll's. This is because when you switch from your app to the camera it physically goes to the camera mode. To live stream you have to override this.
Her is the Code Project

Resources