03-12-2025 08:55 PM
04-14-2025 04:33 PM - edited 04-14-2025 04:35 PM
I'm super interested it trying out your ASIO driver. I have put together some LV for audio experiments using a Behringer UMC404HD, 4 channel interface. With the standard Windows DirectX drivers I can only access all 4 channels if I split them into 2 stereo pairs, each with it's own buffer, and I loose phase coherency between all 4 channels. ASIO should, I believe, fix this.
I'm using LabVIEW 2024 Q3 Community Edition which is 32 bit. However, your driver appears to be 64 bit.
Can you possibly recompile it for 32 bit?
Many thanks,
Liam.
04-15-2025 02:19 PM
Hi Liam,
Attached is the 32-bit version of the ASIO DLL. I do not have 32-bit LabVIEW on my system, so I could not test the DLL, but I just recompiled the code in Visual Studio with x86 as the target platform. Please test the attached DLL and let me know if it works.
04-15-2025 04:11 PM
Thanks LVCoder for superfast response.
That seems to work. I was able to run your ASIO_Input_Output_LV.vi in LV2024 Q3 Community Edition. It detects can send / receive audio on all four channels on the UMC404HD (one at a time as you have coded).
I still have to incorporate your driver and vi's into my code to test them properly with all four channels simultaneously.
Cheers, Liam.
04-15-2025 04:51 PM
sounds great. let me know if you need any help making the code work for multichannel I/O.
05-15-2025 12:06 PM
LVCoder,
It has been some time since I looked at this. I'm now trying unsuccessfully to understand some of the DLL library calls used in your VIs.
Specifically, can you share more info on the following...
ASIO_LV_DLL.dll:writeToStream
ASIO_LV_DLL.dll:readFromStream
These appear to support only a single channel. How can these be used for multichannel?
Many thanks,
Liam.
05-18-2025 05:51 PM
Hi LVCoder. I think I figured it out but I needed to modify one of your VIs.
What was unclear to me was that the sample data in the library calls for multi channel is stored in the same array as single channel, each channel concatenated.
The changes I made to your ASIO_LV_Perform_Sync_Measurement.vi were as follows...
Remove the 'index array' on the 'recording' output (channel 1 only) and instead return the full 2D array with all channels (renamed 'recordings').
Change the read chunk size from 1024 to 512. I got some very strange behaviour with values other than 512. e.g. using 1024, some channel recorded data missing (replaced by zeros) on every second call to 'readFromStream'. The value 512 works independent of the selected buffer size. I've tested with buffer sizes 2048, 1024, 512, 256. Yes, even buffer size 256 works with a read chunk of 512!
Below you can see the result of my simple multichannel test.
This is a simple external loopback check on the UMC404HD. each output/input with a different frequency sinewave. Note that the first 512 samples recorded are always zeros. After that the inputs are recorded but there is a further latency delay (~825 samples) before the output waveforms appear.
My test code and the the modified 'ASIO_LV_Perform_Sync_Measurement_edit2.vi' are attached.
Please check if the code works for you. Any input you have on the magic number 512 would be welcome.
Cheers, Liam.
05-20-2025 04:43 PM
Hi Liam,
Could you print the device info and check what the preferred buffer size returned by ASIO_Get_All_Device_Info.vi ?
There is nothing magical about the number 512 in the ASIO driver code, but all the internal working buffers in the code are of the preferred buffer size set by the ASIO driver in the hardware. If the preferred buffer size returned by UMC404HD is 512, then that would answer the question of why other buffer sizes are giving strange behavior.
I could not run your updated vi since I am still running vintage LabVIEW 2014. I plan to update to the latest version sometime next month.
05-21-2025 04:04 AM
Hi LVCoder. That explains.
Below is the device info for the UMC404HD with sampling frequency equal 48000. The preferred buffer size is 512.
I had noticed since my last post that if I change the sample frequency, I need to change the buffer size accordingly...
Fs = 44100 or 48000, Buffer = 512
Fs = 88200 or 96000, Buffer = 1024
Fs = 176400 or 192000, Buffer = 2048
This tallies with the device info, e.g. for 96000
I would like to be able to program the buffer size rather than using preferred value. This should allow me to reduce latency. How can this be done?
I've attached v14 files which I hope work for you.
Cheers, Liam.
05-21-2025 06:24 PM
Hi Liam,
I could not open the ASIO_LV_Perform_Sync_Mesurement_edit2_v14.vi as LabVIEW says it's saved in LV24.
However, I modified the ASIO dll so that the buffer size is now user-defined. When the ASIO device is initialized, the buffer size is set to the preferred buffer size, but the user calls "ASIO_LV_Set_Buffer_Size.vi" to change the internal buffer size. Make sure to put the same buffer size in your audio interface driver software.
Attached are the latest DLL files and ASIO vis.
Let me know if this fixes the issue.