Comments (12)
If you want to help to better diagnose this issue, please:
- Open a terminal window (cmd.exe)
- at the system prompt ("C:>"), type: CHCP, and post the answer from the system.
- change to the QSynth directory. Probably...
C:> cd "C:\Program Files\Qsynth" - now, type the command:
C:> fluidsynth.exe -a wasapi -Q
and please post the results.
from qsynth.
The results are collected.
It contains Japanese information and is encoded in UTF-8.
Qsynth.log
from qsynth.
Your system uses Code Page 932 which is customary for Japanese language. Fluidsynth retrieves the names of the audio devices from Windows, and stores these names in options/settings, encoded in cp932, so Windows native programs will work without any flaws.
The problem is that Qsynth is a Qt application, and the strings need to be encoded in Unicode for displaying. Qsynth is not taking this into account, so the audio device names in your screenshot appear garbled. Not only that, but it is storing these names into QStrings without proper conversion either, so the selection of audio devices do not work.
@rncbc : what do you think? this seems to me a serious bug.
from qsynth.
seems to me that a QString::fromUtf8() is needed in:
qsynth/src/qsynthSetupForm.cpp
Lines 166 to 167 in 936bedb
like this?
(pData->pListItem)->setText(iCol++, QString::fromUtf8(pszCurrent));
(pData->pListItem)->setText(iCol++, QString::fromUtf8(pszDefault));
from qsynth.
seems to me that a QString::fromUtf8() is needed in:
qsynth/src/qsynthSetupForm.cpp
Lines 166 to 167 in 936bedb
like this?
(pData->pListItem)->setText(iCol++, QString::fromUtf8(pszCurrent)); (pData->pListItem)->setText(iCol++, QString::fromUtf8(pszDefault));
Why fromUtf8()
? the problem is that Fluidsynth does not provide the option strings with any fixed or predictable encoding. See:
And this is the documentation for the function ' WideCharToMultiByte' :
https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte
Maps a UTF-16 (wide character) string to a new character string. The new character string is not necessarily from a multibyte character set.
where CP_ACP
means:
The system default Windows ANSI code page.
Note This value can be different on different computers, even on the same network. It can be changed on the same computer, leading to stored data becoming irrecoverably corrupted. This value is only intended for temporary use and permanent storage should use UTF-16 or UTF-8 if possible.
from qsynth.
so it maybe a fluid_settings/windows blunder? does 1ec61bf behave any better?
from qsynth.
so it maybe a fluid_settings/windows blunder? does 1ec61bf behave any better?
I guess that your question is for @nanitaro but first you should ask him if he is able to build and test qsynth's git repository by himself.
I can test it in a Windows machine with a Spanish or English locale, but that is not the same problem.
from qsynth.
I now see that, perhaps my change will only work properly if WideCharToMultiByte
would be called with CP_UTF8
, instead of CP_ACP (on fluid_wasapi.c) :S
at least qsynth is now prepared; lest to say the ball is at fluidsynth's side, I guess :)
from qsynth.
I take that back. I can do some tests on my Windows box.
First, I've renamed my windows audio devices, to something very tricky:
This is the output of CHCP
and fluidsynth.exe -a wasapi -Q
(encoded in utf-8) My terminal is using cp1252:
This is the result of your change 1ec61bf :
The garbage is similar in v0.9.90 but the important effect is that selecting any device name other than "default", the driver initialization fails with:
18:18:40.047 Qsynth1: Creating audio driver (wasapi)...
18:18:40.059 Qsynth1: Failed to create the audio driver (wasapi). Cannot continue without it.
from qsynth.
yeah right, but what if you change it to CP_UTF8 in fluidsynth's fluid_wasapi.c ?
from qsynth.
yeah right, but what if you change it to CP_UTF8 in fluidsynth's fluid_wasapi.c ?
That any and all other windows programs linking to libfluidsynth.dll
, not expecting Unicode in Fluidsynth options, will break. Even the fluidsynth.exe CLI program will output garbage when using the arguments "-a wasapi -Q":
Available audio devices:
default
Áürïçularès (High Definition Audio Device)
├æ├í├®├¡├│├║├ç (HDMI) (2- High Definition Audio Device)
It is important for a library to keep backward compatibility, so in my opinion changing Fluidsynth can only be done very carefully, after analyzing all other options. For instance, having a new optional build switch to create some libfluidsynth-unicode.dll
that would be friendly to downstream Qt projects.
But in this case, I guess that it can be a bug in Fluidsynth's Wasapi driver, because all other drivers use CP_UTF8.
from qsynth.
Thank you for your response.
I guess that your question is for @nanitaro but first you should ask him if he is able to build and test qsynth's git repository by himself.
Sorry, I cannot build it myself.
I have MSYS2 installed but am not familiar with it.
However, since you seem to be able to reproduce the bug, please continue to investigate.
from qsynth.
Related Issues (20)
- Qsynth doesn't work with Jack with more than 2 stereo channels HOT 1
- Even channels do not play back through JACK when audio group number is set to 2 HOT 5
- Problems integrating fluidsynth-2.2.0 with the new wasapi audio driver in windows HOT 2
- Windows: runtime error (assertion failed) in qsynth compiled with MSVC HOT 1
- It closes some seconds after I opened it.
- I hear a crackle sound sometimes HOT 2
- Unable to play any video while Qsynth is active HOT 2
- No sound when selecting "External headphones" as "audio device"
- There is no qsynth flatpak HOT 12
- Non existing signals when compiling with Qt6 HOT 1
- DLS sound fonts can't be added HOT 3
- Change the UI language translation HOT 12
- Impossible to increase gain above ui maximum HOT 9
- No terminal output in Windows HOT 2
- Can't select a new instrument HOT 2
- no options for interpolation method
- init ladspa's on channel(s) as part of patch HOT 1
- Numbers are not visible on some spin button items.(Windows11 Widget Theme and HiDPI?) HOT 4
- (Request) synth.device-id to be variable HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qsynth.