- added instructions how to update the online documentation
[bochs-mirror.git] / iodev / speaker.h
blob53a7c61635c6b8a5a83a58788d94a7b4b73fc5aa
1 /////////////////////////////////////////////////////////////////////////
2 // $Id: speaker.h,v 1.4 2006/04/27 15:11:45 sshwarts Exp $
3 /////////////////////////////////////////////////////////////////////////
5 /*
6 Copyright David N. Welton <davidw@dedasys.com> 2003
8 This code may be distributed under the same terms as bochs.
9 */
11 /* This file defines a class to deal with the speaker.
12 * This class also tries to play beeps on the console
13 * (linux only) and also forwards beeps to the gui
14 * so we have the possiblity to signal the beep
17 #ifndef BX_PC_SPEAKER_H
18 #define BX_PC_SPEAKER_H
20 class bx_speaker_c : public bx_speaker_stub_c {
21 public:
22 bx_speaker_c();
23 virtual ~bx_speaker_c();
25 virtual void init(void);
26 virtual void reset(unsigned int);
28 void beep_on(float frequency);
29 void beep_off();
30 private:
31 float beep_frequency; // 0 : beep is off
32 #ifdef __linux__
33 /* Do we have access? If not, just skip everything else. */
34 signed int consolefd;
35 const static unsigned int clock_tick_rate = 1193180;
36 #elif defined(WIN32)
37 Bit64u usec_start;
38 #endif
41 #endif