Ejemplo n.º 1
0
void start_sound()
{  if (sound_recording)
   {  message(0, "already recording");
      return;
   }
   stop_play_file();
   open_sound_record();
   if (!opened)
	 return;
   sound_recording=1;
   SetDlgItemText(hMainDialog,IDC_LISTEN_INDICATOR,"LISTENING");
   init_Mixer_data();
   set_Mixer_data();
   if (!submit_sound_buffer() || !submit_sound_buffer())
   { errormsg("Unable to get buffers for sound recording",0);
	 stop_sound();
     return;
   }
   reset_volumecompression();
   start_encoder();
   error_code = waveInStart( hwavein );
   if( error_code != MMSYSERR_NOERROR)
   { errormsg("Unable to start sound recording.",error_code);
     stop_sound();
	 return;
   }
   meter_on();
}
Ejemplo n.º 2
0
void setup_movement(void)
{
	serial_configure(9600);
	set_PWM(LEF1, 0);
	set_PWM(LEF0, 0);
	set_PWM(RIG0, 0);
	set_PWM(RIG1, 0);
	start_encoder();
}
Ejemplo n.º 3
0
void setup_movement(void)
{
	DDRC |= (1 << DDC4);
	DDRC |= (1 << DDC0);
	PORTC |= (1 << PC4);
	PORTC |= (1 << PC0);
	//a4 and a0 pc4 and pc0
	set_PWM(LEF1, 0);
	set_PWM(LEF0, 0);
	set_PWM(RIG0, 0);
	set_PWM(RIG1, 0);
	
	start_encoder();
}