diff --git a/gui/win_preferences.ui b/gui/win_preferences.ui
index fb37b03..8c84a4a 100644
--- a/gui/win_preferences.ui
+++ b/gui/win_preferences.ui
@@ -10,7 +10,7 @@
0
0
379
- 366
+ 399
@@ -63,38 +63,6 @@
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 8
- 20
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 12
- 20
-
-
-
-
-
@@ -201,7 +169,7 @@ Please be aware that this option does NOT have any effect on 32-Bit systems.
- -
+
-
Qt::Vertical
@@ -379,6 +347,68 @@ Please be aware that this option does NOT have any effect on 32-Bit systems.
+ -
+
+
+
+
+
+
+ -
+
+
+ Enable sound effects when a job has completed or failed
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 8
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 8
+ 20
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 12
+ 20
+
+
+
+
diff --git a/res/sounds/failure.wav b/res/sounds/failure.wav
new file mode 100644
index 0000000..602944d
Binary files /dev/null and b/res/sounds/failure.wav differ
diff --git a/res/sounds/shattering.wav b/res/sounds/shattering.wav
new file mode 100644
index 0000000..fe74919
Binary files /dev/null and b/res/sounds/shattering.wav differ
diff --git a/res/sounds/tada.wav b/res/sounds/tada.wav
new file mode 100644
index 0000000..3bb129b
Binary files /dev/null and b/res/sounds/tada.wav differ
diff --git a/src/global.cpp b/src/global.cpp
index 9a80922..523b565 100644
--- a/src/global.cpp
+++ b/src/global.cpp
@@ -114,8 +114,10 @@ g_x264_version =
static const char *g_x264_version_compiler = "MSVC 2012-U1 CTP";
#elif (_MSC_FULL_VER < 170060315)
static const char *g_x264_version_compiler = "MSVC 2012-U1";
- #elif (_MSC_FULL_VER == 170060315)
+ #elif (_MSC_FULL_VER < 170060610)
static const char *g_x264_version_compiler = "MSVC 2012-U2";
+ #elif (_MSC_FULL_VER == 170060610)
+ static const char *g_x264_version_compiler = "MSVC 2012-U3";
#else
#error Compiler version is not supported yet!
#endif
diff --git a/src/model_jobList.cpp b/src/model_jobList.cpp
index 5b0a19e..40f9129 100644
--- a/src/model_jobList.cpp
+++ b/src/model_jobList.cpp
@@ -19,16 +19,20 @@
// http://www.gnu.org/licenses/gpl-2.0.txt
///////////////////////////////////////////////////////////////////////////////
-#include "model_jobList.h"
#include "global.h"
+#include "model_jobList.h"
#include "thread_encode.h"
#include "model_options.h"
+#include "resource.h"
#include
#include
-JobListModel::JobListModel(void)
+#include
+
+JobListModel::JobListModel(PreferencesDialog::Preferences *preferences)
{
+ m_preferences = preferences;
}
JobListModel::~JobListModel(void)
@@ -482,6 +486,22 @@ void JobListModel::updateStatus(const QUuid &jobId, EncodeThread::JobStatus newS
{
m_status.insert(jobId, newStatus);
emit dataChanged(createIndex(index, 0), createIndex(index, 1));
+
+ if(m_preferences->enableSounds)
+ {
+ switch(newStatus)
+ {
+ case EncodeThread::JobStatus_Completed:
+ PlaySound(MAKEINTRESOURCE(IDR_WAVE4), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
+ break;
+ case EncodeThread::JobStatus_Aborted:
+ PlaySound(MAKEINTRESOURCE(IDR_WAVE5), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
+ break;
+ case EncodeThread::JobStatus_Failed:
+ PlaySound(MAKEINTRESOURCE(IDR_WAVE6), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
+ break;
+ }
+ }
}
}
diff --git a/src/model_jobList.h b/src/model_jobList.h
index 145b2cb..4791b7c 100644
--- a/src/model_jobList.h
+++ b/src/model_jobList.h
@@ -23,6 +23,7 @@
#include "thread_encode.h"
#include "model_logFile.h"
+#include "win_preferences.h"
#include "QAbstractItemModel"
#include
@@ -34,7 +35,7 @@ class JobListModel : public QAbstractItemModel
Q_OBJECT
public:
- JobListModel(void);
+ JobListModel(PreferencesDialog::Preferences *preferences);
~JobListModel(void);
virtual int columnCount(const QModelIndex &parent) const;
@@ -66,6 +67,7 @@ protected:
QMap m_progress;
QMap m_logFile;
QMap m_details;
+ PreferencesDialog::Preferences *m_preferences;
public slots:
void updateStatus(const QUuid &jobId, EncodeThread::JobStatus newStatus);
diff --git a/src/resource.h b/src/resource.h
index 50c0694..7dac95c 100644
Binary files a/src/resource.h and b/src/resource.h differ
diff --git a/src/version.h b/src/version.h
index 416354d..bcab9dc 100644
--- a/src/version.h
+++ b/src/version.h
@@ -21,8 +21,8 @@
#define VER_X264_MAJOR 2
#define VER_X264_MINOR 1
-#define VER_X264_PATCH 4
-#define VER_X264_BUILD 475
+#define VER_X264_PATCH 5
+#define VER_X264_BUILD 480
#define VER_X264_MINIMUM_REV 2282
#define VER_X264_CURRENT_API 133
diff --git a/src/win_main.cpp b/src/win_main.cpp
index 12fa846..05b4958 100644
--- a/src/win_main.cpp
+++ b/src/win_main.cpp
@@ -113,7 +113,7 @@ MainWindow::MainWindow(const x264_cpu_t *const cpuFeatures)
}
//Create model
- m_jobList = new JobListModel();
+ m_jobList = new JobListModel(&m_preferences);
connect(m_jobList, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(jobChangedData(QModelIndex, QModelIndex)));
jobsView->setModel(m_jobList);
diff --git a/src/win_preferences.cpp b/src/win_preferences.cpp
index 68e5ada..c5912d3 100644
--- a/src/win_preferences.cpp
+++ b/src/win_preferences.cpp
@@ -49,6 +49,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, Preferences *preferences,
labelShutdownComputer->installEventFilter(this);
labelSaveLogFiles->installEventFilter(this);
labelSaveToSourceFolder->installEventFilter(this);
+ labelEnableSounds->installEventFilter(this);
connect(resetButton, SIGNAL(clicked()), this, SLOT(resetButtonPressed()));
connect(checkUse10BitEncoding, SIGNAL(toggled(bool)), this, SLOT(use10BitEncodingToggled(bool)));
@@ -69,6 +70,7 @@ void PreferencesDialog::showEvent(QShowEvent *event)
UPDATE_CHECKBOX(checkUse64BitAvs2YUV, m_preferences->useAvisyth64Bit);
UPDATE_CHECKBOX(checkSaveLogFiles, m_preferences->saveLogFiles);
UPDATE_CHECKBOX(checkSaveToSourceFolder, m_preferences->saveToSourcePath);
+ UPDATE_CHECKBOX(checkEnableSounds, m_preferences->enableSounds);
checkUse10BitEncoding->blockSignals(true);
UPDATE_CHECKBOX(checkUse10BitEncoding, m_preferences->use10BitEncoding);
@@ -89,6 +91,7 @@ bool PreferencesDialog::eventFilter(QObject *o, QEvent *e)
emulateMouseEvent(o, e, labelUse64BitAvs2YUV, checkUse64BitAvs2YUV);
emulateMouseEvent(o, e, labelSaveLogFiles, checkSaveLogFiles);
emulateMouseEvent(o, e, labelSaveToSourceFolder, checkSaveToSourceFolder);
+ emulateMouseEvent(o, e, labelEnableSounds, checkEnableSounds);
return false;
}
@@ -122,6 +125,7 @@ void PreferencesDialog::done(int n)
m_preferences->saveToSourcePath = checkSaveToSourceFolder->isChecked();
m_preferences->maxRunningJobCount = spinBoxJobCount->value();
m_preferences->processPriority = comboBoxPriority->currentIndex();
+ m_preferences->enableSounds = checkEnableSounds->isChecked();
savePreferences(m_preferences);
QDialog::done(n);
@@ -165,6 +169,7 @@ void PreferencesDialog::initPreferences(Preferences *preferences)
preferences->saveLogFiles = false;
preferences->saveToSourcePath = false;
preferences->processPriority = X264_PRIORITY_BELOWNORMAL;
+ preferences->enableSounds = false;
}
void PreferencesDialog::loadPreferences(Preferences *preferences)
@@ -184,6 +189,7 @@ void PreferencesDialog::loadPreferences(Preferences *preferences)
preferences->saveLogFiles = settings.value("save_log_files", QVariant(defaults.saveLogFiles)).toBool();
preferences->saveToSourcePath = settings.value("save_to_source_path", QVariant(defaults.saveToSourcePath)).toBool();
preferences->processPriority = settings.value("process_priority", QVariant(defaults.processPriority)).toUInt();
+ preferences->enableSounds = settings.value("enable_sounds", QVariant(defaults.enableSounds)).toBool();
}
void PreferencesDialog::savePreferences(Preferences *preferences)
@@ -200,5 +206,6 @@ void PreferencesDialog::savePreferences(Preferences *preferences)
settings.setValue("save_log_files", preferences->saveLogFiles);
settings.setValue("save_to_source_path", preferences->saveToSourcePath);
settings.setValue("process_priority", preferences->processPriority);
+ settings.setValue("enable_sounds", preferences->enableSounds);
settings.sync();
}
diff --git a/src/win_preferences.h b/src/win_preferences.h
index e91339f..b8cec96 100644
--- a/src/win_preferences.h
+++ b/src/win_preferences.h
@@ -46,6 +46,7 @@ public:
bool saveLogFiles;
bool saveToSourcePath;
unsigned int processPriority;
+ bool enableSounds;
}
Preferences;
diff --git a/x264_launcher.rc b/x264_launcher.rc
index 32845db..6f0b613 100644
Binary files a/x264_launcher.rc and b/x264_launcher.rc differ