-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #22382 Part 2: Add new preference to play notes on muted tracks when editing #25683
Fix #22382 Part 2: Add new preference to play notes on muted tracks when editing #25683
Conversation
0157868
to
e5748bc
Compare
About the macOS build error: it looks like the problem is that somehow Slight complication: because of unity builds, it is also possible that |
f58a5b8
to
fd0a14c
Compare
Qt Creator didn't seem to work for me. I chose a different path with cygwin and g++:
The problem has been caused by the inclusion of "iplaybackcontroller.h" within mixerchannel.h
I have included "iplaybackcontroller.h" within mixerchannel.h to use PlaybackController::isPlaying() method to determine if mixer options should be ignored. (Edited)
This may cause some future problems if you change "#ifndef MUSE_DRAW_GEOMETRY_H" clauses to "#pragma once"at the beginning of the include files
Would you please recommend me which one can I use of if you have a better proposal ? Thanks. |
I have downloaded MacTypes from https://github.com/phracker/MacOSX-SDKs/blob/master/MacOSX10.6.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/MacTypes.h and I'm trying to figure out a way to deal with it. |
… tracks in the mixer when editing
fd0a14c
to
f86b12a
Compare
I finally figured out where the problem was. "using namespaces" clauses should be after includes . Therefore, I changed the following lines after all the includes section within audiomodule.cpp:
I've been looking at it looks like it might be good practice to #include lines before namespace definitions. You might get unexpected results by doing the opposite |
Oh, yes, includes should certainly almost always come before anything else. Good find! |
bool MixerChannel::playNotesOnMutedTracksWhenEditing() const | ||
{ | ||
// We are not muted if we are Editing and we want to play notes even if mixer sound is off | ||
return !playbackController()->isPlaying() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this is incorrect for many reasons:
- this creates bad (circular) dependencies between the audio and playback modules. The audio module must not know anything about the playback module, as the latter is a higher-level one
- this code is thread-unsafe
- constantly accessing these settings may cause performance degradation
I'm going to close this PR as the feature itself is rather niche. And we can't sacrifice audio performance/stability because of it. Also, it should be taken by the in-house team as the entry-level for the audio engine is very high |
Resolves: #22382 Part 2
This pull request implement the second (and last) part of the functionality as described in "2. Add a new preference to control whether, when the above preference is ON, you hear notes added/clicked/selected on instruments that are muted in the mixer." section