Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
retro8
Commits
25efe2fc
Unverified
Commit
25efe2fc
authored
Mar 11, 2022
by
Libretro-Admin
Committed by
GitHub
Mar 11, 2022
Browse files
Merge pull request #10 from phcoder/mem
Small memory usage decrease
parents
073be787
caf5bd04
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/vm/sound.cpp
View file @
25efe2fc
...
...
@@ -114,8 +114,8 @@ inline void DSP::noise(uint32_t frequency, int16_t amplitude, int32_t position,
{
static
uint32_t
lfsr_state
=
0x12345678
;
static
const
uint8_t
poly
=
0x34
;
// second-smallest maximal-period polynomial.
static
const
int
trailing_zeros
=
1
;
//
1
trailing 0.
static
const
int
significant_bits
=
5
;
//
5
bits from highest set to lowest set
static
const
int
trailing_zeros
=
2
;
//
2
trailing 0.
static
const
int
significant_bits
=
4
;
//
4
bits from highest set to lowest set
static
const
int
batch
=
4
;
// Batch to handle in a table
static
const
int
table_size
=
1
<<
(
batch
+
significant_bits
);
static
const
int
table_mask
=
table_size
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment