i want to capture/record currently playback audio in UWP or Windows Phone 8.1 any, same thing is done by "MEE dj" UWP app in its app, that app is ability to capture currently playing audio in the app. Anyone know about that share your answer please.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Windows.Media.Audio namespace
containsAudioDeviceInputNode
,AudioDeviceOutputNode
,AudioFileInputNode
,AudioFileOutputNode
and so on. Mic for input isAudioDeviceInputNode
, but for play back music file you need to useAudioFileInputNode
.For saving to storage as I said above, we need to use
AudioFileOutputNode
. Here is a simple demo, you can load a file for recording, and choose a file from storage for saving the recording result. Code as follows:XAML Code
Code behind
For other complex features, please still reference the official sample.
You can use the APIs in the
Windows.Media.Audio
namespace to create audio graphs for audio routing, mixing, and processing scenarios. For how to create audio graphs please reference this article.An audio graph is a set of interconnected audio nodes. The audio file you want to record supply the "audio input nodes", and "audio output nodes" are the destination for audio processed by the graph, audio can be routed out of the graph to the target audio files. In the "MeeDJ" windows store app, it can mix two audio and record it into one. In this situation we can use "submix nodes" which take audio from one or more nodes and combine them into a single output .
And for starting and stopping recording we can try to use Starting and stopping audio graph nodes to implement. You can also try to Adding audio effects as the "MeeDJ" did.
More features and sample code please reference the official sample.