Welcome, Guest
Username: Password: Remember me
*****PLEASE, CHECK ALL PREVIOUS TOPICS, BEFORE CREATING A NEW ONE! DUPLICATED TOPICS WILL BE DELETED!*****

TOPIC: ASIO Low Latency Audio Driver Support In ESDR3

ASIO Low Latency Audio Driver Support In ESDR3 13 Jan 2022 22:01 #1

  • John-KC2QMA
  • John-KC2QMA's Avatar
  • OFFLINE
  • Posts: 141
  • Thank you received: 83
I have been thinking about how having Direct ASIO audio driver support coded into ESDR3 could make a big improvement in audio latency.

What Is ASIO?
ASIO stands for Audio Stream Input/Output.

ASIO is a sound card driver protocol created by the German music company Steinberg.
The reason ASIO was created was out of necessity, when a musician wants to record with a computer if there is too much latency there will be such a delay in the audio the drummer would not be able to keep time or the singer would be out of time basically just a mess. What was needed was Real-Time audio with negligible latency.
That’s where the ASIO driver comes in.

One of the biggest issues we have with computer based SDR radio is latency. Latency can come from many areas in the system such as Video, CPU utilization and so on but for the most part most of the latency is caused by the audio stack in an OS like Windows.
None of this latency matters when you are listening to music or getting a notification sound when you get an email. But when you need the audio to be Real-Time the old MME, WASAPI drivers just won’t work.

Now since ESDR3 is an SDR application running on a personal computer it makes sense to me to add ASIO driver support right into ESDR3 so users can add a low latency ASIO audio interface to their system for the lowest possible latency and the highest audio fidelity. The added benefit to very low latency is even more apparent with CW, SO2R, QSK and Digital modes where low latency and wide audio frequency response is critical.

The best alternative for applications that need low latency is to use the ASIO (Audio Stream Input/Output) model, which utilizes exclusive mode. After a user installs a 3rd party ASIO driver, applications can send data directly from the application to the ASIO driver. However, the application has to be written in such a way that it talks directly to the ASIO driver.

The image below shows why there is so much latency on for example a Windows PC.
Look at all the steps the audio has to pass through the Windows Audio Stack. But with ASIO audio is sent directly the ASIO driver.

The following diagram shows a simplified version of the Windows audio stack
low-latency-audio-stack-diagram-1.png

Here is a summary of the latencies in the render path:
1. The application writes the data into a buffer
2. The Audio Engine reads the data from the buffer and processes it. It also loads audio effects in the form of Audio Processing Objects (APOs). For more information about APOs, see Windows Audio Processing Objects.
3. The latency of the APOs varies based on the signal processing within the APOs.
4. Before Windows 10, the latency of the Audio Engine was equal to ~12ms for applications that use floating point data and ~6ms for applications that use integer data
5. In Windows 10, the latency has been reduced to 1.3ms for all applications
6. The Audio Engine writes the processed data to a buffer.
7. Before Windows 10, this buffer was always set to ~10ms.
8. Starting with Windows 10, the buffer size is defined by the audio driver (more details on this are described later in this topic).
9. The Audio driver reads the data from the buffer and writes them to the H/W.
10. The H/W also has the option to process the data again (in the form of additional audio effects).
11. The user hears audio from the speaker.

Here is a summary of latency in the capture path:
1. Audio is captured from the microphone.
2. The H/W has the option to process the data (i.e. to add audio effects).
3. The driver reads the data from the H/W and writes the data into a buffer.
4. Before Windows 10, this buffer was always set to 10ms.
5. Starting with Windows 10, the buffer size is defined by the audio driver (more details on this below).
6. The Audio Engine reads the data from the buffer and processes them. It also loads audio effects in the form of Audio Processing Objects (APOs).
7. The latency of the APOs varies based on the signal processing within the APOs.
8. Before Windows 10, the latency of the Audio Engine was equal to ~6ms for applications that use floating point data and ~0ms for applications that use integer data.
9. In Windows 10, the latency has been reduced to ~0ms for all applications.
10. The application is signaled that data is available to be read, as soon as the audio engine finishes with its processing. The audio stack also provides the option of Exclusive Mode. In that case, the data bypasses the Audio Engine and goes directly from the application to the buffer where the driver reads it from. However, if an application opens an endpoint in Exclusive Mode, then there is no other application that can use that endpoint to render or capture audio.

Is any Idea perfect NO but it's always worth trying.

Thanks
KC2QMA
Transceiver: MB1 Prime 2021
HF Amplifier: Ameritron AL-1200
HF Antennas:10-80 Vertical, 10-80 Fan Dipole
VHF Antenna: Commet GP-9
Last Edit: 13 Jan 2022 22:40 by John-KC2QMA.
The administrator has disabled public write access.
The following user(s) said Thank You: R3IIN, iw7dmh, Smiffy333, Johan, OK8WW, K3CDY

ASIO Audio Driver Support In ESDR3 13 Jan 2022 22:01 #2

  • John-KC2QMA
  • John-KC2QMA's Avatar
  • OFFLINE
  • Posts: 141
  • Thank you received: 83
If you like this Idea please click the "THANK YOU" button at the bottom of this post.
Transceiver: MB1 Prime 2021
HF Amplifier: Ameritron AL-1200
HF Antennas:10-80 Vertical, 10-80 Fan Dipole
VHF Antenna: Commet GP-9
The administrator has disabled public write access.
The following user(s) said Thank You: K3CDY

ASIO Audio Driver Support In ESDR3 14 Jan 2022 05:59 #3

  • VK6NX
  • VK6NX's Avatar
  • OFFLINE
  • Posts: 338
  • Thank you received: 161
:rofl:


"... ExpertSDR2 supports the following drivers: MME, WDM-KS, WASAPI, ASIO ..." Ⓒ
The administrator has disabled public write access.

ASIO Audio Driver Support In ESDR3 15 Jan 2022 16:36 #4

  • Smiffy333
  • Smiffy333's Avatar
  • OFFLINE
  • M0MWS
  • Posts: 33
  • Thank you received: 1
Have tried the unbuilt and also the behringer supplied driver for my UMC202HD interface but am finding the waveform is asymetric at times.
Sounds very strange, i wonder if others have seen and heard this?
The administrator has disabled public write access.

ASIO Low Latency Audio Driver Support In ESDR3 16 Jan 2022 15:39 #5

  • kc2rgw
  • kc2rgw's Avatar
  • OFFLINE
  • Posts: 99
  • Thank you received: 33
I think maybe I'm confused...eesdr3 has ASIO here.
Attachments:
The administrator has disabled public write access.

ASIO Low Latency Audio Driver Support In ESDR3 16 Jan 2022 20:26 #6

  • John-KC2QMA
  • John-KC2QMA's Avatar
  • OFFLINE
  • Posts: 141
  • Thank you received: 83
When windows uses the ASIO Driver/Hardware for things like playing music or watching youtube video’s the you can get very good low latency.

But when you code the application like many of the popular DAW’s like Cubase, Pro tools, Cakewalk and so on, these programs are Optimized/Coded to take direct control over the ASIO Driver witch gives you better stability and extremely low latency.
Transceiver: MB1 Prime 2021
HF Amplifier: Ameritron AL-1200
HF Antennas:10-80 Vertical, 10-80 Fan Dipole
VHF Antenna: Commet GP-9
The administrator has disabled public write access.
Time to create page: 0.103 seconds