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
21 #ifndef _FLUIDSYNTH_SHELL_H
22 #define _FLUIDSYNTH_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 */
49 fluid_cmd_handler_t
*new_fluid_cmd_handler(fluid_synth_t
*synth
, fluid_midi_router_t
*router
);
52 void delete_fluid_cmd_handler(fluid_cmd_handler_t
*handler
);
55 void fluid_cmd_handler_set_synth(fluid_cmd_handler_t
*handler
, fluid_synth_t
*synth
);
59 /* Command function */
62 int fluid_command(fluid_cmd_handler_t
*handler
, const char *cmd
, fluid_ostream_t out
);
65 int fluid_source(fluid_cmd_handler_t
*handler
, const char *filename
);
68 void fluid_usershell(fluid_settings_t
*settings
, fluid_cmd_handler_t
*handler
);
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
);
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
);
97 #endif /* _FLUIDSYNTH_SHELL_H */