Skip to content

Commit

Permalink
nds: drop APU frequency to 22050 Hz, minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Sep 27, 2023
1 parent d76f8d8 commit dd3918b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arm7/source/apu.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE.
*/

static Sint32
static Sint16
envelope(NdsApu *c, Uint32 age)
{
if(!c->r) return 0x0888;
Expand Down
2 changes: 1 addition & 1 deletion arm9/source/nds_apu.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE.
*/

#define NOTE_PERIOD 0x10000
#define NOTE_PERIOD (SAMPLE_FREQUENCY * 0x4000 / 11025)
#define ADSR_STEP (SAMPLE_FREQUENCY / 0xf)

/* clang-format off */
Expand Down
2 changes: 1 addition & 1 deletion include/nds/apu.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WITH REGARD TO THIS SOFTWARE.
typedef unsigned int Uint32;
typedef signed int Sint32;

#define SAMPLE_FREQUENCY 44100
#define SAMPLE_FREQUENCY 22050
#define POLYPHONY 4

typedef struct {
Expand Down

0 comments on commit dd3918b

Please sign in to comment.