Share via

[BUG]: AudioGraph with FileInputNode/FrameInputNode -> FrameOutputNode completes quantums as fast as possible.

Tom Huntington 216 Reputation points
2021-12-10T03:00:29.8+00:00

It just dumps the FileInputNode on my FrameOutputNode, instead feeding it in at the correct rate. The quantum length is less than 1ms when we would expect 10ms to get the correct sample rate. To get the quantums to happen every 10ms we can add a AudioFrameOutputNode as follows:

   fileInputNode.AddOutgoingConnection(frameOutputNode);  
   fileInputNode.AddOutgoingConnection(deviceOutputNode);  
   deviceOutputNode.Stop();  

However, if I do this I run into another bug https://learn.microsoft.com/answers/questions/658616/bug-audiographcreatedeviceoutputnodeasync-fails-if.html.

[The following appears to have been fixed] I have also ran into another bug, but this was hardware dependant. This time with deviceInputNode -> frameOutputNode. For a specific render device if the sample rate is 44100 Hz, then the we get a quantum size of 448 every 10ms (a sample rate of 44800 Hz). If the sample rate is anything else then the quantum's are spaced appropriately. Picking a different primary render device can make the problem go away.

Developer technologies | Universal Windows Platform (UWP)

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.