PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.39k stars 291 forks source link

Adding test to resolve Issue 201 #844

Closed Vimal-Krishna closed 8 months ago

Vimal-Krishna commented 9 months ago

Adding a new test - patest_enumerate_default_latency

Issue - https://github.com/PortAudio/portaudio/issues/201

Outputs in this format to the cmd line:

| X |  42 |  == 1 - LG HDR 4K (AMD High Definition Audio Device) [Loopback] == | Windows WASAPI |   0.0100 |   0.0030 |   0.0000 |   0.0000 |

|   |  68 |  == Headset (@System32\drivers\bthhfenum.sys,#2;%1 Hands-Free AG Audio%0;(HC 2000BNC)) == | Windows WDM-KS |   0.0853 |   0.0100 |   0.0853 |   0.0100 |

Included the '==' markdown to disable textile formatting within the name field so that special characters like @ do not cause a formatting issue.

image

Tested the output on https://textile-lang.com/

image
RossBencina commented 9 months ago

Please fix the compilation errors in CI too.

Vimal-Krishna commented 9 months ago

Thanks for the feedback folks! I think the CI issues should be fixed as well. Let me know if the headers are ok. (snipped to show entries with 'X')

image
RossBencina commented 8 months ago

Thanks this is looking good. The only thing I'm thinking is that it's a bit hard to interpret the 0.0000 entries because we can't see whether it's an input-only or output-only device where 0 is correct, or whether it's a bad value.

What do you think about adding another column Input/Output Channels with the channel counts for example 2/0 for a stereo input-only device.

Vimal-Krishna commented 8 months ago

Thanks this is looking good. The only thing I'm thinking is that it's a bit hard to interpret the 0.0000 entries because we can't see whether it's an input-only or output-only device where 0 is correct, or whether it's a bad value.

What do you think about adding another column Input/Output Channels with the channel counts for example 2/0 for a stereo input-only device.

Yes, seems like a useful addition. I can make the change this weekend. How about we put in a value like N/A instead of 0.0000 for the output latency of an input-only device? And also exclude it when deciding if a device needs the 'X' marker. So the 'X' s will still be the only thing to look for when looking at the report.

Vimal-Krishna commented 8 months ago

Devices 12 to 23 had an X marker before. Now they don't since the channel count is zero for either input or output. textile-lang com_

philburk commented 8 months ago

@Vimal-Krishna - Thanks for this contribution. The code looked very nice. We appreciate you closing this old issue from 2011.

Vimal-Krishna commented 8 months ago

@RossBencina @philburk Thank you! I enjoyed working on it. I hope to continue working on the project. 🙂