From 33e859041b22705f6dcf91e37172eaf96f049236 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 24 Mar 2019 21:46:12 +1000
Subject: Fix build for Haiku


diff --git a/kwave/CMakeLists.txt b/kwave/CMakeLists.txt
index 6e2fef8..cf0437e 100644
--- a/kwave/CMakeLists.txt
+++ b/kwave/CMakeLists.txt
@@ -95,7 +95,6 @@ TARGET_LINK_LIBRARIES(kwave_core
     KF5::Completion
     KF5::ConfigCore
     KF5::Crash
-    KF5::DBusAddons
     KF5::I18n
     KF5::IconThemes
     KF5::KIOFileWidgets
diff --git a/kwave/TopWidget.cpp b/kwave/TopWidget.cpp
index fb36d63..421f7c9 100644
--- a/kwave/TopWidget.cpp
+++ b/kwave/TopWidget.cpp
@@ -1044,6 +1044,7 @@ int Kwave::TopWidget::loadFile(const QUrl &url)
     } else {
 	qWarning("TopWidget::loadFile() failed: result=%d", res);
 	QString reason;
+#ifndef Q_OS_HAIKU
 	switch (res) {
 	    case -ENOMEM:
 		reason = i18n("Out of memory");
@@ -1060,7 +1061,7 @@ int Kwave::TopWidget::loadFile(const QUrl &url)
 	    default:
 		reason = _("");
 	}
-
+#endif
 	// show an error message box if the reason was known
 	if (reason.length()) {
 	    Kwave::MessageBox::error(this, reason);
diff --git a/kwave/main.cpp b/kwave/main.cpp
index 84d7da0..85c64d5 100644
--- a/kwave/main.cpp
+++ b/kwave/main.cpp
@@ -26,7 +26,9 @@
 #include <KAboutData>
 #include <KCrash>
 #include <kcrash_version.h>
+#ifndef Q_OS_HAIKU
 #include <KDBusService>
+#endif
 #include <KLocalizedString>
 #include <kxmlgui_version.h>
 
@@ -231,10 +233,10 @@ int main(int argc, char **argv)
     cmdline.process(app);
     about.setupCommandLine(&cmdline);
     about.processCommandLine(&cmdline);
-
+#ifndef Q_OS_HAIKU
     /* let Kwave be a "unique" application, only one instance */
     KDBusService service(KDBusService::Unique);
-
+#endif
      /* check for an optimized version of memcpy() */
 #ifdef WITH_OPTIMIZED_MEMCPY
     probe_fast_memcpy();
@@ -250,14 +252,14 @@ int main(int argc, char **argv)
 
     // now as the splash screen is in place, we can start a new instance
     retval = app.newInstance(app.arguments(), QString());
-
+#ifndef Q_OS_HAIKU
     QObject::connect(
 	&service,
 	SIGNAL(activateRequested(QStringList,QString)),
 	&app,
 	SLOT(newInstance(QStringList,QString))
     );
-
+#endif
     if (retval != ECANCELED)
 	retval = app.exec();
 
-- 
2.19.1


From 9cebbcafbc1e367919091da6e337cd66921670e1 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 31 Mar 2019 15:27:01 +1000
Subject: Increase sound buffer


diff --git a/libkwave/PlayBackParam.h b/libkwave/PlayBackParam.h
index dc3c3ef..15e3603 100644
--- a/libkwave/PlayBackParam.h
+++ b/libkwave/PlayBackParam.h
@@ -54,7 +54,7 @@ namespace Kwave
 	/** Default constructor */
 	PlayBackParam()
 	    :rate(44100), channels(2), bits_per_sample(16),
-	    device(), bufbase(10),
+	    device(), bufbase(13),
 	    method(Kwave::PLAYBACK_NONE)
 	{
 	}
-- 
2.19.1

