Add files via upload
[fluidsynth-winbin.git] / bin64 / fluidsynth-2.0.9 / usr / include / fluidsynth / shell.h
blobf9c17e0fe90de666945dc4f14f1a4d8dadfd9ba8
1 /* FluidSynth - A Software Synthesizer
3 * Copyright (C) 2003 Peter Hanappe and others.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation; either version 2.1 of
8 * the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301, USA
21 #ifndef _FLUIDSYNTH_SHELL_H
22 #define _FLUIDSYNTH_SHELL_H
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
30 /**
31 * @file shell.h
32 * @brief Command shell interface
34 * The shell interface allows you to send simple textual commands to
35 * the synthesizer, to parse a command file, or to read commands
36 * from the stdin or other input streams.
39 FLUIDSYNTH_API fluid_istream_t fluid_get_stdin(void);
40 FLUIDSYNTH_API fluid_ostream_t fluid_get_stdout(void);
42 FLUIDSYNTH_API char *fluid_get_userconf(char *buf, int len);
43 FLUIDSYNTH_API char *fluid_get_sysconf(char *buf, int len);
46 /* The command handler */
48 FLUIDSYNTH_API
49 fluid_cmd_handler_t *new_fluid_cmd_handler(fluid_synth_t *synth, fluid_midi_router_t *router);
51 FLUIDSYNTH_API
52 void delete_fluid_cmd_handler(fluid_cmd_handler_t *handler);
54 FLUIDSYNTH_API
55 void fluid_cmd_handler_set_synth(fluid_cmd_handler_t *handler, fluid_synth_t *synth);
59 /* Command function */
61 FLUIDSYNTH_API
62 int fluid_command(fluid_cmd_handler_t *handler, const char *cmd, fluid_ostream_t out);
64 FLUIDSYNTH_API
65 int fluid_source(fluid_cmd_handler_t *handler, const char *filename);
67 FLUIDSYNTH_API
68 void fluid_usershell(fluid_settings_t *settings, fluid_cmd_handler_t *handler);
71 /* Shell */
73 FLUIDSYNTH_API
74 fluid_shell_t *new_fluid_shell(fluid_settings_t *settings, fluid_cmd_handler_t *handler,
75 fluid_istream_t in, fluid_ostream_t out, int thread);
77 FLUIDSYNTH_API void delete_fluid_shell(fluid_shell_t *shell);
81 /* TCP/IP server */
84 FLUIDSYNTH_API
85 fluid_server_t *new_fluid_server(fluid_settings_t *settings,
86 fluid_synth_t *synth, fluid_midi_router_t *router);
88 FLUIDSYNTH_API void delete_fluid_server(fluid_server_t *server);
90 FLUIDSYNTH_API int fluid_server_join(fluid_server_t *server);
93 #ifdef __cplusplus
95 #endif
97 #endif /* _FLUIDSYNTH_SHELL_H */