elieserdejesus / JamTaba

Jamtaba is a software to play online music jam sessions.
http://www.jamtaba.com
245 stars 49 forks source link

OSX audio preferences regression since latest changes on windows #1166

Open fab672000 opened 5 years ago

fab672000 commented 5 years ago

Unfortunately, it seems that my changes don't work anymore on OSX for audio output selection, the dialog box is always disabled when selecting a driver. Also, latest builds still use the buggy portaudio lib that truncates the device names and channels names.

fab672000 commented 5 years ago

It seems that this change in preferencesDialog break OSX now: i.e. say my first out is 0, and max out is 2, it sets current first out to 1 when i think it was fine at 0? EDIT: will investigate more what makes the output empty.

fab672000 commented 5 years ago

OK, that's really a very improvable small piece of UI code :)

There is a lot of confusion in this code due to the fact that populating the entries First[Last] Input[Output] Combos is called also in the case of the slots user selection updates ...

There should be callbacks for user selection that changed, they should be distinct from the combobox populating code that should happen when changing the device only and at initialization.

When changing a device, the current combobox box indexes should be reset and then last i/o should map to their respective successors in the list if there is one.

Every time we adjust the index or clear and then add entries the callback is called but only the Last Input[Output] ones, I'll sort this out and split responsibilities in this code to make it less brittle and subject to side effects.

fab672000 commented 5 years ago

OK i refactored this code as explained, works beautifully in the preferences dialog and also for default channels settings, I still have one more bug to ficx inside a room with a reduced range of channels (a simpel offset to add) and I should be good to go !

fab672000 commented 5 years ago

Also fixed many offsets bugs in the track local view. seems to work great wiith a lot of different input ranges playing with audio setups. will propose a PR soon.

elieserdejesus commented 5 years ago

Nice @fab672000 , waiting for the PR. Sorry for the mess in the UI code, some UI was writing in the very begining of this project and I was learning Qt. Many signal & slots codes are very messed, any improvements are welcome.

fab672000 commented 5 years ago

No problem at all, I have something much easier to maintain and with many fixes on my develop branch already, but I'd like to test it more on windows too. It does not fix everything I noted yet, but most of it. We still have work on save / restore sometimes not great for audio (will fix later I think not urgent as I have implemented now an autorecovery that fall backs on default driver when we detect a driver problem).

fab672000 commented 5 years ago

@elieserdejesus Continuing to test on windows as I could find a bug on the standalone, will finish it this week.

elieserdejesus commented 5 years ago

An user send me an email about v2.1.8 crashing whem opening the audio preferences. The first log line is:

 unsuported output format:  Invalid sample rate sampleRate:  44100 channels:  2 

I tested here and is ok, but I'm using just ASIO4ALL as asio driver. I suspect the problem appears when user has more than one asio driver installed.

fab672000 commented 5 years ago

I fixed few problems there, but my change is not ready yet I would like to know which driver he used, I also test different asio drivers here so maybe I can help.

fab672000 commented 5 years ago

@elieserdejesus could you update the port audio lib please when you build a new release ? as it fixes few bugs including the truncation of the device names and channel names.

elieserdejesus commented 5 years ago

I would like to know which driver he used

The guy not answered my email yet. Let's wait...

could you update the port audio lib please when you build a new release ? as it fixes few bugs including the truncation of the device names and channel names.

Shure, I will open a new issue just to remember and track the improvement.

fab672000 commented 5 years ago

Thanks in advance for that Eli! Also, even though I built the standalone without any problem with my new qt5.6.3 build on windows, I was not able to build the VST2 dlls (both 32 bit and 64 bit failed) the errors show dependencies of qt not found , I tried to add in the plugin .pro file the qt-freetype lib and even force it in my visual studio 2013 project without success (still get the unresolved entries) Note that I followed like for 5.5.1 the exact documentation and the configure options as described in our build documentation.

Any recommendations for building the VST2 on windows?

elieserdejesus commented 5 years ago

@fab672000 , in Windows I'm using Qt 5.5.0, but I think 5.5.1 will work too.

You mentioned your Standalone was compiled with Qt 5.6.3.

I'm assuming you are compiling static Qt. Static compilation is mandatory to compile VST plugin. Try a static Qt 5.5.0 build.

The Qt static builds are not officially tested, so many Qt versions can't be static compiled. I tested some versions and see the compilation fail. It's a very boring process, after a long time compiling you just see a fatal error in the end of the process.

If you open JamTaba.pro in QtCreator and compile all artifacts (Standalone, VST plugin, VST scanner) will be generated.

fab672000 commented 5 years ago

Thanks @elieserdejesus Yes I do have a static build as I applied the readme.md and it was working before i tried 5.6.3 :) Thanks also for mentioning that static builds are sometimes failing depending on the version, it seems that 5.5.1 was blocking me on Windows so maybe 5.5.0 did not have this problem. I'll try other versions that work for me.