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
snes9x2002
Commits
8a417364
Commit
8a417364
authored
Jun 14, 2012
by
Toad King
Browse files
use the slower, more accurate SPC700 modes
hack around sounds being higher pitched than they should be
parent
536905f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
libretro/libretro.cpp
View file @
8a417364
...
...
@@ -167,8 +167,8 @@ void retro_get_system_info(struct retro_system_info *info)
}
static
int16
audio_buf
[
0x10000
];
static
int
avail
;
static
in
t
samplerate
=
320
00
;
static
unsigned
avail
;
static
floa
t
samplerate
=
320
40.5
f
;
void
S9xGenerateSound
()
{
...
...
@@ -368,8 +368,8 @@ void retro_run (void)
{
IPPU
.
RenderThisFrame
=
TRUE
;
S9xMainLoop
();
S9xMixSamples
(
audio_buf
,
avail
*
2
);
audio_batch_cb
((
int16_t
*
)
audio_buf
,
avail
);
S9xMixSamples
(
audio_buf
,
avail
);
audio_batch_cb
((
int16_t
*
)
audio_buf
,
avail
>>
1
);
poll_cb
();
...
...
@@ -427,15 +427,15 @@ bool retro_load_game(const struct retro_game_info *game)
//S9xGraphicsInit();
S9xReset
();
Settings
.
asmspc700
=
tru
e
;
CPU
.
APU_APUExecuting
=
Settings
.
APUEnabled
=
3
;
Settings
.
asmspc700
=
fals
e
;
CPU
.
APU_APUExecuting
=
Settings
.
APUEnabled
=
1
;
Settings
.
SixteenBitSound
=
true
;
so
.
stereo
=
Settings
.
Stereo
;
so
.
playback_rate
=
Settings
.
SoundPlaybackRate
;
S9xSetPlaybackRate
(
so
.
playback_rate
);
S9xSetSoundMute
(
FALSE
);
avail
=
samplerate
/
(
Settings
.
PAL
?
50
:
60
);
avail
=
(
samplerate
/
(
Settings
.
PAL
?
50
:
60
)
)
<<
1
;
ZeroMemory
(
audio_buf
,
sizeof
(
audio_buf
));
...
...
src/soundux.cpp
View file @
8a417364
...
...
@@ -1145,7 +1145,7 @@ void S9xSetPlaybackRate (uint32 playback_rate)
if
(
playback_rate
)
{
// notaz: calclulate a value (let's call it freqbase) to simplify channel freq calculations later.
so
.
freqbase
=
(
FIXED_POINT
<<
11
)
/
playback_rate
;
so
.
freqbase
=
(
FIXED_POINT
<<
11
)
/
(
playback_rate
*
33
/
32
)
;
// now precalculate env rates for S9xSetEnvRate
static
int
steps
[]
=
{
...
...
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