2

It's hard to find anything on the web reliable for audio rendering (there is capture, record and save to file, but rendering to speakers are rare using Media Foundation). The problem I have is that the tutorial of audio rendering provided by Microsoft are... all for desktop application. There is one that could be used for UWP as it is using WASAPI:

But... the uuid of lines fails on UWP:

const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
const IID IID_IMMDeviceEnumerator = __uuidof(IMMDeviceEnumerator);
const IID IID_IAudioClient = __uuidof(IAudioClient);
const IID IID_IAudioRenderClient = __uuidof(IAudioRenderClient);

Someone seemed to have the same problem: WASAPI + windows store app initialization

Error: operand of __uuidof must have a class or enum type for which __declspec(uuid('..')) has been specified.

Nobody really answered that as well and even more the link he provides is not reachable (or at least not anymore). I Can't figure out how to activate the output audio device and stream audio to it on Universal Windows Platform.

I am using Media Foundation for a specific scenario and I use a Source Reader to get asynchronously audio decoded PCM samples.

While there are samples that should work on Standalone desktop builds, I can't find anywhere something that is compatible with Universal Windows Platform...

Anyone has done something similar (audio rendering using Media Foundation or WASAPI with C++ for UWP?) or at least got better links that would help me?

Thanks for your help!

Community
  • 1
  • 1
Tagh_azog
  • 21
  • 3
  • *"this does not work"* is not a problem statement. Please take the [tour], visit the [help], and read [ask] in particular. – IInspectable Mar 01 '17 at 20:02
  • 1
    I linked just right below one guy with the error statement... – Tagh_azog Mar 02 '17 at 08:03
  • Did you check this blog : https://blogs.msdn.microsoft.com/mediasdkstuff/ – mofo77 Mar 06 '17 at 20:23
  • 1
    Yes but nothing that helped me. Simply, I have a BYTE* buffer containing the audio samples, as simple as that. I want that buffer to be played on speakers... in C++, using Media Foundation, for UWP. (so no desktop only code that do not work for UWP). As such, I can't use for instance the MFCreateAudioRenderer with a MediaSink since it works only for desktop and not UWP. – Tagh_azog Mar 08 '17 at 10:48

0 Answers0