Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
21 
22 #include <memory>
23 
25 #include "pbd/pthread_utils.h"
26 
27 namespace ARDOUR
28 {
29 class AudioFileSource;
30 class Source;
31 
33 {
34 public:
36 
37  static void init ();
38  static void terminate ();
39  static void queue_source_for_analysis (std::shared_ptr<Source>, bool force);
40  static void work ();
41  static void flush ();
42 
43 private:
44  static Glib::Threads::Mutex analysis_active_lock;
45  static Glib::Threads::Mutex analysis_queue_lock;
46  static Glib::Threads::Cond SourcesToAnalyse;
47  static std::list<std::weak_ptr<Source>> analysis_queue;
48  static bool analysis_thread_run;
50 
51  static void analyse_audio_file_source (std::shared_ptr<AudioFileSource>);
52 };
53 
54 } // namespace ARDOUR
55 
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