2014-01-27 08:20:25 +01:00
|
|
|
/*
|
2018-10-31 17:54:59 +01:00
|
|
|
* Copyright 2003-2018 The Music Player Daemon Project
|
2014-01-27 08:20:25 +01:00
|
|
|
* http://www.musicpd.org
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "MultipleOutputs.hxx"
|
2017-08-07 21:50:13 +02:00
|
|
|
#include "Filtered.hxx"
|
2018-08-19 07:43:47 +02:00
|
|
|
#include "Defaults.hxx"
|
2014-01-28 11:42:54 +01:00
|
|
|
#include "Domain.hxx"
|
2014-01-27 08:20:25 +01:00
|
|
|
#include "MusicPipe.hxx"
|
|
|
|
#include "MusicChunk.hxx"
|
2018-08-18 20:57:02 +02:00
|
|
|
#include "filter/Factory.hxx"
|
2015-01-21 22:13:44 +01:00
|
|
|
#include "config/Block.hxx"
|
2018-07-17 23:13:35 +02:00
|
|
|
#include "config/Data.hxx"
|
2018-07-16 19:50:07 +02:00
|
|
|
#include "config/Option.hxx"
|
2016-11-24 14:04:40 +01:00
|
|
|
#include "util/RuntimeError.hxx"
|
2014-01-27 08:20:25 +01:00
|
|
|
|
2016-10-28 21:11:52 +02:00
|
|
|
#include <stdexcept>
|
|
|
|
|
2014-01-27 08:20:25 +01:00
|
|
|
#include <assert.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::MultipleOutputs(MixerListener &_mixer_listener) noexcept
|
2016-04-21 13:27:45 +02:00
|
|
|
:mixer_listener(_mixer_listener)
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::~MultipleOutputs() noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2016-12-14 08:15:33 +01:00
|
|
|
/* parallel destruction */
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &i : outputs)
|
2016-12-14 08:15:33 +01:00
|
|
|
i->BeginDestroy();
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
2018-01-04 10:14:26 +01:00
|
|
|
static std::unique_ptr<FilteredAudioOutput>
|
2016-11-25 13:54:55 +01:00
|
|
|
LoadOutput(EventLoop &event_loop,
|
|
|
|
const ReplayGainConfig &replay_gain_config,
|
|
|
|
MixerListener &mixer_listener,
|
2018-08-18 20:57:02 +02:00
|
|
|
const ConfigBlock &block,
|
2018-08-19 07:43:47 +02:00
|
|
|
const AudioOutputDefaults &defaults,
|
2018-08-18 20:57:02 +02:00
|
|
|
FilterFactory *filter_factory)
|
2016-10-28 21:11:52 +02:00
|
|
|
try {
|
2016-11-25 13:54:55 +01:00
|
|
|
return audio_output_new(event_loop, replay_gain_config, block,
|
2018-08-19 07:43:47 +02:00
|
|
|
defaults,
|
2018-08-18 20:57:02 +02:00
|
|
|
filter_factory,
|
2017-05-23 00:31:13 +02:00
|
|
|
mixer_listener);
|
2017-12-19 10:56:23 +01:00
|
|
|
} catch (...) {
|
2016-10-28 21:11:52 +02:00
|
|
|
if (block.line > 0)
|
2016-11-24 14:04:40 +01:00
|
|
|
std::throw_with_nested(FormatRuntimeError("Failed to configure output in line %i",
|
|
|
|
block.line));
|
2016-10-28 21:11:52 +02:00
|
|
|
else
|
2016-11-24 14:04:40 +01:00
|
|
|
throw;
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
2019-04-26 14:28:59 +02:00
|
|
|
static std::unique_ptr<AudioOutputControl>
|
2017-05-22 23:35:32 +02:00
|
|
|
LoadOutputControl(EventLoop &event_loop,
|
|
|
|
const ReplayGainConfig &replay_gain_config,
|
|
|
|
MixerListener &mixer_listener,
|
2018-08-18 20:57:02 +02:00
|
|
|
AudioOutputClient &client, const ConfigBlock &block,
|
2018-08-19 07:43:47 +02:00
|
|
|
const AudioOutputDefaults &defaults,
|
2018-08-18 20:57:02 +02:00
|
|
|
FilterFactory *filter_factory)
|
2017-05-22 23:35:32 +02:00
|
|
|
{
|
2018-01-04 10:14:26 +01:00
|
|
|
auto output = LoadOutput(event_loop, replay_gain_config,
|
|
|
|
mixer_listener,
|
2018-08-19 07:43:47 +02:00
|
|
|
block, defaults, filter_factory);
|
2019-04-26 14:28:59 +02:00
|
|
|
auto control = std::make_unique<AudioOutputControl>(std::move(output), client);
|
|
|
|
control->Configure(block);
|
2017-05-22 23:36:45 +02:00
|
|
|
return control;
|
2017-05-22 23:35:32 +02:00
|
|
|
}
|
|
|
|
|
2014-01-27 08:20:25 +01:00
|
|
|
void
|
2016-11-25 13:54:55 +01:00
|
|
|
MultipleOutputs::Configure(EventLoop &event_loop,
|
2018-07-17 23:13:35 +02:00
|
|
|
const ConfigData &config,
|
2016-11-25 13:54:55 +01:00
|
|
|
const ReplayGainConfig &replay_gain_config,
|
2016-12-14 12:14:57 +01:00
|
|
|
AudioOutputClient &client)
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2018-08-19 07:43:47 +02:00
|
|
|
const AudioOutputDefaults defaults(config);
|
2018-08-18 20:57:02 +02:00
|
|
|
FilterFactory filter_factory(config);
|
|
|
|
|
2018-07-18 11:03:19 +02:00
|
|
|
for (const auto &block : config.GetBlockList(ConfigBlockOption::AUDIO_OUTPUT)) {
|
|
|
|
block.SetUsed();
|
2019-04-26 14:28:59 +02:00
|
|
|
auto output = LoadOutputControl(event_loop,
|
|
|
|
replay_gain_config,
|
|
|
|
mixer_listener,
|
|
|
|
client, block, defaults,
|
|
|
|
&filter_factory);
|
2016-12-29 23:23:28 +01:00
|
|
|
if (FindByName(output->GetName()) != nullptr)
|
2016-11-24 14:04:40 +01:00
|
|
|
throw FormatRuntimeError("output devices with identical "
|
2016-12-29 23:23:28 +01:00
|
|
|
"names: %s", output->GetName());
|
2014-01-27 08:20:25 +01:00
|
|
|
|
2019-04-26 14:28:59 +02:00
|
|
|
outputs.emplace_back(std::move(output));
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (outputs.empty()) {
|
|
|
|
/* auto-detect device */
|
2015-01-21 22:13:44 +01:00
|
|
|
const ConfigBlock empty;
|
2019-04-26 14:28:59 +02:00
|
|
|
outputs.emplace_back(LoadOutputControl(event_loop,
|
|
|
|
replay_gain_config,
|
|
|
|
mixer_listener,
|
|
|
|
client, empty, defaults,
|
|
|
|
nullptr));
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-17 23:53:44 +01:00
|
|
|
void
|
|
|
|
MultipleOutputs::AddNullOutput(EventLoop &event_loop,
|
|
|
|
const ReplayGainConfig &replay_gain_config,
|
|
|
|
AudioOutputClient &client)
|
|
|
|
{
|
2018-08-19 07:43:47 +02:00
|
|
|
const AudioOutputDefaults defaults;
|
|
|
|
|
2017-02-17 23:53:44 +01:00
|
|
|
ConfigBlock block;
|
|
|
|
block.AddBlockParam("type", "null");
|
|
|
|
|
2019-04-26 14:28:59 +02:00
|
|
|
outputs.emplace_back(LoadOutputControl(event_loop, replay_gain_config,
|
|
|
|
mixer_listener,
|
|
|
|
client, block, defaults,
|
|
|
|
nullptr));
|
2017-02-17 23:53:44 +01:00
|
|
|
}
|
|
|
|
|
2017-02-27 22:55:20 +01:00
|
|
|
AudioOutputControl *
|
2017-05-15 23:01:49 +02:00
|
|
|
MultipleOutputs::FindByName(const char *name) noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &i : outputs)
|
2016-12-29 23:23:28 +01:00
|
|
|
if (strcmp(i->GetName(), name) == 0)
|
2019-04-26 14:28:59 +02:00
|
|
|
return i.get();
|
2014-01-27 08:20:25 +01:00
|
|
|
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MultipleOutputs::EnableDisable()
|
|
|
|
{
|
2016-12-14 08:41:22 +01:00
|
|
|
/* parallel execution */
|
|
|
|
|
2019-04-26 18:28:09 +02:00
|
|
|
for (const auto &ao : outputs)
|
|
|
|
ao->LockEnableDisableAsync();
|
2016-12-14 08:41:22 +01:00
|
|
|
|
2018-06-23 19:23:56 +02:00
|
|
|
WaitAll();
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
2018-06-23 19:11:48 +02:00
|
|
|
void
|
|
|
|
MultipleOutputs::WaitAll() noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2019-04-26 18:25:36 +02:00
|
|
|
for (const auto &ao : outputs)
|
|
|
|
ao->LockWaitForCommand();
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::AllowPlay() noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs)
|
2014-01-28 11:39:12 +01:00
|
|
|
ao->LockAllowPlay();
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::Update(bool force) noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
|
|
|
bool ret = false;
|
|
|
|
|
|
|
|
if (!input_audio_format.IsDefined())
|
|
|
|
return false;
|
|
|
|
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs)
|
2016-12-29 23:20:26 +01:00
|
|
|
ret = ao->LockUpdate(input_audio_format, *pipe, force)
|
2014-01-27 08:20:25 +01:00
|
|
|
|| ret;
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::SetReplayGainMode(ReplayGainMode mode) noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs)
|
2014-01-28 11:39:12 +01:00
|
|
|
ao->SetReplayGainMode(mode);
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
2016-11-09 12:31:23 +01:00
|
|
|
void
|
2017-12-30 18:00:40 +01:00
|
|
|
MultipleOutputs::Play(MusicChunkPtr chunk)
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
|
|
|
assert(pipe != nullptr);
|
|
|
|
assert(chunk != nullptr);
|
|
|
|
assert(chunk->CheckFormat(input_audio_format));
|
|
|
|
|
2016-12-29 23:20:26 +01:00
|
|
|
if (!Update(false))
|
2014-01-27 08:20:25 +01:00
|
|
|
/* TODO: obtain real error */
|
2016-11-09 12:31:23 +01:00
|
|
|
throw std::runtime_error("Failed to open audio output");
|
2014-01-27 08:20:25 +01:00
|
|
|
|
2017-12-30 18:00:40 +01:00
|
|
|
pipe->Push(std::move(chunk));
|
2014-01-27 08:20:25 +01:00
|
|
|
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs)
|
2014-01-28 11:39:12 +01:00
|
|
|
ao->LockPlay();
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
2016-11-09 12:31:23 +01:00
|
|
|
void
|
2018-06-23 18:04:09 +02:00
|
|
|
MultipleOutputs::Open(const AudioFormat audio_format)
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
|
|
|
bool ret = false, enabled = false;
|
|
|
|
|
|
|
|
/* the audio format must be the same as existing chunks in the
|
|
|
|
pipe */
|
|
|
|
assert(pipe == nullptr || pipe->CheckFormat(audio_format));
|
|
|
|
|
|
|
|
if (pipe == nullptr)
|
2018-06-23 18:45:57 +02:00
|
|
|
pipe = std::make_unique<MusicPipe>();
|
2014-01-27 08:20:25 +01:00
|
|
|
else
|
|
|
|
/* if the pipe hasn't been cleared, the the audio
|
|
|
|
format must not have changed */
|
|
|
|
assert(pipe->IsEmpty() || audio_format == input_audio_format);
|
|
|
|
|
|
|
|
input_audio_format = audio_format;
|
|
|
|
|
|
|
|
EnableDisable();
|
2016-12-29 23:20:26 +01:00
|
|
|
Update(true);
|
2014-01-27 08:20:25 +01:00
|
|
|
|
2016-12-29 14:26:10 +01:00
|
|
|
std::exception_ptr first_error;
|
|
|
|
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs) {
|
2017-01-03 07:11:57 +01:00
|
|
|
const std::lock_guard<Mutex> lock(ao->mutex);
|
2016-12-29 23:24:49 +01:00
|
|
|
|
2016-12-29 23:23:28 +01:00
|
|
|
if (ao->IsEnabled())
|
2014-01-27 08:20:25 +01:00
|
|
|
enabled = true;
|
|
|
|
|
2016-12-29 23:23:28 +01:00
|
|
|
if (ao->IsOpen())
|
2014-01-27 08:20:25 +01:00
|
|
|
ret = true;
|
2016-12-29 23:23:28 +01:00
|
|
|
else if (!first_error)
|
|
|
|
first_error = ao->GetLastError();
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
2016-11-09 12:31:23 +01:00
|
|
|
if (!enabled) {
|
2014-01-27 08:20:25 +01:00
|
|
|
/* close all devices if there was an error */
|
|
|
|
Close();
|
2016-11-09 12:31:23 +01:00
|
|
|
throw std::runtime_error("All audio outputs are disabled");
|
|
|
|
} else if (!ret) {
|
|
|
|
/* close all devices if there was an error */
|
|
|
|
Close();
|
2016-12-29 14:26:10 +01:00
|
|
|
|
|
|
|
if (first_error)
|
|
|
|
/* we have details, so throw that */
|
|
|
|
std::rethrow_exception(first_error);
|
|
|
|
else
|
|
|
|
throw std::runtime_error("Failed to open audio output");
|
2016-11-09 12:31:23 +01:00
|
|
|
}
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2017-05-08 14:44:49 +02:00
|
|
|
MultipleOutputs::IsChunkConsumed(const MusicChunk *chunk) const noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs)
|
2016-12-11 21:59:28 +01:00
|
|
|
if (!ao->LockIsChunkConsumed(*chunk))
|
2014-01-27 08:20:25 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned
|
2017-12-29 16:23:19 +01:00
|
|
|
MultipleOutputs::CheckPipe() noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2014-08-12 15:56:41 +02:00
|
|
|
const MusicChunk *chunk;
|
2014-01-27 08:20:25 +01:00
|
|
|
|
|
|
|
assert(pipe != nullptr);
|
|
|
|
|
|
|
|
while ((chunk = pipe->Peek()) != nullptr) {
|
|
|
|
assert(!pipe->IsEmpty());
|
|
|
|
|
|
|
|
if (!IsChunkConsumed(chunk))
|
|
|
|
/* at least one output is not finished playing
|
|
|
|
this chunk */
|
|
|
|
return pipe->GetSize();
|
|
|
|
|
2014-08-29 13:15:33 +02:00
|
|
|
if (chunk->length > 0 && !chunk->time.IsNegative())
|
2014-01-27 08:20:25 +01:00
|
|
|
/* only update elapsed_time if the chunk
|
|
|
|
provides a defined value */
|
2014-08-29 13:15:33 +02:00
|
|
|
elapsed_time = chunk->time;
|
2014-01-27 08:20:25 +01:00
|
|
|
|
2019-04-26 18:13:02 +02:00
|
|
|
const bool is_tail = chunk->next == nullptr;
|
2014-01-27 08:20:25 +01:00
|
|
|
if (is_tail)
|
|
|
|
/* this is the tail of the pipe - clear the
|
|
|
|
chunk reference in all outputs */
|
2019-04-26 18:12:27 +02:00
|
|
|
for (const auto &ao : outputs)
|
|
|
|
ao->LockClearTailChunk(*chunk);
|
2014-01-27 08:20:25 +01:00
|
|
|
|
|
|
|
/* remove the chunk from the pipe */
|
2017-12-30 18:00:40 +01:00
|
|
|
const auto shifted = pipe->Shift();
|
|
|
|
assert(shifted.get() == chunk);
|
2014-01-27 08:20:25 +01:00
|
|
|
|
|
|
|
if (is_tail)
|
2019-04-26 18:12:27 +02:00
|
|
|
/* resume playback which has been suspended by
|
|
|
|
LockClearTailChunk() */
|
|
|
|
for (const auto &ao : outputs)
|
|
|
|
ao->LockAllowPlay();
|
2014-01-27 08:20:25 +01:00
|
|
|
|
2017-12-30 18:00:40 +01:00
|
|
|
/* chunk is automatically returned to the buffer by
|
|
|
|
~MusicChunkPtr() */
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::Pause() noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2016-12-29 23:20:26 +01:00
|
|
|
Update(false);
|
2014-01-27 08:20:25 +01:00
|
|
|
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs)
|
2014-01-28 11:39:12 +01:00
|
|
|
ao->LockPauseAsync();
|
2014-01-27 08:20:25 +01:00
|
|
|
|
|
|
|
WaitAll();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::Drain() noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs)
|
2014-01-28 11:39:12 +01:00
|
|
|
ao->LockDrainAsync();
|
2014-01-27 08:20:25 +01:00
|
|
|
|
|
|
|
WaitAll();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::Cancel() noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
|
|
|
/* send the cancel() command to all audio outputs */
|
|
|
|
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs)
|
2014-01-28 11:39:12 +01:00
|
|
|
ao->LockCancelAsync();
|
2014-01-27 08:20:25 +01:00
|
|
|
|
|
|
|
WaitAll();
|
|
|
|
|
|
|
|
/* clear the music pipe and return all chunks to the buffer */
|
|
|
|
|
|
|
|
if (pipe != nullptr)
|
2017-12-30 17:24:58 +01:00
|
|
|
pipe->Clear();
|
2014-01-27 08:20:25 +01:00
|
|
|
|
|
|
|
/* the audio outputs are now waiting for a signal, to
|
|
|
|
synchronize the cleared music pipe */
|
|
|
|
|
|
|
|
AllowPlay();
|
|
|
|
|
|
|
|
/* invalidate elapsed_time */
|
|
|
|
|
2014-08-29 13:13:08 +02:00
|
|
|
elapsed_time = SignedSongTime::Negative();
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::Close() noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs)
|
2014-01-28 11:39:12 +01:00
|
|
|
ao->LockCloseWait();
|
2014-01-27 08:20:25 +01:00
|
|
|
|
2018-06-23 18:45:57 +02:00
|
|
|
pipe.reset();
|
2014-01-27 08:20:25 +01:00
|
|
|
|
|
|
|
input_audio_format.Clear();
|
|
|
|
|
2014-08-29 13:13:08 +02:00
|
|
|
elapsed_time = SignedSongTime::Negative();
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::Release() noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
2019-04-26 14:28:59 +02:00
|
|
|
for (const auto &ao : outputs)
|
2014-01-28 11:39:12 +01:00
|
|
|
ao->LockRelease();
|
2014-01-27 08:20:25 +01:00
|
|
|
|
2018-06-23 18:45:57 +02:00
|
|
|
pipe.reset();
|
2014-01-27 08:20:25 +01:00
|
|
|
|
|
|
|
input_audio_format.Clear();
|
|
|
|
|
2014-08-29 13:13:08 +02:00
|
|
|
elapsed_time = SignedSongTime::Negative();
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2017-12-29 16:29:49 +01:00
|
|
|
MultipleOutputs::SongBorder() noexcept
|
2014-01-27 08:20:25 +01:00
|
|
|
{
|
|
|
|
/* clear the elapsed_time pointer at the beginning of a new
|
|
|
|
song */
|
2014-08-29 13:13:08 +02:00
|
|
|
elapsed_time = SignedSongTime::zero();
|
2014-01-27 08:20:25 +01:00
|
|
|
}
|