Code-style fixes
This commit is contained in:
parent
713ab33312
commit
1c4509f23c
4 changed files with 5 additions and 7 deletions
|
@ -70,8 +70,9 @@ inline void multiplySamples(float* buffer, const audioch_t& audioChannelsCount,
|
|||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
constexpr T convertFloatSamples(float value) {
|
||||
template<typename T>
|
||||
constexpr T convertFloatSamples(float value)
|
||||
{
|
||||
return static_cast<T>(value * std::numeric_limits<T>::max() - 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ size_t FlacEncoder::encode(samples_t samplesPerChannel, const float* input)
|
|||
size_t frameSize = 1024;
|
||||
size_t stepSize = frameSize * m_format.audioChannelsNumber;
|
||||
|
||||
std::vector<FLAC__int32> buff(samplesPerChannel * sizeof (float));
|
||||
std::vector<FLAC__int32> buff(samplesPerChannel * sizeof(float));
|
||||
|
||||
for (size_t i = 0; i < buff.size(); ++i) {
|
||||
buff[i] = static_cast<FLAC__int32>(dsp::convertFloatSamples<FLAC__int16>(input[i]));
|
||||
|
|
|
@ -72,7 +72,7 @@ bool SoundTrackWriter::write()
|
|||
return false;
|
||||
}
|
||||
|
||||
if (m_encoderPtr->encode(m_inputBuffer.size() / sizeof (float), m_inputBuffer.data()) == 0) {
|
||||
if (m_encoderPtr->encode(m_inputBuffer.size() / sizeof(float), m_inputBuffer.data()) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
|
||||
#include "oggwriter.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QThread>
|
||||
|
||||
#include "log.h"
|
||||
|
||||
using namespace mu::iex::audioexport;
|
||||
|
|
Loading…
Reference in a new issue