mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 15:01:40 +00:00
Show a warning when file renderer is use with more than one stereo channel (#1028)
Resolves #1026
This commit is contained in:
parent
3229899a34
commit
b7a0264459
1 changed files with 7 additions and 0 deletions
|
@ -199,6 +199,7 @@ new_fluid_file_renderer(fluid_synth_t *synth)
|
||||||
double samplerate;
|
double samplerate;
|
||||||
int retval;
|
int retval;
|
||||||
#endif
|
#endif
|
||||||
|
int audio_channels;
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
fluid_file_renderer_t *dev;
|
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_dupstr(synth->settings, "audio.file.name", &filename);
|
||||||
|
fluid_settings_getint(synth->settings, "synth.audio-channels", &audio_channels);
|
||||||
|
|
||||||
if(filename == NULL)
|
if(filename == NULL)
|
||||||
{
|
{
|
||||||
|
@ -310,6 +312,11 @@ new_fluid_file_renderer(fluid_synth_t *synth)
|
||||||
|
|
||||||
#endif
|
#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);
|
FLUID_FREE(filename);
|
||||||
return dev;
|
return dev;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue