annotate audioio/AudioTargetFactory.h @ 154:386b02c926bf

* Merge from one-fftdataserver-per-fftmodel branch. This bit of reworking (which is not described very accurately by the title of the branch) turns the MatrixFile object into something that either reads or writes, but not both, and separates the FFT file cache reader and writer implementations separately. This allows the FFT data server to have a single thread owning writers and one reader per "customer" thread, and for all locking to be vastly simplified and concentrated in the data server alone (because none of the classes it makes use of is used in more than one thread at a time). The result is faster and more trustworthy code.
author Chris Cannam
date Tue, 27 Jan 2009 13:25:10 +0000
parents d615d0220828
children 67cea66bd588
rev   line source
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