Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FIRST Tech Challenge (http://www.chiefdelphi.com/forums/forumdisplay.php?f=146)
-   -   [FTC]: How to play sound from NXT (http://www.chiefdelphi.com/forums/showthread.php?t=73147)

gregsanCHEVY121 28-01-2009 21:10

[FTC]: How to play sound from NXT
 
Hello there, my team is trying to play a sound by pressing a button on the controller. The sound is one that we have put onto the brick, not a stock sound. It will play the sound if selected in the sound menu on the brick, however we can not figure out how to play it when we press a button, we are using RobotC.

Thanks,
Greg

emmell 29-01-2009 00:14

Re: [FTC]: How to play sound from NXT
 
Assuming you use button 1 to play the sound:

Code:

if (joy1Btn(1))
{
  PlaySoundFile("name of sound file name");
}


craig_yates 27-02-2009 00:15

Re: [FTC]: How to play sound from NXT
 
Thats what it was. We just forgot to put in the quotation marks.

craig_yates 27-02-2009 00:18

Re: [FTC]: How to play sound from NXT
 
We found that using a clearsounds() (or something like that) at the beginning would stop the sound from repeating indefinately.

boogyoogy 14-03-2009 15:28

Re: [FTC]: How to play sound from NXT
 
Now how do you download sound files onto the nxt? I've tried to download multiple files in mp3 format to the brick so that we can play the sound when we press a button.

craig_yates 07-04-2009 10:10

Re: [FTC]: How to play sound from NXT
 
You have to convert the mp3 to a .rso
just google it- there is a free converter.


All times are GMT -5. The time now is 18:08.

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