Skip to content

Commit

Permalink
Merge branch 'mixxxdj:main' into hercules-inpulse300-mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvankodev committed Aug 28, 2021
2 parents ac878f9 + 49f9169 commit 7a0be04
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
9 changes: 9 additions & 0 deletions cmake/modules/FindPortAudio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ find_path(PortAudio_INCLUDE_DIR
DOC "PortAudio include directory")
mark_as_advanced(PortAudio_INCLUDE_DIR)

# Temporary hack until https://github.com/PortAudio/portaudio/pull/635 is released.
find_path(PortAudio_ALSA_H
NAMES pa_linux_alsa.h
PATHS ${PC_PortAudio_INCLUDE_DIRS})
mark_as_advanced(PortAudio_ALSA_H)

find_library(PortAudio_LIBRARY
NAMES portaudio
PATHS ${PC_PortAudio_LIBRARY_DIRS}
Expand All @@ -78,5 +84,8 @@ if(PortAudio_FOUND)
INTERFACE_COMPILE_OPTIONS "${PC_PortAudio_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${PortAudio_INCLUDE_DIR}"
)
if(PortAudio_ALSA_H)
target_compile_definitions(PortAudio::PortAudio INTERFACE PA_USE_ALSA)
endif()
endif()
endif()
10 changes: 5 additions & 5 deletions src/controllers/dlgprefcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,14 +461,14 @@ MappingInfo DlgPrefController::enumerateMappingsFromEnumerator(
}

void DlgPrefController::slotUpdate() {
// Check if the controller is open.
bool deviceOpen = m_pController->isOpen();
// Check/uncheck the "Enabled" box
m_ui.chkEnabledDevice->setChecked(deviceOpen);

enumerateMappings(m_pControllerManager->getConfiguredMappingFileForDevice(
m_pController->getName()));

// enumeratePresets will check the m_ui.chkEnabledDevice checkbox if
// there is a valid mapping saved in the mixxx.cfg file. However, the
// checkbox should only be checked if the device is currently enabled.
m_ui.chkEnabledDevice->setChecked(m_pController->isOpen());

// If the controller is not mappable, disable the input and output mapping
// sections and the learning wizard button.
bool isMappable = m_pController->isMappable();
Expand Down
10 changes: 8 additions & 2 deletions src/mixxxmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,8 +1040,13 @@ bool MixxxMainWindow::loadConfiguredSkin() {

bool MixxxMainWindow::eventFilter(QObject* obj, QEvent* event) {
if (event->type() == QEvent::ToolTip) {
// return true for no tool tips
switch (m_toolTipsCfg) {
// always show tooltips in the preferences window
QWidget* activeWindow = QApplication::activeWindow();
if (activeWindow &&
QLatin1String(activeWindow->metaObject()->className()) !=
"DlgPreferences") {
// return true for no tool tips
switch (m_toolTipsCfg) {
case mixxx::TooltipsPreference::TOOLTIPS_ONLY_IN_LIBRARY:
if (dynamic_cast<WBaseWidget*>(obj) != nullptr) {
return true;
Expand All @@ -1054,6 +1059,7 @@ bool MixxxMainWindow::eventFilter(QObject* obj, QEvent* event) {
default:
DEBUG_ASSERT(!"m_toolTipsCfg value unknown");
return true;
}
}
}
// standard event processing
Expand Down
5 changes: 2 additions & 3 deletions src/soundio/sounddeviceportaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "vinylcontrol/defs_vinylcontrol.h"
#include "waveform/visualplayposition.h"

#ifdef __LINUX__
#ifdef PA_USE_ALSA
// for PaAlsa_EnableRealtimeScheduling
#include <pa_linux_alsa.h>
#endif
Expand Down Expand Up @@ -333,8 +333,7 @@ SoundDeviceError SoundDevicePortAudio::open(bool isClkRefDevice, int syncBuffers
qDebug() << "Opened PortAudio stream successfully... starting";
}


#ifdef __LINUX__
#ifdef PA_USE_ALSA
if (m_deviceTypeId == paALSA) {
qInfo() << "Enabling ALSA real-time scheduling";
PaAlsa_EnableRealtimeScheduling(pStream, 1);
Expand Down
3 changes: 2 additions & 1 deletion tools/windows_buildenv.bat
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ EXIT /B 0
SET BUILDENV_URL=https://downloads.mixxx.org/dependencies/2.3/Windows/!BUILDENV_NAME!.zip
IF NOT EXIST !BUILDENV_PATH!.zip (
ECHO ^Download prebuilt build environment from "!BUILDENV_URL!" to "!BUILDENV_PATH!.zip"...
BITSADMIN /transfer buildenvjob /download /priority normal !BUILDENV_URL! !BUILDENV_PATH!.zip
REM TODO: The /DYNAMIC parameter is required because our server does not yet support HTTP range headers
BITSADMIN /transfer buildenvjob /download /priority normal /DYNAMIC !BUILDENV_URL! !BUILDENV_PATH!.zip
REM TODO: verify download using sha256sum?
ECHO ^Download complete.
) else (
Expand Down

0 comments on commit 7a0be04

Please sign in to comment.