Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Playing .wav's on the dashboard... (http://www.chiefdelphi.com/forums/showthread.php?t=84084)

ProgrammerJoe 09-03-2010 14:38

Playing .wav's on the dashboard...
 
Hey guys,

As we start to work on the final tweaks and touches of the robot, I was looking for someone who had experience with the sound vi's in Labview. Our plan was to have different .wav files playing looped on the dashboard, corresponding to the targeting arrows on the top of the camera, and then have a joystick command be able to toggle the alert on and off. To suppliment this, we bought a USB audio device and plugged a pair of dime store headphones into it to comply with <R82>. However, the code works fine realitive to Labview and the sound is referenced and told to play, but it doesn't actually play the sound. Does anyone have any experience with this niche of vi's that is willing to lend a hand?

Zme 09-03-2010 14:40

Re: Playing .wav's on the dashboard...
 
make sure that the audio output device is set up correctly, if its not it could be trying to output to the speakers which are most likely muted,

ProgrammerJoe 09-03-2010 14:50

Re: Playing .wav's on the dashboard...
 
I tried it with just the speakers on to get a control, and it still didn't work. So I'm assuming that either there is some other necessery piece that I am unaware of, or it's a mind numbingly stupid mistake.

Zme 09-03-2010 14:51

Re: Playing .wav's on the dashboard...
 
i'll look at what i have for this and get back to you,

ProgrammerJoe 09-03-2010 15:02

Re: Playing .wav's on the dashboard...
 
Thanks, I also updated the original post to make it more specific to the end goal of the program.

Zme 09-03-2010 15:03

Re: Playing .wav's on the dashboard...
 
ok then,
there are a couple ways of going about it, you can use the play sound file vi which takes in a device number and a file path, or the play waveform express vi which lets you choose the output device from a list, those are the simplest that i see, though someone else may have a better idea

ProgrammerJoe 09-03-2010 15:06

Re: Playing .wav's on the dashboard...
 
I used the play sound file vi, and according to the lightbulb, it plays the sound. Problem is, it doesn't make a peep in the real world. But I'll take a look at the play waveform express vi, and get back to you.

Joe Johnson 09-03-2010 15:14

Re: Playing .wav's on the dashboard...
 
Are you willing to write your own .NET program?

There are pretty easy ways to play sounds via WMP in combination with .NET framework. I don't have any VB examples on the PC I am on now, but as I recall it was a near trivial program. It is pretty much just a matter of instancing a class and calling a method with the file name as an argument.

Joe J.

ProgrammerJoe 09-03-2010 19:04

Re: Playing .wav's on the dashboard...
 
Status Update:

The latest build of the dashboard works ok soundwise, using the waveform vi's. But having it play the sounds limits camera feedback time and slows it down to the point of the circle that denotes the camera noticibly outruns the picture taken by the camera. I'm probably going to use generic beeps, or switch out for another dashboard alltogether. Thanks for the help, though.


All times are GMT -5. The time now is 03:27.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi