First Commit

This commit is contained in:
2025-02-06 22:24:29 +08:00
parent ed7df4c81e
commit 7539e6a53c
18116 changed files with 6181499 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
project(alsoft-config)
if(Qt5Widgets_FOUND)
qt5_wrap_ui(UIS mainwindow.ui)
qt5_wrap_cpp(MOCS mainwindow.h)
add_executable(alsoft-config
main.cpp
mainwindow.cpp
mainwindow.h
verstr.cpp
verstr.h
${UIS} ${RSCS} ${TRS} ${MOCS})
target_link_libraries(alsoft-config Qt5::Widgets)
target_include_directories(alsoft-config PRIVATE "${alsoft-config_BINARY_DIR}"
"${OpenAL_BINARY_DIR}")
set_target_properties(alsoft-config PROPERTIES ${DEFAULT_TARGET_PROPS}
RUNTIME_OUTPUT_DIRECTORY ${OpenAL_BINARY_DIR})
if(TARGET build_version)
add_dependencies(alsoft-config build_version)
endif()
message(STATUS "Building configuration program")
if(ALSOFT_INSTALL_UTILS)
install(TARGETS alsoft-config
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endif()

View File

@@ -0,0 +1,11 @@
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,86 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QListWidget>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void cancelCloseAction();
void saveCurrentConfig();
void saveConfigAsFile();
void loadConfigFromFile();
void showAboutPage();
void enableApplyButton();
void updateResamplerLabel(int num);
void updatePeriodSizeEdit(int size);
void updatePeriodSizeSlider();
void updatePeriodCountEdit(int size);
void updatePeriodCountSlider();
void selectQuadDecoderFile();
void select51DecoderFile();
void select61DecoderFile();
void select71DecoderFile();
void select3D71DecoderFile();
void updateJackBufferSizeEdit(int size);
void updateJackBufferSizeSlider();
void updateHrtfModeLabel(int num);
void addHrtfFile();
void removeHrtfFile();
void updateHrtfRemoveButton();
void showEnabledBackendMenu(QPoint pt);
void showDisabledBackendMenu(QPoint pt);
void selectOSSPlayback();
void selectOSSCapture();
void selectSolarisPlayback();
void selectWaveOutput();
private:
Ui::MainWindow *ui;
QValidator *mPeriodSizeValidator;
QValidator *mPeriodCountValidator;
QValidator *mSourceCountValidator;
QValidator *mEffectSlotValidator;
QValidator *mSourceSendValidator;
QValidator *mSampleRateValidator;
QValidator *mJackBufferValidator;
bool mNeedsSave;
void closeEvent(QCloseEvent *event);
void selectDecoderFile(QLineEdit *line, const char *name);
QStringList collectHrtfs();
void loadConfig(const QString &fname);
void saveConfig(const QString &fname) const;
};
#endif // MAINWINDOW_H

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
#include "verstr.h"
#include "version.h"
QString GetVersionString()
{
return QStringLiteral(ALSOFT_VERSION "-" ALSOFT_GIT_COMMIT_HASH " (" ALSOFT_GIT_BRANCH " branch).");
}

View File

@@ -0,0 +1,8 @@
#ifndef VERSTR_H
#define VERSTR_H
#include <QString>
QString GetVersionString();
#endif /* VERSTR_H */