LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous sound output buffer issue(s)

Highlighted
Just to clarify, the Corrective Action Request (CAR) has been filled in our system but is not guaranteed to be fixed in the next version.  This information will be known when the version actual releases, but again it has been filled and we are aware of the issue.  I hope this clears things up a bit.
Ryan N
National Instruments
Application Engineer
ni.com/support
0 Kudos
Message 11 of 17
(1,379 Views)
Highlighted
My translation (I recently picked up 'Speaking NI' from Rosetta Stone) - it won't make it into 8.6.  Too bad - this VI is critical to the type of work I am doing/would like to do.  Funny - lately it seems that the particular tasks I am trying to perform with NI software invariably are hampered by bugs.  I know NI works very hard to support my work, but it is still aggravating to have to wait for a future release to be able to use a feature.  I was going to use this VI to demonstrate an audio streaming capability using CompactRIO... 
0 Kudos
Message 12 of 17
(1,354 Views)
Highlighted
Guess I'm coming across this about 2 months late...

I may be running into similar problems as wired and Mark M: We've got a 4-channel DAQ card delivering demodulated radio data that I'd like to pipe to the PC sound card. I've set up a loop to gather incoming data and enqueue it. A second loop pulls data from the queue and sends it to the sound card. The sound card is supposed to be configured so that it can keep up with the incoming data and play my sample at a reasonable approximation of real time.

I've attached a demo vi and dataset to illustrate. There is a producer loop that simulates my DAQ hardware by reading a previously acquired dataset from file and sending into a data queue at about the rate delivered by my DAQ card. The consumer loop pulls data off the queue to send to the PC sound card. I've got two waveform charts so I can see what each side of the queue is doing.

I've run into 2 problems:
1) My data queue keeps growing in an unbounded fashion unless I suspend calls to Sound Output Write.vi
2) Even though I believe my sample data file is sampled above the Nyquist frequency I have terrible sound quality from my app.

Am I simply configuring my sound card wrong?

Thanks for the help!
0 Kudos
Message 13 of 17
(1,262 Views)
Highlighted
Didn't see my attachments show up so I'll re-post them just in case. The sample.txt file is not really a text file, but binary file extensions don't seem to be permitted.
Download All
0 Kudos
Message 14 of 17
(1,256 Views)
Highlighted

Hey, John,

I only had a few minutes to spend looking at this (gotta do real work today), but the attached code should get you somewhat better sound.  Not that I changed the data type to single, and that the range is from 0-1 (I think that's what it needs to be when a real number).  I also reduced the write frequency by pulling out whatever is in the queue and sending all of it.

Maybe this will get you a new starting point.

Good Luck!

Kevin

0 Kudos
Message 15 of 17
(1,228 Views)
Highlighted

I think I am facing similar problems here in LabVIEW 8.6.1. I am trying to stream blocks of data from a cRIO to the sound card on my PC, but in every new iteration of my loop, when the buffer is filled, there is a gap in the audio. If I concatenate the audio to an array and play it outside the main loop it works fine.

I also tried the built in "Sound file to sound output" example, which works fine for sample.wav, but has problems playing larger audio files. This makes me suspect that write sound uses up a lot more resources than it should need. I'm an FPGA designer and quite new to labVIEW so it could as well that I have a poor understanding of the memory managment in LabVIEW.

 

I am ultimately trying to do something very similar to this http://vishots.com/2008/11/07/labview-based-electric-guitar-effects-pedals so if anyone knows how to get into contact with that guy, it probably would also help me.

 

I can provide my VI  but right now it is a bit messy.

 

//Olof

Message Edited by OlofK on 04-09-2009 08:30 AM
0 Kudos
Message 16 of 17
(987 Views)
Highlighted

Olofk,

 

A quick heads up, generally, you will get more replies if you post in a new forum and then reference back to an old post using a link.  Also, since this is outputting using a cRIO, there will be more issues that are fairly unrelated to the rest of this thread.

 

Are you programming in the real time environment, or down on the FPGA? Are you emptying your buffer every iteration? This is a little outside of any experience I have, but posting to a new thread will get a number of people to take a look at this and offer their ideas.

ColeR
Field Engineer
0 Kudos
Message 17 of 17
(959 Views)