Skip to content

Commit

Permalink
Documentation updated (settings, about utf-8 encoding)
Browse files Browse the repository at this point in the history
C++ example updated
  • Loading branch information
pedrolcl committed May 1, 2024
1 parent e3534c8 commit db094c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/examples/fluidsynth_enumsettings.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
* [Pedro López-Cabanillas <plcl@users.sf.net>]
*/

#ifdef _WIN32
#include <windows.h>
#endif

#include <list>
#include <string>
#include <iostream>
Expand All @@ -23,6 +27,11 @@ int main(int argc, char**)
fluid_settings_t* settings = nullptr;
void* context = nullptr;

#ifdef _WIN32
SetConsoleOutputCP(CP_UTF8);
setvbuf(stdout, nullptr, _IONBF, 0);
#endif

std::cout << "C++ enum settings of FluidSynth v" << fluid_version_str() << std::endl;

if (argc > 1) {
Expand Down
3 changes: 3 additions & 0 deletions include/fluidsynth/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ extern "C" {
* // ...
* }
* @endcode
* All string settings are encoded in UTF-8. This includes the names
* of the audio and MIDI devices, exposed as setting options.
*
* @sa @ref CreatingSettings
*
* @{
Expand Down

0 comments on commit db094c6

Please sign in to comment.