Formatting
This commit is contained in:
@@ -315,7 +315,7 @@ void EBUR128State::AddFrames(const char *data, size_t size) {
|
||||
|
||||
}
|
||||
|
||||
std::optional<EBUR128Measures> EBUR128State::Finalize(EBUR128State&& state) {
|
||||
std::optional<EBUR128Measures> EBUR128State::Finalize(EBUR128State &&state) {
|
||||
|
||||
ebur128_state *ebur128 = &*state.st;
|
||||
|
||||
@@ -419,10 +419,9 @@ std::optional<EBUR128Measures> EBUR128AnalysisImpl::Compute(const Song &song) {
|
||||
// Connect the elements
|
||||
gst_element_link_many(src, decode, nullptr);
|
||||
|
||||
GstStaticCaps static_caps = GST_STATIC_CAPS(
|
||||
"audio/x-raw,"
|
||||
"format = (string) { S16LE, S32LE, F32LE, F64LE },"
|
||||
"layout = (string) interleaved");
|
||||
GstStaticCaps static_caps = GST_STATIC_CAPS("audio/x-raw,"
|
||||
"format = (string) { S16LE, S32LE, F32LE, F64LE },"
|
||||
"layout = (string) interleaved");
|
||||
|
||||
GstCaps *caps = gst_static_caps_get(&static_caps);
|
||||
// Place a queue before the sink. It really does matter for performance.
|
||||
|
||||
@@ -50,14 +50,14 @@ class EngineBase : public QObject {
|
||||
public:
|
||||
~EngineBase() override;
|
||||
|
||||
// State:
|
||||
// Playing when playing,
|
||||
// Paused when paused
|
||||
// Idle when you still have a URL loaded (ie you have not been told to stop())
|
||||
// Empty when you have been told to stop(),
|
||||
// Error when an error occurred and you stopped yourself
|
||||
//
|
||||
// It is vital to be Idle just after the track has ended!
|
||||
// State:
|
||||
// Playing when playing,
|
||||
// Paused when paused
|
||||
// Idle when you still have a URL loaded (ie you have not been told to stop())
|
||||
// Empty when you have been told to stop(),
|
||||
// Error when an error occurred and you stopped yourself
|
||||
//
|
||||
// It is vital to be Idle just after the track has ended!
|
||||
|
||||
enum class State {
|
||||
Empty,
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
/*
|
||||
* Strawberry Music Player
|
||||
* Copyright 2021-2023, Jonas Kvinge <jonas@jkvinge.net>
|
||||
*
|
||||
* Strawberry 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Strawberry 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 Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
* Strawberry Music Player
|
||||
* Copyright 2021-2023, Jonas Kvinge <jonas@jkvinge.net>
|
||||
*
|
||||
* Strawberry 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Strawberry 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 Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "enginedevice.h"
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
/*
|
||||
* Strawberry Music Player
|
||||
* Copyright 2021-2023, Jonas Kvinge <jonas@jkvinge.net>
|
||||
*
|
||||
* Strawberry 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Strawberry 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 Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
* Strawberry Music Player
|
||||
* Copyright 2021-2023, Jonas Kvinge <jonas@jkvinge.net>
|
||||
*
|
||||
* Strawberry 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Strawberry 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 Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ENGINEDEVICE_H
|
||||
#define ENGINEDEVICE_H
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2003-2005 by Mark Kretschmann <markey@web.de> *
|
||||
* Copyright (C) 2005 by Jakub Stachowski <qbast@go2.pl> *
|
||||
* Copyright (C) 2006 Paul Cifarelli <paul@cifarelli.net> *
|
||||
* Copyright (C) 2017-2024 Jonas Kvinge <jonas@jkvinge.net> *
|
||||
* *
|
||||
* 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 Steet, Fifth Floor, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
* Copyright (C) 2003-2005 by Mark Kretschmann <markey@web.de> *
|
||||
* Copyright (C) 2005 by Jakub Stachowski <qbast@go2.pl> *
|
||||
* Copyright (C) 2006 Paul Cifarelli <paul@cifarelli.net> *
|
||||
* Copyright (C) 2017-2024 Jonas Kvinge <jonas@jkvinge.net> *
|
||||
* *
|
||||
* 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 Steet, Fifth Floor, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@@ -674,7 +674,7 @@ void GstEngine::HandlePipelineError(const int pipeline_id, const int domain, con
|
||||
|
||||
void GstEngine::NewMetaData(const int pipeline_id, const EngineMetadata &engine_metadata) {
|
||||
|
||||
if (!current_pipeline_|| current_pipeline_->id() != pipeline_id) return;
|
||||
if (!current_pipeline_ || current_pipeline_->id() != pipeline_id) return;
|
||||
Q_EMIT MetaData(engine_metadata);
|
||||
|
||||
}
|
||||
@@ -1064,8 +1064,7 @@ void GstEngine::UpdateScope(const int chunk_length) {
|
||||
buffer_format_.startsWith("S24LE"_L1) ||
|
||||
buffer_format_.startsWith("S24_32LE"_L1) ||
|
||||
buffer_format_.startsWith("S32LE"_L1) ||
|
||||
buffer_format_.startsWith("F32LE"_L1)
|
||||
) {
|
||||
buffer_format_.startsWith("F32LE"_L1)) {
|
||||
memcpy(dest, source, bytes);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2003-2005 by Mark Kretschmann <markey@web.de> *
|
||||
* Copyright (C) 2005 by Jakub Stachowski <qbast@go2.pl> *
|
||||
* Copyright (C) 2006 Paul Cifarelli <paul@cifarelli.net> *
|
||||
* Copyright (C) 2017-2024 Jonas Kvinge <jonas@jkvinge.net> *
|
||||
* *
|
||||
* 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 Steet, Fifth Floor, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
* Copyright (C) 2003-2005 by Mark Kretschmann <markey@web.de> *
|
||||
* Copyright (C) 2005 by Jakub Stachowski <qbast@go2.pl> *
|
||||
* Copyright (C) 2006 Paul Cifarelli <paul@cifarelli.net> *
|
||||
* Copyright (C) 2017-2024 Jonas Kvinge <jonas@jkvinge.net> *
|
||||
* *
|
||||
* 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 Steet, Fifth Floor, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef GSTENGINE_H
|
||||
#define GSTENGINE_H
|
||||
|
||||
@@ -138,7 +138,7 @@ static void gst_strawberry_fastspectrum_alloc_channel_data(GstStrawberryFastSpec
|
||||
fastspectrum->fft_input = reinterpret_cast<double*>(fftw_malloc(sizeof(double) * nfft));
|
||||
fastspectrum->fft_output = reinterpret_cast<fftw_complex*>(fftw_malloc(sizeof(fftw_complex) * (nfft / 2 + 1)));
|
||||
|
||||
fastspectrum->spect_magnitude = new double[bands] {};
|
||||
fastspectrum->spect_magnitude = new double[bands]{};
|
||||
|
||||
GstStrawberryFastSpectrumClass *klass = reinterpret_cast<GstStrawberryFastSpectrumClass*>(G_OBJECT_GET_CLASS(fastspectrum));
|
||||
{
|
||||
|
||||
@@ -147,4 +147,3 @@ PulseDeviceFinder::~PulseDeviceFinder() {
|
||||
pa_mainloop_free(mainloop_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user