Share via

[BUG] AudioGraph::CreateDeviceOutputNodeAsync fails if Chrome is playing youtube

Tom Huntington 216 Reputation points
2021-12-10T02:29:42.367+00:00

It fails with AudioDeviceNodeCreationStatus::DeviceNotAvailable, and this is regardless of the choice of primary render device. The bug can be reproduced with the UWP AudioCreation sample by adding the following lines to the CreateAudioGraph() method in Scenario one.

The problem goes away if ChannelCount = 2.

private async Task CreateAudioGraph()
        {
            // Create an AudioGraph with default settings
            AudioGraphSettings settings = new AudioGraphSettings(AudioRenderCategory.Media);

            var encoding  = new Windows.Media.MediaProperties.AudioEncodingProperties();
            encoding.BitsPerSample=32;
            encoding.ChannelCount=1;
            encoding.SampleRate=44100;
            encoding.Bitrate=encoding.BitsPerSample * encoding.ChannelCount * encoding.SampleRate;
            encoding.Subtype="Float";
            settings.EncodingProperties = encoding;

            ...

}

I have also found other bugs, and dubious behaviour. It seems AudioGraph was quite rushed.

Developer technologies | Universal Windows Platform (UWP)

Answer accepted by question author

Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,871 Reputation points
2021-12-14T05:14:53.113+00:00

Hello,
Welcome to Microsoft Q&A!

AudioGraph::CreateDeviceOutputNodeAsync fails if Chrome is playing youtube

I tried above code, it works well in AudioCreation sample scenario1. it never throw exception when Chrome is playing video. it looks more related with your physical device, please try to exclude it manually, if the problem is still exist, please try update your os to latest version.

Thank you.


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.