From ae6b17d9164fe729bf3f711bbbef0e9366296b4a Mon Sep 17 00:00:00 2001 From: Josh Green Date: Sat, 3 Oct 2009 18:21:12 +0000 Subject: [PATCH] Fixed some warnings in fluid_filerenderer and improved -T, -E, -O help output for case where libsndfile support not enabled. --- fluidsynth/src/fluid_filerenderer.c | 6 +++--- fluidsynth/src/fluidsynth.c | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/fluidsynth/src/fluid_filerenderer.c b/fluidsynth/src/fluid_filerenderer.c index a5fa6a5c..e943a0ae 100644 --- a/fluidsynth/src/fluid_filerenderer.c +++ b/fluidsynth/src/fluid_filerenderer.c @@ -105,19 +105,19 @@ static int fluid_file_renderer_find_file_type (char *extension, int *type); /* File type names. */ -char *type_names[] = { +const char *type_names[] = { "raw", NULL /* Terminator */ }; /* File audio format names. */ -char *format_names[] = { +const char *format_names[] = { "s16", NULL /* Terminator */ }; /* File endian byte order names. */ -char *endian_names[] = { +const char *endian_names[] = { "cpu", NULL }; diff --git a/fluidsynth/src/fluidsynth.c b/fluidsynth/src/fluidsynth.c index 2d9dfb41..868ca6e7 100644 --- a/fluidsynth/src/fluidsynth.c +++ b/fluidsynth/src/fluidsynth.c @@ -371,8 +371,13 @@ int main(int argc, char** argv) for (sp = names; *sp; sp++) printf (" %s", *sp); +#if LIBSNDFILE_SUPPORT printf ("\n\nauto: Use audio file format's default endian byte order\n" "cpu: Use CPU native byte order\n"); +#else + printf ("\n\nNOTE: No libsndfile support!\n" + "cpu: Use CPU native byte order\n"); +#endif exit (0); } else fluid_settings_setstr(settings, "audio.file.endian", optarg); @@ -427,7 +432,11 @@ int main(int argc, char** argv) for (sp = names; *sp; sp++) printf (" %s", *sp); +#if LIBSNDFILE_SUPPORT printf ("\n"); +#else + printf ("\n\nNOTE: No libsndfile support!\n"); +#endif exit (0); } else fluid_settings_setstr(settings, "audio.file.format", optarg); @@ -465,7 +474,11 @@ int main(int argc, char** argv) for (sp = names; *sp; sp++) printf (" %s", *sp); +#if LIBSNDFILE_SUPPORT printf ("\n\nauto: Determine type from file name extension, defaults to \"wav\"\n"); +#else + printf ("\n\nNOTE: No libsndfile support!\n"); +#endif exit (0); } else fluid_settings_setstr(settings, "audio.file.type", optarg);