Ardour  8.12
ardour/ardour/analyser.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2009 David Robillard <d@drobilla.net>
3  * Copyright (C) 2008-2015 Paul Davis <paul@linuxaudiosystems.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef __ardour_analyser_h__
21 #define __ardour_analyser_h__
22 
23 #include <memory>
24 
26 #include "pbd/pthread_utils.h"
27 
28 namespace ARDOUR
29 {
30 class AudioFileSource;
31 class Source;
32 
34 {
35 public:
37 
38  static void init ();
39  static void terminate ();
40  static void queue_source_for_analysis (std::shared_ptr<Source>, bool force);
41  static void work ();
42  static void flush ();
43 
44 private:
45  static Glib::Threads::Mutex analysis_active_lock;
46  static Glib::Threads::Mutex analysis_queue_lock;
47  static Glib::Threads::Cond SourcesToAnalyse;
48  static std::list<std::weak_ptr<Source>> analysis_queue;
49  static bool analysis_thread_run;
51 
52  static void analyse_audio_file_source (std::shared_ptr<AudioFileSource>);
53 };
54 
55 } // namespace ARDOUR
56 
57 #endif /* __ardour_analyser_h__ */
static void terminate()
static Glib::Threads::Mutex analysis_queue_lock
static PBD::Thread * analysis_thread
static bool analysis_thread_run
static void analyse_audio_file_source(std::shared_ptr< AudioFileSource >)
static Glib::Threads::Cond SourcesToAnalyse
static void flush()
static Glib::Threads::Mutex analysis_active_lock
static std::list< std::weak_ptr< Source > > analysis_queue
static void init()
static void work()
static void queue_source_for_analysis(std::shared_ptr< Source >, bool force)
#define LIBARDOUR_API