Chris@43
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@43
|
2
|
Chris@43
|
3 /*
|
Chris@43
|
4 Sonic Visualiser
|
Chris@43
|
5 An audio file viewer and annotation editor.
|
Chris@43
|
6 Centre for Digital Music, Queen Mary, University of London.
|
Chris@43
|
7 This file copyright 2006 Chris Cannam.
|
Chris@43
|
8
|
Chris@43
|
9 This program is free software; you can redistribute it and/or
|
Chris@43
|
10 modify it under the terms of the GNU General Public License as
|
Chris@43
|
11 published by the Free Software Foundation; either version 2 of the
|
Chris@43
|
12 License, or (at your option) any later version. See the file
|
Chris@43
|
13 COPYING included with this distribution for more information.
|
Chris@43
|
14 */
|
Chris@43
|
15
|
Chris@43
|
16 #ifndef _AUDIO_TARGET_FACTORY_H_
|
Chris@43
|
17 #define _AUDIO_TARGET_FACTORY_H_
|
Chris@43
|
18
|
Chris@126
|
19 #include <vector>
|
Chris@126
|
20 #include <QString>
|
Chris@126
|
21
|
Chris@43
|
22 class AudioCallbackPlaySource;
|
Chris@43
|
23 class AudioCallbackPlayTarget;
|
Chris@43
|
24
|
Chris@43
|
25 class AudioTargetFactory
|
Chris@43
|
26 {
|
Chris@43
|
27 public:
|
Chris@126
|
28 static AudioTargetFactory *getInstance();
|
Chris@126
|
29
|
Chris@126
|
30 std::vector<QString> getCallbackTargetNames(bool includeAuto = true) const;
|
Chris@126
|
31 QString getCallbackTargetDescription(QString name) const;
|
Chris@126
|
32 QString getDefaultCallbackTarget() const;
|
Chris@126
|
33 bool isAutoCallbackTarget(QString name) const;
|
Chris@126
|
34 void setDefaultCallbackTarget(QString name);
|
Chris@126
|
35
|
Chris@126
|
36 AudioCallbackPlayTarget *createCallbackTarget(AudioCallbackPlaySource *);
|
Chris@126
|
37
|
Chris@126
|
38 protected:
|
Chris@126
|
39 AudioTargetFactory();
|
Chris@126
|
40 static AudioTargetFactory *m_instance;
|
Chris@126
|
41 QString m_default;
|
Chris@43
|
42 };
|
Chris@43
|
43
|
Chris@43
|
44 #endif
|
Chris@43
|
45
|