<commit_before>#include	"compiler.h"
#include	"sound.h"
#include	"beep.h"


extern	BEEPCFG		beepcfg;
extern  UINT16 beep_data[BEEPDATACOUNT];
int beep_mode_freq = 56;	// 56:normal 42:TOKIO
int beep_mode_temp = 0;
int beep_mode_bit = 0;
int beep_mode_bit_c = 0;

static void oneshot(BEEP bp, SINT32 *pcm, UINT count) {

	SINT32		samp;
	double		sampbias = soundcfg.rate / 44100.0;

	while(count--) {
		samp = (double)beep_data[bp->beep_data_curr_loc] / 0x100 * (0x1000 * beepcfg.vol) - (0x800 * beepcfg.vol);
		pcm[0] += samp;
		pcm[1] += samp;
		pcm += 2;
		bp->beep_cnt += 20 * (1.0 / sampbias);
		if((bp->beep_data_curr_loc < bp->beep_cnt / beep_mode_freq) && (bp->beep_data_curr_loc != bp->beep_data_load_loc)) {
			bp->beep_data_curr_loc = bp->beep_cnt / beep_mode_freq;
			if(bp->beep_data_curr_loc >= BEEPDATACOUNT) {
				bp->beep_data_curr_loc = 0;
				bp->beep_cnt %= beep_mode_freq;
			}
		}
	}
}

static void rategenerator(BEEP bp, SINT32 *pcm, UINT count) {

	SINT32		vol;
const BPEVENT	*bev;<commit_msg>fix BEEP PCM volume up<commit_after>#include	"compiler.h"
#include	"sound.h"
#include	"beep.h"


extern	BEEPCFG		beepcfg;
extern  UINT16 beep_data[BEEPDATACOUNT];
int beep_mode_freq = 56;	// 56:normal 42:TOKIO
int beep_mode_temp = 0;
int beep_mode_bit = 0;
int beep_mode_bit_c = 0;

static void oneshot(BEEP bp, SINT32 *pcm, UINT count) {

	SINT32		samp;
	double		sampbias = soundcfg.rate / 44100.0;

	while(count--) {
		samp = (double)beep_data[bp->beep_data_curr_loc] / 0x100 * (0x5000 * beepcfg.vol) - (0x2500 * beepcfg.vol);
		pcm[0] += samp;
		pcm[1] += samp;
		pcm += 2;
		bp->beep_cnt += 20 * (1.0 / sampbias);
		if((bp->beep_data_curr_loc < bp->beep_cnt / beep_mode_freq) && (bp->beep_data_curr_loc != bp->beep_data_load_loc)) {
			bp->beep_data_curr_loc = bp->beep_cnt / beep_mode_freq;
			if(bp->beep_data_curr_loc >= BEEPDATACOUNT) {
				bp->beep_data_curr_loc = 0;
				bp->beep_cnt %= beep_mode_freq;
			}
		}
	}
}

static void rategenerator(BEEP bp, SINT32 *pcm, UINT count) {

	SINT32		vol;
const BPEVENT	*bev;
{'fraction_non_alphanumeric': 0.14425907752698724, 'fraction_numerical': 0.04563297350343474, 'mean_word_length': 4.084788029925187, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4350464', 'n_tokens_mistral': 1073, 'n_tokens_neox': 939, 'n_words': 173}