01-16-2014 10:46 AM
I am using the LabVIEW Sound VIs to capture digital audio from my sound card. Currently I am using the digital audio output of my sound card to drive the digital input.
Regardless of what sample rate I choose for my capture the data appears fine.
My question is what mechanism is performing the sample rate conversion? Is there anyway I can use labview to determine what the sample rate and bit depth of the input is before I setup my audio capture that way I know I am capturing exactly what the input was?
Also, is there anyway to capture un-coerced data? If I know the input stream is 24 bit can I get values between -8,388,608 and 8,388,608 besides simply multiply the -1 to 1 scaled data by a constant?
01-17-2014 02:25 PM
Hello j.collins,
Are you configuring the sample rate using the Sound Input Configure.vi? That input also has an option for the number of bits you want per sample. I believe the rate you can sample at is dependent on your sound card. What sound card do you have? The manual should specify what rates it can run at.
01-21-2014 06:37 AM
Yes, I am using the 'Sound Input Configure' vi.
The problem I have is that since this is a digital audio input the original data stream already has a sample rate and bit depth associated with it. I want the signal that I record to be as similar to, or exactly the same as, the signal which was tranmitted to me.
Is there anyway to do this with the Sound vi's, or should I be looking at a custom solution?
01-22-2014 04:17 PM
Hello,
If your sound card is capable of reading at a given rate and you specify the Configure Sound.vi to read at that rate then it should. Same goes for the bit depth. If you are looking for more control then you might want to consider the Sound and Vibration Toolkit:
http://sine.ni.com/nips/cds/view/p/lang/en/nid/209056
Are you having issues with the quality of the cound you're recording? How does it compare to the original signal?
01-23-2014 05:47 AM
If the input to my sound card was analog then it would make sense to be able to select any sample rate supported by the card; however the input to my sound card is digital. The digital input stream already has a sample rate and bit depth. Somewhere between the sound card input and labview a sample rate conversion is being performed.
My questions are:
Who/what is performing this sample rate conversion?
What is the method being used?
Can I use labview to determine the sample rate and bit depth of the input stream before I choose the recording format, that way I can avoid the sample rate and bit depth conversion?
01-23-2014 06:03 AM - edited 01-23-2014 06:17 AM
Did you check the output sample rate? (for DAQ it would be the actual samplerate property) here you can check the dt value of the waveform.
The driver will choose the samplerate, OK, sometimes mark an error of a wrong analog samplerate, however if you choose the digital sound input, the samplerate is fixed by the inputstream, so I assume the output will be at the same samplerate no matter what you configured.
The sound input read has different types to choose from for the output format. to determine the digital input resolution (you can't read with the not so well supported sound vis)
Read the values as dbl and plot a histogram of the +- 4/2^16 range with 256 bins and you should be able to determine the source resolution