2 Copyright (C) 2014 Waves Audio Ltd.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include "waves_dataport.h"
21 #include "waves_audiobackend.h"
23 using namespace ARDOUR;
27 WavesAudioBackend::set_systemic_input_latency (uint32_t systemic_input_latency)
29 // COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_systemic_input_latency (): " << systemic_input_latency << std::endl;
31 _systemic_input_latency = systemic_input_latency;
37 WavesAudioBackend::set_systemic_output_latency (uint32_t systemic_output_latency)
39 // COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::set_systemic_output_latency (): " << systemic_output_latency << std::endl;
41 _systemic_output_latency = systemic_output_latency;
46 WavesAudioBackend::systemic_input_latency () const
48 // COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::systemic_input_latency ()" << std::endl;
50 return _systemic_input_latency;
55 WavesAudioBackend::systemic_output_latency () const
57 // COMMENTED DBG LOGS */ std::cout << "WavesAudioBackend::systemic_output_latency ()" << std::endl;
59 return _systemic_output_latency;
64 WavesAudioBackend::update_latencies ()
66 // COMMENTED DBG LOGS */ std::cout << "update_latencies:" << std::endl;
71 WavesAudioBackend::set_latency_range (PortHandle port_handle, bool for_playback, LatencyRange latency_range)
73 if (!_registered (port_handle)) {
74 std::cerr << "WavesAudioBackend::set_latency_range (): Failed to find port [" << std::hex << port_handle << std::dec << "]!" << std::endl;
77 ((WavesDataPort*)port_handle)->set_latency_range (latency_range, for_playback);
82 WavesAudioBackend::get_latency_range (PortHandle port_handle, bool for_playback)
84 if (!_registered (port_handle)) {
85 std::cerr << "WavesAudioBackend::get_latency_range (): Failed to find port [" << std::hex << port_handle << std::dec << "]!" << std::endl;
86 LatencyRange lr = {0,0};
89 return ((WavesDataPort*)port_handle)->latency_range (for_playback);