mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +01:00
allow to switch from/to dummy-backend
partos of this may become unnecessary once libardour handles backend changes properly^Wdifferently.
This commit is contained in:
parent
2b9fa31241
commit
c022f32bcd
1 changed files with 5 additions and 4 deletions
|
|
@ -317,6 +317,7 @@ DummyAudioBackend::_start (bool /*for_latency_measurement*/)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
engine.buffer_size_change (_samples_per_period);
|
||||||
engine.reconnect_ports ();
|
engine.reconnect_ports ();
|
||||||
|
|
||||||
if (pthread_create (&_main_thread, NULL, pthread_process, this)) {
|
if (pthread_create (&_main_thread, NULL, pthread_process, this)) {
|
||||||
|
|
@ -339,7 +340,7 @@ DummyAudioBackend::stop ()
|
||||||
{
|
{
|
||||||
void *status;
|
void *status;
|
||||||
if (!_running) {
|
if (!_running) {
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_running = false;
|
_running = false;
|
||||||
|
|
@ -844,14 +845,14 @@ DummyAudioBackend::midi_event_put (
|
||||||
uint32_t
|
uint32_t
|
||||||
DummyAudioBackend::get_midi_event_count (void* port_buffer)
|
DummyAudioBackend::get_midi_event_count (void* port_buffer)
|
||||||
{
|
{
|
||||||
assert (port_buffer && _running);
|
assert (port_buffer);
|
||||||
return static_cast<DummyMidiBuffer*>(port_buffer)->size ();
|
return static_cast<DummyMidiBuffer*>(port_buffer)->size ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DummyAudioBackend::midi_clear (void* port_buffer)
|
DummyAudioBackend::midi_clear (void* port_buffer)
|
||||||
{
|
{
|
||||||
assert (port_buffer && _running);
|
assert (port_buffer);
|
||||||
DummyMidiBuffer * buf = static_cast<DummyMidiBuffer*>(port_buffer);
|
DummyMidiBuffer * buf = static_cast<DummyMidiBuffer*>(port_buffer);
|
||||||
assert (buf);
|
assert (buf);
|
||||||
buf->clear ();
|
buf->clear ();
|
||||||
|
|
@ -988,7 +989,7 @@ DummyAudioBackend::n_physical_inputs () const
|
||||||
void*
|
void*
|
||||||
DummyAudioBackend::get_buffer (PortEngine::PortHandle port, pframes_t nframes)
|
DummyAudioBackend::get_buffer (PortEngine::PortHandle port, pframes_t nframes)
|
||||||
{
|
{
|
||||||
assert (port && _running);
|
assert (port);
|
||||||
assert (valid_port (port));
|
assert (valid_port (port));
|
||||||
return static_cast<DummyPort*>(port)->get_buffer (nframes);
|
return static_cast<DummyPort*>(port)->get_buffer (nframes);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue