|
|
1.1.1.2 ! root 1: /* $Id: xpbeep.h,v 1.12 2008/09/22 19:14:45 deuce Exp $ */ 1.1 root 2: 3: #ifndef _XPBEEP_H_ 4: #define _XPBEEP_H_ 5: 6: #include "gen_defs.h" 7: 8: #if defined(_WIN32) 9: #if 0 10: #define BEEP(freq,dur) xpbeep((double)(freq),(DWORD)(dur)) 11: #else 12: #define BEEP(freq,dur) Beep((DWORD)(freq),(DWORD)(dur)) 13: #endif 14: #elif defined(__OS2__) 15: #define BEEP(freq,dur) DosBeep(freq,dur) 16: #elif defined(__unix__) || defined(__APPLE__) 17: #define BEEP(freq,dur) xpbeep((double)(freq),(DWORD)(dur)) 18: #else 19: #error "Unsupported Target: Need some macros and/or function prototypes here." 20: #endif 21: 22: enum WAVE_SHAPE { 23: WAVE_SHAPE_SINE 24: ,WAVE_SHAPE_SAWTOOTH 25: ,WAVE_SHAPE_SQUARE 26: ,WAVE_SHAPE_SINE_SAW 27: ,WAVE_SHAPE_SINE_HARM 28: ,WAVE_SHAPE_SINE_SAW_CHORD 29: ,WAVE_SHAPE_SINE_SAW_HARM 30: }; 31: 32: 33: #ifdef __cplusplus 34: extern "C" { 35: #endif 36: BOOL xptone_open(void); 37: BOOL xptone_close(void); 38: void xpbeep(double freq, DWORD duration); 1.1.1.2 ! root 39: BOOL xp_play_sample(const unsigned char *sample, size_t sample_size, BOOL background); 1.1 root 40: BOOL xptone(double freq, DWORD duration, enum WAVE_SHAPE); 41: #ifdef __unix__ 42: void unix_beep(int freq, int dur); 43: #endif 44: #ifdef __cplusplus 45: } 46: #endif 47: 48: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.