Skip to content

Commit d8888d9

Browse files
authored
Merge pull request #1736 from FluidSynth/issue-1726
Update API docs about possible hazards when changing no-realtime settings
2 parents dd9ea23 + ab2bd6a commit d8888d9

File tree

14 files changed

+28
-26
lines changed

14 files changed

+28
-26
lines changed

doc/fluidsettings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ Developers:
386386
<min>8000.0</min>
387387
<max>96000.0</max>
388388
<desc>
389-
The sample rate of the audio generated by the synthesizer. For optimal performance, make sure this value equals the native output rate of the audio driver (in case you are using any of fluidsynth's audio drivers). Some drivers, such as Oboe, will interpolate sample-rates, whereas others, such as Jack, will override this setting, if a mismatch with the native output rate is detected.
389+
The sample rate of the audio generated by the synthesizer. For optimal performance, make sure this value equals the native output rate of the audio driver (in case you are using any of fluidsynth's audio drivers). Some drivers, such as Oboe, will interpolate sample-rates, whereas others, such as Jack, will override this setting, if a mismatch with the native output rate is detected. Note, that this is not a realtime setting and changing it requires to re-create the synthesizer and audio driver instance (if any).
390390
</desc>
391391
</setting>
392392
<setting>

include/fluidsynth/audio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extern "C" {
3232
* The file renderer is used for fast rendering of MIDI files to
3333
* audio files. The audio drivers are a high-level interface to
3434
* connect the synthesizer with external audio sinks or to render
35-
* real-time audio to files.
35+
* realtime audio to files.
3636
*/
3737

3838
/**
@@ -131,7 +131,7 @@ FLUIDSYNTH_API int fluid_audio_driver_register(const char **adrivers);
131131
* as possible. Please see \ref FileRenderer for a full example.
132132
*
133133
* If you are looking for a way to write audio generated
134-
* from real-time events (for example from an external sequencer or a MIDI controller) to a file,
134+
* from realtime events (for example from an external sequencer or a MIDI controller) to a file,
135135
* please have a look at the \c file \ref audio_driver instead.
136136
*
137137
*

include/fluidsynth/synth.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ FLUIDSYNTH_API int fluid_synth_tuning_dump(fluid_synth_t *synth, int bank, int p
334334
* but can also be used manually for custom processing of the rendered audio.
335335
*
336336
* @note Please note that all following functions block during rendering. If your goal is to
337-
* render real-time audio, ensure that you call these functions from a high-priority
337+
* render realtime audio, ensure that you call these functions from a high-priority
338338
* thread with little to no other duties other than calling the rendering functions.
339339
*
340340
* @warning
@@ -344,7 +344,7 @@ FLUIDSYNTH_API int fluid_synth_tuning_dump(fluid_synth_t *synth, int bank, int p
344344
* synth with every call (cf. fluid_synth_get_internal_bufsize()), it will become evident when requesting larger sample chunks:
345345
* With larger sample chunks it will get harder for the synth to react on those spontaneously occurring events in time
346346
* (like events received from a MIDI driver, or directly made synth API calls).
347-
* In those real-time scenarios, prefer requesting smaller
347+
* In those realtime scenarios, prefer requesting smaller
348348
* sample chunks from the synth with each call, to avoid poor quantization of your events in the synthesized audio.
349349
* This issue is not applicable when using the MIDI player or sequencer for event dispatching. Also
350350
* refer to the documentation of \setting{audio_period-size}.

src/bindings/fluid_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static const fluid_cmd_t fluid_commands[] =
231231
/* settings commands */
232232
{
233233
"set", "settings", fluid_handle_set,
234-
"set name value Set the value of a setting (must be a real-time setting to take effect immediately)"
234+
"set name value Set the value of a setting (must be a realtime setting to take effect immediately)"
235235
},
236236
{
237237
"get", "settings", fluid_handle_get,

src/drivers/fluid_adriver.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ find_fluid_audio_driver(fluid_settings_t *settings)
333333
* completed before calling this function.
334334
* Thus, of all object types in use (synth, midi player, sequencer, etc.) the audio
335335
* driver should always be the last one to be created and the first one to be deleted!
336-
* Also refer to the order of object creation in the code examples.
336+
* Also refer to the order of object creation in the code examples. Deleting and re-creating
337+
* the audio driver is supported. However, only settings marked as realtime can reconfigure
338+
* an already created \p synth.
337339
*/
338340
fluid_audio_driver_t *
339341
new_fluid_audio_driver(fluid_settings_t *settings, fluid_synth_t *synth)

src/drivers/fluid_aufile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
/* fluid_aufile.c
2121
*
22-
* Audio driver, outputs the audio to a file (non real-time)
22+
* Audio driver, outputs the audio to a file (non realtime)
2323
*
2424
*/
2525

src/midi/fluid_midi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ enum fluid_midi_event_type
6262
MIDI_SONG_SELECT = 0xf3,
6363
MIDI_TUNE_REQUEST = 0xf6,
6464
MIDI_EOX = 0xf7,
65-
/* system real-time - never in midi files */
65+
/* system realtime - never in midi files */
6666
MIDI_SYNC = 0xf8,
6767
MIDI_TICK = 0xf9,
6868
MIDI_START = 0xfa,

src/rvoice/fluid_iir_filter_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <cmath>
2626

2727

28-
// Calculating the sine and cosine coefficients for every possible cutoff frequency is too CPU expensive and can harm real-time playback.
28+
// Calculating the sine and cosine coefficients for every possible cutoff frequency is too CPU expensive and can harm realtime playback.
2929
// Therefore, we precalculate the coefficients with a precision of CENTS_STEP and store them in a table.
3030
extern "C" void fluid_iir_filter_init_table(fluid_iir_sincos_t *sincos_table, fluid_real_t sample_rate)
3131
{

src/rvoice/fluid_rvoice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ struct _fluid_rvoice_buffers_t
155155

156156

157157
/*
158-
* Hard real-time parameters needed to synthesize a voice
158+
* Hard realtime parameters needed to synthesize a voice
159159
*/
160160
struct _fluid_rvoice_t
161161
{

src/rvoice/fluid_rvoice_mixer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ fluid_mixer_buffers_update_polyphony(fluid_mixer_buffers_t *buffers, int value)
613613
}
614614

615615
/**
616-
* Update polyphony - max number of voices (NOTE: not hard real-time capable)
616+
* Update polyphony - max number of voices (NOTE: not hard realtime capable)
617617
* @return FLUID_OK or FLUID_FAILED
618618
*/
619619
DECLARE_FLUID_RVOICE_FUNCTION(fluid_rvoice_mixer_set_polyphony)
@@ -757,7 +757,7 @@ fluid_mixer_buffers_init(fluid_mixer_buffers_t *buffers, fluid_rvoice_mixer_t *m
757757
}
758758

759759
/**
760-
* Note: Not hard real-time capable (calls malloc)
760+
* Note: Not hard realtime capable (calls malloc)
761761
*/
762762
DECLARE_FLUID_RVOICE_FUNCTION(fluid_rvoice_mixer_set_samplerate)
763763
{
@@ -1629,7 +1629,7 @@ static void delete_rvoice_mixer_threads(fluid_rvoice_mixer_t *mixer)
16291629
/**
16301630
* Update amount of extra mixer threads.
16311631
* @param thread_count Number of extra mixer threads for multi-core rendering
1632-
* @param prio_level real-time prio level for the extra mixer threads
1632+
* @param prio_level realtime prio level for the extra mixer threads
16331633
*/
16341634
static int fluid_rvoice_mixer_set_threads(fluid_rvoice_mixer_t *mixer, int thread_count, int prio_level)
16351635
{

0 commit comments

Comments
 (0)