⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sound.h

📁 s1mp3 sdk, action mp3 develop tool kit!
💻 H
字号:
#ifndef SOUND_H
#define SOUND_H


/*
 *	Sound support code
 *
 *	Stefano, Oct 2001 - First release
 *	         Dec 2001 - Added Mattel Aquarius
 *
 *	$Id: sound.h,v 1.6 2001/12/28 09:46:28 stefano Exp $
 */


/* 1 bit sound library */

#pragma output NEED1bitsound

extern __LIB__ bit_open();
extern __LIB__ bit_close();
extern __LIB__ bit_click();
extern __LIB__ bit_fx(int effect);

/* "period": the higher value, the lower tone ! */
extern __LIB__ bit_beep(int duration, int period);

/* Real frequency !  Duration is in ms */
extern __LIB__ bit_frequency(float duration, float frequency);

/* Play a song (example: "2A--A-B-CDEFGAB5C+") */
extern __LIB__ bit_play(unsigned char melody[]);

/* Platform specific parameters (mainly timing stuff) */

#ifdef SPECTRUM
  #define BEEP_TSTATES 437500.0  /* 3.5 Mhz; float value = CPU_CLOCK*125 */
#endif

#ifdef AQUARIUS
  #define BEEP_TSTATES 500000.0  /* 4 Mhz */
#endif

#ifdef Z88
  #define BEEP_TSTATES 410000.0 /* 3.28 Mhz */
#endif

#ifdef ACE
  #define BEEP_TSTATES 406250.0 /* 3.25 Mhz */
#endif

#ifdef TI82
  #define BEEP_TSTATES 750000.0 /* 6 Mhz */
#endif

#ifdef TI83
  #define BEEP_TSTATES 750000.0
#endif

/* TI-83 Plus. 1875000.0 (15 Mhz) if Silver Edition */
#ifdef TI8X
  #define BEEP_TSTATES 750000.0 /* 6 Mhz */
  /* #define BEEP_TSTATES 1875000.0 */
#endif

#ifdef TI85
  #define BEEP_TSTATES 750000.0
#endif

#ifdef TI86
  #define BEEP_TSTATES 750000.0
#endif


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -