/* $Id: speaker_off.c,v 1.1 1998/09/08 19:38:45 anders Exp $ */ /* $Source: /home/anders/src/RCS/speaker_off.c,v $ */ /***************************************************************************** ** ** Turns off the speaker. Has the same effect as turning off the ** speaker via audiocontrol, but can be executed in batch mode. ** *****************************************************************************/ #include #include #include main() { FILE *audio_fp; audio_info_t info; int err; audio_fp=fopen("/dev/audio","r"); if(!audio_fp) { fprintf(stderr,"Failed to read /dev/audio\n"); exit(2); } AUDIO_INITINFO(&info); /*info.play.port=AUDIO_SPEAKER;*/ info.play.port=0; err=ioctl(audio_fp->_file,AUDIO_SETINFO,&info); fclose(audio_fp); }