Show a warning when file renderer is use with more than one stereo channel (#1028)

Resolves #1026
This commit is contained in:
Tom M 2022-01-16 14:33:52 +01:00 committed by GitHub
parent 3229899a34
commit b7a0264459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -199,6 +199,7 @@ new_fluid_file_renderer(fluid_synth_t *synth)
double samplerate;
int retval;
#endif
int audio_channels;
char *filename = NULL;
fluid_file_renderer_t *dev;
@ -233,6 +234,7 @@ new_fluid_file_renderer(fluid_synth_t *synth)
}
fluid_settings_dupstr(synth->settings, "audio.file.name", &filename);
fluid_settings_getint(synth->settings, "synth.audio-channels", &audio_channels);
if(filename == NULL)
{
@ -310,6 +312,11 @@ new_fluid_file_renderer(fluid_synth_t *synth)
#endif
if(audio_channels != 1)
{
FLUID_LOG(FLUID_WARN, "The file-renderer currently only supports a single stereo channel. You have provided %d stereo channels. Audio may sound strange or incomplete.", audio_channels);
}
FLUID_FREE(filename);
return dev;