Skip to content

Commit

Permalink
Merge pull request #20 from Layer812/master
Browse files Browse the repository at this point in the history
Adjust for overclock
  • Loading branch information
fhoedemakers authored Aug 3, 2023
2 parents 19a1621 + 53c9a66 commit d37bd90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions infones/InfoNES_pAPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ void InfoNES_pAPUHsync(bool enabled);
/* these values subject to change without notice. */
/*-------------------------------------------------------------------*/
extern int ApuQuality;
#define pAPU_QUALITY 3 // to save battery...
#define SAMPLE_INTERVAL 24 // 1,000,000 us / 11015Hz
#define pAPU_QUALITY 3 // 44,100 Hz
#define SAMPLE_INTERVAL 22 // 1,000,000 us / 44,100 Hz

/*-------------------------------------------------------------------*/
/* Rectangle Wave #1 resources */
Expand Down
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,9 @@ void InfoNES_SoundOutput(int samples, BYTE *wave1, BYTE *wave2, BYTE *wave3, BYT

for (i = 0; i < samples; i++)
{
#if 0
#ifndef NO_OVERCLOCK
final_wave[fw_wr][i] =
((unsigned char)wave1[i] + (unsigned char)wave2[i] + (unsigned char)wave3[i] + (unsigned char)wave4[i] + (unsigned char)wave5[i]) / 5;
((unsigned char)wave1[i] + (unsigned char)wave2[i] + (unsigned char)wave3[i] + (unsigned char)wave4[i] + (unsigned char)wave5[i]) * 4096 / 1280;
#else
final_wave[fw_wr][i] =
((unsigned char)wave1[i] + (unsigned char)wave2[i] + (unsigned char)wave3[i] + (unsigned char)wave4[i] + (unsigned char)wave5[i]) * 2048 / 1280;
Expand Down

0 comments on commit d37bd90

Please sign in to comment.