LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
CarstenPXI

Improve sound playback quality

Status: New
Sound playback on built-in sound cards using Standard vi's has multiple issues regarding quality (clicking etc.), choice of block sizes, latency, stability, inconsistent results between various OS versions, CPUs etc.

Needs complete re-write by NI to fix it.

Carsten Thomsen
4 Comments
GregSands
Active Participant

Yes, I ran into the clicking issue just last week, trying to continuously sample a signal (white noise) and play the samples on the soundcard.  Even with separate loops and queues and buffering of the signal, it's still not easy to eliminate all the clicks.  This should be straight-forward!

 

G-Money
NI Employee (retired)

What VIs were you using specifically?

GregSands
Active Participant

Something similar to this:

SoundOutput.png

with of course other code to fill the queue with waveform data, and settings on Sound Output Configure for number of samples.  Trying to get playback close to realtime, I had fairly short waveforms (~10-100 samples at 10kHz), and it's almost impossible to stop it stuttering occasionally.

CarstenPXI
Member

We are using the standard sound VI's as show in GregS diagram.  We have used both the old lvsound.llb and lvsound2.llbs and they having varying issues.  lvsound.llb's don't work well on multi-threaded machines, and die after about 20 minutes or so.  lvsound2.llb works on mutli-threaded machines, but still suffers from clicking issues, and is very finicky regarding block size.  Typically they seem to work best with about 10k blocks.   They may run fine for a couple of minutes, and then start clicking.  Performance also seems to be very dependent of which platform the user is on...some have the issue, some don't. 

 

We've had several very qualified LabVIEW guys try to build work arounds, and they are all kludgy and do not give reliable performance.  Since sound playback is very crucial for us, we have spent multiple man-weeks on this issue, have had long talks with NI corporate with multiple developers/support/marketing staff without finding an acceptable solution. We keep praying...

 

 

Carsten