Skip to content

Commit 169bdba

Browse files
author
API Doc Deploy
committed
Updating API doc from fluidsynth master
1 parent bb69ba3 commit 169bdba

3 files changed

Lines changed: 39 additions & 11 deletions

File tree

api/CreatingAudioDriver.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,21 @@
9696
<li>pulseaudio: PulseAudio (Linux, Mac OS X, Windows)</li>
9797
<li>coreaudio: Apple CoreAudio (Mac OS X)</li>
9898
<li>dsound: Microsoft DirectSound (Windows)</li>
99+
<li>wasapi: Windows Audio Session API (Windows Vista and later)</li>
100+
<li>waveout: Microsoft WaveOut, alternative to DirectSound (Windows CE x86, Windows Mobile 2003 for ARMv5, Windows 98 SE, Windows NT 4.0, Windows XP and later)</li>
99101
<li>portaudio: PortAudio Library (Mac OS 9 &amp; X, Windows, Linux)</li>
100102
<li>sndman: Apple SoundManager (Mac OS Classic)</li>
101103
<li>dart: DART sound driver (OS/2)</li>
102104
<li>opensles: OpenSL ES (Android)</li>
103105
<li>oboe: Oboe (Android)</li>
104-
<li>waveout: Microsoft WaveOut, alternative to DirectSound (Windows CE x86, Windows Mobile 2003 for ARMv5, Windows 98 SE, Windows NT 4.0, Windows XP and later)</li>
105-
<li>file: Driver to output audio to a file</li>
106106
<li>sdl3*: Simple DirectMedia Layer (Linux, Windows, Mac OS X, iOS, Android, FreeBSD, Haiku, etc.)</li>
107107
<li>pipewire**: PipeWire (Linux)</li>
108+
<li>file: Driver to output audio to a file</li>
108109
</ul>
109110
<p>The default audio driver depends on the settings with which FluidSynth was compiled. You can get the default driver with <a class="el" href="group__settings.html#ga5acb5b788aae89b556dd69f2f6d667eb" title="Get the default value of a string setting.">fluid_settings_getstr_default()</a>. To get the list of available drivers use the <a class="el" href="group__settings.html#ga27b468f705be56657281b07fbe4e0398" title="Iterate the available options for a named string setting, calling the provided callback function for ...">fluid_settings_foreach_option()</a> function. Finally, you can set the driver with <a class="el" href="group__settings.html#ga58cbabbb8990c2934b3eeea925e01804" title="Set a string value for a named setting.">fluid_settings_setstr()</a>. In most cases, the default driver should work out of the box.</p>
110-
<p>Additional options that define the audio quality and latency are <a class="el" href="settings_audio.html#settings_audio_sample-format">audio.sample-format</a>, <a class="el" href="settings_audio.html#settings_audio_period-size">audio.period-size</a>, and <a class="el" href="settings_audio.html#settings_audio_periods">audio.periods</a>. The details are described later.</p>
111-
<p>You create the audio driver with the <a class="el" href="group__audio__driver.html#ga7c66ef86f0008807bdd955770fca6925" title="Create a new audio driver.">new_fluid_audio_driver()</a> function. This function takes the settings and synthesizer object as arguments. For example:</p>
111+
<p>Additional audio driver options that define the audio quality and latency include <a class="el" href="settings_audio.html#settings_audio_sample-format">audio.sample-format</a>, <a class="el" href="settings_audio.html#settings_audio_period-size">audio.period-size</a>, and <a class="el" href="settings_audio.html#settings_audio_periods">audio.periods</a>. The synthesizer's settings_synth.sample-rate is also involved. The details are described later.</p>
112+
<p>Important: Configure the synthesizer before creating the audio driver. In particular, set settings_synth.sample-rate before instantiating the synth with <a class="el" href="group__synth.html#ga2aab8e0b82dc9fd086849efacb3c1b1b" title="Create new FluidSynth instance.">new_fluid_synth()</a>. After the synth has been created, changing settings_synth.sample-rate in the settings object may not change the sample rate used by the synthesizer, while audio drivers created later may use the updated setting value and cause the audio to be played out of tune. If you need to change the sample rate, recreate both the synthesizer and the audio driver using settings with the new sample rate.</p>
113+
<p>You can create the audio driver with the <a class="el" href="group__audio__driver.html#ga7c66ef86f0008807bdd955770fca6925" title="Create a new audio driver.">new_fluid_audio_driver()</a> function. This function takes the settings and synthesizer object as arguments. For example:</p>
112114
<div class="fragment"><div class="line"><span class="keywordtype">void</span> init() </div>
113115
<div class="line">{</div>
114116
<div class="line"> <a class="code" href="group__Types.html#gaa363402d3c77333b0f070ba531d034ba">fluid_settings_t</a>* settings;</div>
@@ -129,7 +131,7 @@
129131
<div class="ttc" id="agroup__settings_html_ga58cbabbb8990c2934b3eeea925e01804"><div class="ttname"><a href="group__settings.html#ga58cbabbb8990c2934b3eeea925e01804">fluid_settings_setstr</a></div><div class="ttdeci">int fluid_settings_setstr(fluid_settings_t *settings, const char *name, const char *str)</div><div class="ttdoc">Set a string value for a named setting.</div><div class="ttdef"><b>Definition:</b> fluid_settings.c:962</div></div>
130132
<div class="ttc" id="agroup__settings_html_ga7623af35fb3d1abace21ef7d5b4f4781"><div class="ttname"><a href="group__settings.html#ga7623af35fb3d1abace21ef7d5b4f4781">new_fluid_settings</a></div><div class="ttdeci">fluid_settings_t * new_fluid_settings(void)</div><div class="ttdoc">Create a new settings object.</div><div class="ttdef"><b>Definition:</b> fluid_settings.c:261</div></div>
131133
<div class="ttc" id="agroup__synth_html_ga2aab8e0b82dc9fd086849efacb3c1b1b"><div class="ttname"><a href="group__synth.html#ga2aab8e0b82dc9fd086849efacb3c1b1b">new_fluid_synth</a></div><div class="ttdeci">fluid_synth_t * new_fluid_synth(fluid_settings_t *settings)</div><div class="ttdoc">Create new FluidSynth instance.</div><div class="ttdef"><b>Definition:</b> fluid_synth.c:671</div></div>
132-
</div><!-- fragment --><p>As soon as the audio driver is created, it will start playing. The audio driver creates a separate thread that uses the synthesizer object to generate the audio.</p>
134+
</div><!-- fragment --><p>As soon as the audio driver is created, it will start playing. The audio driver creates a separate thread that receives audio samples from the synthesizer object and transfers them to an audio endpoint to generate sound.</p>
133135
<p>There are a number of general audio driver settings. The audio.driver settings define the audio subsystem that will be used. The <a class="el" href="settings_audio.html#settings_audio_periods">audio.periods</a> and <a class="el" href="settings_audio.html#settings_audio_period-size">audio.period-size</a> settings define the latency and robustness against scheduling delays. There are additional settings for the audio subsystems used. For a full list of available <b>audio driver settings</b>, please refer to the <a class="el" href="settings_audio.html">Audio driver settings</a> documentation.</p>
134136
<p><b>*Note:</b> In order to use sdl3 as audio driver, the application is responsible for initializing SDL (e.g. with SDL_Init()). This must be done <b>before</b> the first call to <code><a class="el" href="group__settings.html#ga7623af35fb3d1abace21ef7d5b4f4781" title="Create a new settings object.">new_fluid_settings()</a></code>! Also make sure to call SDL_Quit() after all fluidsynth instances have been destroyed. A warning may be printed if sdl3 is available, but no such call has been made.</p>
135137
<p><b>**Note:</b> In order to use pipeiwre as audio driver, the application is responsible for initializing PipeWire (e.g. with pw_init()). This must be done <b>before</b> the first call to <code><a class="el" href="group__settings.html#ga7623af35fb3d1abace21ef7d5b4f4781" title="Create a new settings object.">new_fluid_settings()</a></code>! Also make sure to call pw_deinit() after all fluidsynth instances have been destroyed.</p>

api/fluidsettings.xml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,23 @@ Developers:
385385
<def>44100.0</def>
386386
<min>8000.0</min>
387387
<max>96000.0</max>
388-
<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. Note, that this is not a realtime setting and changing it requires to re-create the synthesizer and audio driver instance (if any).
390-
</desc>
391-
</setting>
388+
<desc>
389+
The sample rate of the audio generated by the synthesizer. For optimal performance,
390+
make sure this value equals the native output rate of the audio driver (in case you
391+
are using any of FluidSynth's audio drivers). Some drivers, such as Oboe, will
392+
interpolate sample rates, whereas others, such as JACK, will override this setting
393+
if a mismatch with the native output rate is detected.
394+
<br /><br />
395+
Important: This setting should not be changed during runtime of the synthesizer.
396+
<br /><br />
397+
The sample rate is applied when the synthesizer is created and controls the
398+
rate at which samples are synthesized. Changing this value after creating the
399+
synthesizer does not affect the synthesizer. Audio drivers created later may use
400+
the updated setting value and cause the audio to play out of tune. If you need to
401+
change the sample rate, recreate both the synthesizer and the audio driver using
402+
settings with the new sample rate.
403+
</desc>
404+
</setting>
392405
<setting>
393406
<name>threadsafe-api</name>
394407
<type>bool</type>

api/settings_synth.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,21 @@ <h1><a class="anchor" id="settings_synth_sample-rate"></a>
711711
</dd></dl>
712712
<p>
713713
<desc>
714-
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).
715-
</desc>
714+
The sample rate of the audio generated by the synthesizer. For optimal performance,
715+
make sure this value equals the native output rate of the audio driver (in case you
716+
are using any of FluidSynth's audio drivers). Some drivers, such as Oboe, will
717+
interpolate sample rates, whereas others, such as JACK, will override this setting
718+
if a mismatch with the native output rate is detected.
719+
<br><br>
720+
Important: This setting should not be changed during runtime of the synthesizer.
721+
<br><br>
722+
The sample rate is applied when the synthesizer is created and controls the
723+
rate at which samples are synthesized. Changing this value after creating the
724+
synthesizer does not affect the synthesizer. Audio drivers created later may use
725+
the updated setting value and cause the audio to play out of tune. If you need to
726+
change the sample rate, recreate both the synthesizer and the audio driver using
727+
settings with the new sample rate.
728+
</desc>
716729

717730
</div>
718731
</p>

0 commit comments

Comments
 (0)