06-02-2008 11:21 AM
06-02-2008 11:45 AM
12-03-2009 09:24 AM
Hello,
Im working on a test platform using labview for 5.1 / 7.1 channel audio analysis...
What types of files does this VI accept? Only 2-Channel PCM?
I want to be able to play 6 and 8 channel WAVs for surround sound test files... As a test device, I have a terratec aureon 5.1 USB, it only shows up as one WAV device in windows, but ive enabled it as 5.1 Channel under windows audio devices and this works using VLC for playback of multichannel WAVs. However when I try the same in labview, an error occurs (not supported format). The help is also not very useful in telling which formats are supported!?
The only way I think this might work is to have a sound card with multiple wav devices under windows
for example:
Audiofire 1&2
Audiofire 3&4
Audiofire 5&6
That way each stereo pair can be addressed with its corresponding channels using 3 play wav file VIs. This may work as long as all WAV devices are in phase/syncronised, as phase measurements will be required for analysis using simultaneous data acquisition boards (NI-4462).
Secondly the 6 channel WAV would have to be manually seperated into 3 different stereo wav files before use. That is inconvienient.
Any thoughts...?
Alex
12-03-2009 09:50 AM
Hi
I think this sound system will be better for you. The Labview sound system in 7.1 only read 2ch wave files. But it is very simple to parse a uncompressed wave file.
12-04-2009 03:56 AM
Coq Rouge wrote:Hi
I think this sound system will be better for you. The Labview sound system in 7.1 only read 2ch wave files. But it is very simple to parse a uncompressed wave file.
Hi Coq Rouge
What sound system? I was referring to 7.1 surround sound, not LabVIEW 7.1... I am using labview 2009 for development, I should have mentioned that in my post :-s
Could you be more specific?
Greetings
AL
12-04-2009 04:10 PM
Using the Sound Output Configure.vi, there is an input called sound format which is a cluster containing 3 elements. One of these elemenst is number of channels. Looking at the detailed help on this shows that "number of channels specifies the number of channels. This input can accept as many channels as the sound card supports. For most sound cards 1 is Mono and 2 is Stereo." If your sound card suppots more channels, then you can change this input to however many you want.
Note I have not tried this as I don't have a 7.1 capable sound card, but the documentation seems pretty sound (no pun intended).
12-06-2009 09:24 AM
David_L wrote:Using the Sound Output Configure.vi, there is an input called sound format which is a cluster containing 3 elements. One of these elemenst is number of channels. Looking at the detailed help on this shows that "number of channels specifies the number of channels. This input can accept as many channels as the sound card supports. For most sound cards 1 is Mono and 2 is Stereo." If your sound card suppots more channels, then you can change this input to however many you want.
Note I have not tried this as I don't have a 7.1 capable sound card, but the documentation seems pretty sound (no pun intended).
Hello David_L,
Thank you for your reply.
I initially tried this scenario and it does work as you stated. I used the example "Generate Sound.vi" and upped the outputs to 6 which worked on all channels as expected, however this was a single channel stimulus being duplicated over all channels. This didnt really help me as I wanted to playback 6 discrete channels from a WAV file.
So then I tried to use the "Play Sound File.vi" to playback a 6ch wav file. I then received an error. When using this VI you can only select the device to play and not the number of output channels. The help for "Play Sound File.vi" which is the help I was referring to, did not state which formats it works with. A basic Mono/Stereo WAV file is ofcourse the obvious format, but how about compressed MP3 or other common uncompressed formats?
Anyway, your reply triggered another idea which seems to work a treat. I looked closely again at the "Sound Output Write.vi" help and realised that the input waveform was polymorphic... duh! so I then extended the example to 6 waveform generators for each channel being merged into an array to test discrete audio output. It worked!
If anyone else is interested I have attached to modded VI
Thanks
AL
02-03-2010 07:38 PM
I've been trying your VI with a 5.1 PCI soundcard (Creative X-Fi extreme), but this trick it doesn't work. The Souncard configure VI returns the error "cannot support sound format" when I put 3, 4, 5 or 7 channels in the sound config cluster, and returns "The sound driver or card does not support the desired operation." when I put in 6 channels.
It may be a difference in the way labVIEW interfaces with my PCI soundcard vs your 5.1 Terratec USB soundcard.
Anything I might be doing wrong?
02-04-2010 03:52 AM
Hi Tinnitus boy,
What operating system are you using?
NOTE: Make sure that the driver is setup at a 5.1 device under windows... that should do the trick. If for example, under audio devices in XP or 7 you have multiple stereo pairs for your output, this demo will not work. the driver must be a multichannel sounds device under windows. there may be a setting under the creative X-Fi software interface to switch between these pair and multichannel modes. my audiofire8 firewire soundcard for example can be configured as a stereo pairs 1-2, 3-4, 5-6, 7-8 OR as a single surround sound (7.1 ch) wave device under the audiofire interface software.
ive noticed that XP and Vista/7 handle this differently as the audio core was upgraded since vista...
hope this helps.
AL
02-04-2010 10:52 PM
Hi ali66b, thanks for getting back (especially being an old thread).
I'm running LabVIEW 9 on Windows 7. The soundcard is actually a 7.1 device, but I've made it a 5.1 device using the software that the soundcard comes with (which seems to change the soundcard driver directly). In windows playback device settings, there's only the one X-Fi speaker device, but I can access the balance (i.e. Left right) on all 7.1 audio channels (i.e. so yes, it's at least 7.1 audio device under windows). I've had a large play with changing all the settings, making it a 7.1, 5.1, 4.1 or 4 device (which the soundcard can be set to), and changing the number of channels in the LabVIEW sound config vi.
There's definitely something going on, because if the soundcard is set to be a 7.1 device, I only get the "odd" error statement in LabVIEW if I use 8 channels in the SOconfig, whereas the odd error statement occurs with 6 channels if the soundcard is set as a 5.1 device (and 5 for 4.1 etc..).
I suspect that it's something to do with the X-Fi driver itself and Windows 7, which was a new driver only recently released to adapt the soundcard for windows 7.
Any extra thoughts?