summaryrefslogtreecommitdiffstats
path: root/khotkeys/arts/voicerecorder_arts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'khotkeys/arts/voicerecorder_arts.cpp')
-rw-r--r--khotkeys/arts/voicerecorder_arts.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/khotkeys/arts/voicerecorder_arts.cpp b/khotkeys/arts/voicerecorder_arts.cpp
new file mode 100644
index 000000000..39cd38cfa
--- /dev/null
+++ b/khotkeys/arts/voicerecorder_arts.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+
+ KHotKeys
+
+ Copyright (C) 2005 Olivier Goffgart <ogoffart @ kde.org>
+
+ Distributed under the terms of the GNU General Public License version 2.
+
+****************************************************************************/
+
+#include <qcolor.h>
+#include <qevent.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "voicerecorder.h"
+
+#ifdef HAVE_ARTS
+
+#include <arts/kplayobject.h>
+#include <arts/kartsserver.h>
+#include <arts/kartsdispatcher.h>
+#include <arts/kplayobjectfactory.h>
+
+extern "C"
+KDE_EXPORT
+void khotkeys_voicerecorder_arts_play( const QString& file )
+{
+ KHotKeys::VoiceRecorder::arts_play_fun check = khotkeys_voicerecorder_arts_play; // check the type matches
+ ( void ) check;
+ KArtsDispatcher dispatcher;
+ KArtsServer server;
+ KDE::PlayObjectFactory factory( server.server() );
+ KDE::PlayObject* playobj = factory.createPlayObject( file, true );
+ playobj->play();
+}
+
+#endif