Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What would be the present day best approach for recording audio in a UWP C# app? #1

Open
Noemata opened this issue Jan 20, 2021 · 6 comments

Comments

@Noemata
Copy link

Noemata commented Jan 20, 2021

Any suggestions on what you would consider the best approach to record low latency audio in a present day (2021) UWP app?

I'm just getting back into this and suspect there may be better options at present.

@RobJellinghaus
Copy link
Owner

RobJellinghaus commented Jan 20, 2021 via email

@Noemata
Copy link
Author

Noemata commented Jan 21, 2021

As far back as the Windows 8.x days I read a number of Microsoft issued docs describing latency of under 10ms. Are these docs fake news? (https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/low-latency-audio)

What about the QuantumSizeSelectionMode property?

What is the best option, given I really don't have an option within my large UWP application?

@RobJellinghaus
Copy link
Owner

RobJellinghaus commented Jan 22, 2021 via email

@RobJellinghaus
Copy link
Owner

RobJellinghaus commented Jan 22, 2021 via email

@Noemata
Copy link
Author

Noemata commented Jan 22, 2021

Thank you very much. I'll look into it today. What caused you to think latency was a problem? Sometimes you have a cascade of latency issues. For example, touch events that you get from something like a UWP button control have a considerable amount of latency. A mouse click is fairly quick, but it too has around 15ms of latency. Measuring latency is also hard, unless you are able to leverage something like multi-media timers. Just curious.

@RobJellinghaus
Copy link
Owner

The latency I am referring to is audible latency in the loop from recording, to buffering, to replaying in realtime. My app requires end-to-end audio latency of under 10ms. This is detectable simply by tapping on the microphone; if there is perceptible delay between tapping and hearing the amplified tap, the latency is too large. In my testing with AudioGraph the minimum achievable latency was on the order of 128msec (as reported by the AudioGraph API itself), which was nowhere near good enough for crisp real-time performance involving precisely layering multiple recordings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants