summaryrefslogtreecommitdiffstats
path: root/khotkeys/arts/voicerecorder_arts.cpp
blob: 8b5c752adab39ac1f4ec74030dede021ac08ccca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/****************************************************************************

 KHotKeys
 
 Copyright (C) 2005 Olivier Goffgart <ogoffart @ kde.org>

 Distributed under the terms of the GNU General Public License version 2.
 
****************************************************************************/

#include <tqcolor.h>
#include <tqevent.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 TQString& 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