ECRobot C++ API for LEGO MINDSTORMS NXT  1.0.10
device/Speaker.h
00001 //
00002 // Speaker.h
00003 //
00004 // Copyright 2009 by Takashi Chikamasa, Jon C. Martin and Robert W. Kramer
00005 //
00006 
00007 #ifndef SPEAKER_H_
00008 #define SPEAKER_H_
00009 
00010 extern "C"
00011 {
00012         #include "ecrobot_interface.h"
00013         #include "rtoscalls.h"
00014 };
00015 
00016 namespace ecrobot
00017 {
00021 class Speaker
00022 {
00023 public:
00027         static const U32 MIN_TONE_FREQ = 33;
00028 
00032         static const U32 MAX_TONE_FREQ = 1976;
00033 
00039         Speaker(void);
00040 
00048         void playTone(U32 freq, U32 duration, U32 volume);
00049         
00057         S16 playWav(const CHAR* file, U32 length, U32 volume);
00058 };
00059 }
00060 #endif
 All Classes Files Functions Variables Enumerations Enumerator Friends Defines