mirror of
https://github.com/ZDoom/ZMusic.git
synced 2025-03-13 22:22:02 +00:00
- removed command line stuff for FluidSynth.
Nothing of this is needed but it got linked in regardless.
This commit is contained in:
parent
47475495f4
commit
43203cb207
6 changed files with 1 additions and 5265 deletions
2
thirdparty/fluidsynth/src/CMakeLists.txt
vendored
2
thirdparty/fluidsynth/src/CMakeLists.txt
vendored
|
@ -94,8 +94,6 @@ set ( libfluidsynth_SOURCES
|
|||
drivers/fluid_adriver.h
|
||||
drivers/fluid_mdriver.c
|
||||
drivers/fluid_mdriver.h
|
||||
bindings/fluid_cmd.c
|
||||
bindings/fluid_cmd.h
|
||||
bindings/fluid_filerenderer.c
|
||||
bindings/fluid_ladspa.c
|
||||
bindings/fluid_ladspa.h
|
||||
|
|
4972
thirdparty/fluidsynth/src/bindings/fluid_cmd.c
vendored
4972
thirdparty/fluidsynth/src/bindings/fluid_cmd.c
vendored
File diff suppressed because it is too large
Load diff
171
thirdparty/fluidsynth/src/bindings/fluid_cmd.h
vendored
171
thirdparty/fluidsynth/src/bindings/fluid_cmd.h
vendored
|
@ -1,171 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUID_CMD_H
|
||||
#define _FLUID_CMD_H
|
||||
|
||||
#include "fluid_sys.h"
|
||||
|
||||
|
||||
void fluid_shell_settings(fluid_settings_t *settings);
|
||||
|
||||
|
||||
/** some help functions */
|
||||
int fluid_is_number(char *a);
|
||||
char *fluid_expand_path(char *path, char *new_path, int len);
|
||||
|
||||
/** the handlers for the command lines */
|
||||
int fluid_handle_help(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_quit(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_noteon(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_noteoff(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_pitch_bend(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_pitch_bend_range(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_cc(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_prog(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_select(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_inst(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_channels(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_load(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_unload(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_reload(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_fonts(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_reverbpreset(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_reverbsetroomsize(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_reverbsetdamp(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_reverbsetwidth(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_reverbsetlevel(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_chorusnr(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_choruslevel(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_chorusspeed(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_chorusdepth(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_chorus(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_reverb(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_gain(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_interp(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_interpc(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_tuning(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_tune(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_settuning(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_resettuning(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_tunings(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_dumptuning(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_reset(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_source(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_echo(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
|
||||
int fluid_handle_set(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_get(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_info(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_settings(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
|
||||
int fluid_handle_router_clear(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_router_default(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_router_begin(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_router_end(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_router_chan(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_router_par1(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_router_par2(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
|
||||
int fluid_handle_player_start(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_player_stop(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_player_continue(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_player_next_song(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_player_seek(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_player_loop(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_player_tempo_bpm(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_player_tempo_int(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
|
||||
#if WITH_PROFILING
|
||||
int fluid_handle_profile(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_prof_set_notes(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_prof_set_print(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_prof_start(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
#endif
|
||||
|
||||
int fluid_handle_basicchannels(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_resetbasicchannels(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_setbasicchannels(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_channelsmode(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_legatomode(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_setlegatomode(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_portamentomode(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_setportamentomode(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_breathmode(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_setbreathmode(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_sleep(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
|
||||
#ifdef LADSPA
|
||||
int fluid_handle_ladspa_effect(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_ladspa_link(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_ladspa_buffer(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_ladspa_set(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_ladspa_check(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_ladspa_start(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_ladspa_stop(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
int fluid_handle_ladspa_reset(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Command handler function prototype.
|
||||
* @param data User defined data
|
||||
* @param ac Argument count
|
||||
* @param av Array of string arguments
|
||||
* @param out Output stream to send response to
|
||||
* @return Should return #FLUID_OK on success, #FLUID_FAILED otherwise
|
||||
*/
|
||||
typedef int (*fluid_cmd_func_t)(void *data, int ac, char **av, fluid_ostream_t out);
|
||||
|
||||
/**
|
||||
* Shell command information structure.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char *name; /**< The name of the command, as typed in the shell */
|
||||
char *topic; /**< The help topic group of this command */
|
||||
fluid_cmd_func_t handler; /**< Pointer to the handler for this command */
|
||||
char *help; /**< A help string */
|
||||
} fluid_cmd_t;
|
||||
|
||||
fluid_cmd_t *fluid_cmd_copy(const fluid_cmd_t *cmd);
|
||||
void delete_fluid_cmd(fluid_cmd_t *cmd);
|
||||
|
||||
int fluid_cmd_handler_handle(void *data,
|
||||
int ac, char **av,
|
||||
fluid_ostream_t out);
|
||||
|
||||
int fluid_cmd_handler_register(fluid_cmd_handler_t *handler, const fluid_cmd_t *cmd);
|
||||
int fluid_cmd_handler_unregister(fluid_cmd_handler_t *handler, const char *cmd);
|
||||
|
||||
|
||||
void fluid_server_remove_client(fluid_server_t *server, fluid_client_t *client);
|
||||
void fluid_server_add_client(fluid_server_t *server, fluid_client_t *client);
|
||||
|
||||
|
||||
fluid_client_t *new_fluid_client(fluid_server_t *server,
|
||||
fluid_settings_t *settings,
|
||||
fluid_socket_t sock);
|
||||
|
||||
void delete_fluid_client(fluid_client_t *client);
|
||||
void fluid_client_quit(fluid_client_t *client);
|
||||
|
||||
|
||||
#endif /* _FLUID_CMD_H */
|
|
@ -21,7 +21,6 @@
|
|||
#include "fluid_sys.h"
|
||||
#include "fluid_hash.h"
|
||||
#include "fluid_synth.h"
|
||||
#include "fluid_cmd.h"
|
||||
#include "fluid_adriver.h"
|
||||
#include "fluid_mdriver.h"
|
||||
#include "fluid_settings.h"
|
||||
|
@ -330,7 +329,7 @@ fluid_settings_init(fluid_settings_t *settings)
|
|||
fluid_return_if_fail(settings != NULL);
|
||||
|
||||
fluid_synth_settings(settings);
|
||||
fluid_shell_settings(settings);
|
||||
//fluid_shell_settings(settings);
|
||||
fluid_player_settings(settings);
|
||||
fluid_file_renderer_settings(settings);
|
||||
fluid_audio_driver_settings(settings);
|
||||
|
|
1
thirdparty/fluidsynth/src/utils/fluid_sys.h
vendored
1
thirdparty/fluidsynth/src/utils/fluid_sys.h
vendored
|
@ -209,7 +209,6 @@ char *fluid_strtok(char **str, char *delim);
|
|||
#define FLUID_FILE_TEST_IS_REGULAR G_FILE_TEST_IS_REGULAR
|
||||
#define fluid_file_test(path, flags) g_file_test(path, flags)
|
||||
|
||||
#define fluid_shell_parse_argv(command_line, argcp, argvp) g_shell_parse_argv(command_line, argcp, argvp, NULL)
|
||||
#define fluid_strfreev g_strfreev
|
||||
|
||||
#if defined(__OS2__)
|
||||
|
|
117
thirdparty/fluidsynth/src/utils/win32_glibstubs.c
vendored
117
thirdparty/fluidsynth/src/utils/win32_glibstubs.c
vendored
|
@ -54,123 +54,6 @@ BOOL fluid_g_file_test(const char *pathA, int flags)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// ParseCommandLine - Taken from ZDoom
|
||||
//
|
||||
// Parse a command line (passed in args). If argc is non-NULL, it will
|
||||
// be set to the number of arguments. If argv is non-NULL, it will be
|
||||
// filled with pointers to each argument; argv[0] should be initialized
|
||||
// to point to a buffer large enough to hold all the arguments. The
|
||||
// return value is the necessary size of this buffer.
|
||||
//
|
||||
// Special processing:
|
||||
// Inside quoted strings, \" becomes just "
|
||||
// \\ becomes just a single backslash
|
||||
|
||||
static long ParseCommandLine(const char *args, int *argc, char **argv)
|
||||
{
|
||||
int count;
|
||||
char *buffer;
|
||||
long buffplace;
|
||||
|
||||
count = 0;
|
||||
buffplace = 0;
|
||||
buffer = argv != NULL ? argv[0] : NULL;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
while (*args <= ' ' && *args)
|
||||
{ // skip white space
|
||||
args++;
|
||||
}
|
||||
if (*args == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (*args == '\"')
|
||||
{ // read quoted string
|
||||
char stuff;
|
||||
if (argv != NULL)
|
||||
{
|
||||
argv[count] = buffer + buffplace;
|
||||
}
|
||||
count++;
|
||||
args++;
|
||||
do
|
||||
{
|
||||
stuff = *args++;
|
||||
if (stuff == '\\' && *args == '\"')
|
||||
{
|
||||
stuff = '\"';
|
||||
args++;
|
||||
}
|
||||
else if (stuff == '\\' && *args == '\\')
|
||||
{
|
||||
args++;
|
||||
}
|
||||
else if (stuff == '\"')
|
||||
{
|
||||
stuff = 0;
|
||||
}
|
||||
else if (stuff == 0)
|
||||
{
|
||||
args--;
|
||||
}
|
||||
if (argv != NULL)
|
||||
{
|
||||
buffer[buffplace] = stuff;
|
||||
}
|
||||
buffplace++;
|
||||
} while (stuff);
|
||||
}
|
||||
else
|
||||
{ // read unquoted string
|
||||
const char *start = args++, *end;
|
||||
|
||||
while (*args && *args > ' ' && *args != '\"')
|
||||
{
|
||||
args++;
|
||||
}
|
||||
end = args;
|
||||
if (argv != NULL)
|
||||
{
|
||||
argv[count] = buffer + buffplace;
|
||||
while (start < end)
|
||||
{
|
||||
buffer[buffplace++] = *start++;
|
||||
}
|
||||
buffer[buffplace++] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
buffplace += end - start + 1;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
if (argc != NULL)
|
||||
{
|
||||
*argc = count;
|
||||
}
|
||||
return buffplace;
|
||||
}
|
||||
|
||||
BOOL fluid_g_shell_parse_argv(const char *command_line, int *argcp, char ***argvp, void *_)
|
||||
{
|
||||
long argsize = ParseCommandLine(command_line, argcp, NULL);
|
||||
*argvp = NULL;
|
||||
if (*argcp != 0)
|
||||
{
|
||||
*argvp = (char **)malloc(*argcp * sizeof(char *) + argsize);
|
||||
if (!*argvp)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
**argvp = (char *)*argvp + *argcp * sizeof(char *);
|
||||
ParseCommandLine(command_line, NULL, *argvp);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
double fluid_g_get_monotonic_time(void)
|
||||
{
|
||||
static LARGE_INTEGER freq_cache = { 0, 0 }; /* Performance Frequency */
|
||||
|
|
Loading…
Reference in a new issue