Remove extra parameter from S9xInitSound

Explain disabling USE_SLANG in how2compile.txt
This commit is contained in:
Brandon Wright 2019-02-27 11:02:22 -06:00
parent 441fbeaf9d
commit f2069e8af9
10 changed files with 28 additions and 35 deletions

View File

@ -181,7 +181,7 @@ static void UpdatePlaybackRate(void)
}
}
bool8 S9xInitSound(int buffer_ms, int unused2)
bool8 S9xInitSound(int buffer_ms)
{
// The resampler and spc unit use samples (16-bit short) as arguments.
int buffer_size_samples = MINIMUM_BUFFER_SIZE;

View File

@ -30,7 +30,7 @@ void S9xAPUSaveState (uint8 *);
void S9xDumpSPCSnapshot (void);
bool8 S9xSPCDump (const char *);
bool8 S9xInitSound (int, int);
bool8 S9xInitSound (int);
bool8 S9xOpenSoundDevice (void);
bool8 S9xSyncSound (void);

View File

@ -178,11 +178,10 @@
<p>
Deallocates the allocations made by <code>S9xInitAPU</code> function.
</p>
<h3><code>bool8 S9xInitSound (int buffer_ms, int lag_ms)</code></h3>
<h3><code>bool8 S9xInitSound (int buffer_ms)</code></h3>
<p>
Allocates memory for mixing and queueing SNES sound data, does more sound code initialization and opens the host system's sound device by calling <code>S9xOpenSoundDevice</code>, a function you must provide. Before calling this function you must set up <code>Settings.SoundSync</code>, <code>Settings.SoundPlaybackRate</code>, and <code>Settings.SoundInputRate</code>. (see section below)<br>
<code>buffer_ms</code>, given in milliseconds, is the memory buffer size for queueing sound data. Leave this at 0 to use the suggested default.<br>
<code>lag_ms</code> is no longer used.
</p>
<h3><code>void S9xReset (void)</code></h3>
<p>

View File

@ -144,10 +144,7 @@ S9xPortSoundInit ()
Settings.SoundPlaybackRate = playback_rates[gui_config->sound_playback_rate];
if (gui_config->sound_driver == sdl_driver)
S9xInitSound(0, 0);
else
S9xInitSound(0, 0);
S9xInitSound(0);
S9xSetSoundMute (false);
}

View File

@ -517,7 +517,7 @@ static void update_variables(void)
}
var.key="snes9x_superscope_color";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var))
{
char *color = get_cursor_color(var.value);
@ -583,7 +583,7 @@ static void update_variables(void)
}
var.key="snes9x_rifle_color";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var))
{
char *color = get_cursor_color(var.value);
@ -763,7 +763,7 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
log_cb(RETRO_LOG_ERROR, "Invalid device (%d).\n", device);
break;
}
S9xControlsSoftReset();
}
else if(device != RETRO_DEVICE_NONE)
@ -1227,14 +1227,7 @@ void retro_init(void)
exit(1);
}
//very slow devices will still pop
//this needs to be applied to all snes9x cores
//increasing the buffer size does not cause extra lag(tested with 1000ms buffer)
//bool8 S9xInitSound (int buffer_ms, int lag_ms)
S9xInitSound(32, 0); //give it a 1.9 frame long buffer, or 1026 samples. The audio buffer is flushed every 128-132 samples anyway, so it won't get anywhere near there.
S9xInitSound(0);
S9xSetSoundMute(FALSE);
S9xSetSamplesAvailableCallback(S9xAudioCallback, NULL);
@ -1577,7 +1570,7 @@ void* retro_get_memory_data(unsigned type)
{
void* data;
switch(type)
switch(type)
{
case RETRO_MEMORY_SNES_SUFAMI_TURBO_A_RAM:
case RETRO_MEMORY_SAVE_RAM:

View File

@ -460,5 +460,5 @@ void SNES9X_Quit (void)
void SNES9X_InitSound (void)
{
S9xInitSound(0, 0);
S9xInitSound(0);
}

20
unix/configure vendored
View File

@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Revision: 1.58 .
# From configure.ac Revision: 1.59 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for Snes9x 1.58.
# Generated by GNU Autoconf 2.69 for Snes9x 1.59.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@ -578,8 +578,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Snes9x'
PACKAGE_TARNAME='snes9x'
PACKAGE_VERSION='1.58'
PACKAGE_STRING='Snes9x 1.58'
PACKAGE_VERSION='1.59'
PACKAGE_STRING='Snes9x 1.59'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1280,7 +1280,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures Snes9x 1.58 to adapt to many kinds of systems.
\`configure' configures Snes9x 1.59 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1350,7 +1350,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of Snes9x 1.58:";;
short | recursive ) echo "Configuration of Snes9x 1.59:";;
esac
cat <<\_ACEOF
@ -1468,7 +1468,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
Snes9x configure 1.58
Snes9x configure 1.59
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -1871,7 +1871,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Snes9x $as_me 1.58, which was
It was created by Snes9x $as_me 1.59, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -6917,7 +6917,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by Snes9x $as_me 1.58, which was
This file was extended by Snes9x $as_me 1.59, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -6970,7 +6970,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
Snes9x config.status 1.58
Snes9x config.status 1.59
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@ -1537,7 +1537,7 @@ int main (int argc, char **argv)
exit(1);
}
S9xInitSound(unixSettings.SoundBufferSize, 0);
S9xInitSound(unixSettings.SoundBufferSize);
S9xSetSoundMute(TRUE);
S9xReportControllers();

View File

@ -24,10 +24,14 @@ NOTE: Unicode support requires a special zlib build - see the end of the zlib en
a libpng project that builds appropriately.
The libpng source files should reside in win32/libpng/src
* glslang (optional, USE_SLANG define, enabled by default) - the default solution includes
* glslang and SPIRV-Cross (optional, USE_SLANG define, enabled by default)
These are needed to build support for .slang shaders. The default solution includes
a series of projects encompassing glslang that build appropriately.
The glslang source files should reside in win32/glslang/src
USE_SLANG also requires SPIRV-Cross, which should be placed in shaders/SPIRV-Cross
The SPIRV-Cross source files should be placed in shaders/SPIRV-Cross
If wish to compile without USE_SLANG, you must remove the files named
spirv_*.cpp from the Visual Studio project's Shaders group.
- To compile Snes9x:
Start up VS2017.

View File

@ -51,7 +51,7 @@ bool ReInitSound()
if(S9xSoundOutput)
S9xSoundOutput->DeInitSoundOutput();
return S9xInitSound(0, 0);
return S9xInitSound(0);
}
void CloseSoundDevice() {