Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
takenori-y committed Mar 12, 2024
1 parent 90a8c11 commit a9dac5a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/SPTK/utils/uint24_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class uint24_t {
uint24_t() {
}

template <typename T>
template <typename T>
explicit uint24_t(T initial_value) {
*this = static_cast<int>(initial_value);
}
Expand Down
3 changes: 2 additions & 1 deletion src/analysis/spectrum_extraction_by_world.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ bool SpectrumExtractionByWorld::Run(
f0_floor = f0[i];
}
}
if (f0_floor < world::GetF0FloorForCheapTrick(static_cast<int>(sampling_rate_), fft_length_)) {
if (f0_floor < world::GetF0FloorForCheapTrick(
static_cast<int>(sampling_rate_), fft_length_)) {
return false;
}

Expand Down
7 changes: 5 additions & 2 deletions src/main/pitch_mark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ int main(int argc, char* argv[]) {

switch (output_format) {
case kBinarySequence: {
int next_pitch_mark(pitch_mark.empty() ? -1 : static_cast<int>(std::round(pitch_mark[0])));
int next_pitch_mark(pitch_mark.empty()
? -1
: static_cast<int>(std::round(pitch_mark[0])));
for (int i(0), j(1); i < waveform_length; ++i) {
if (i == next_pitch_mark) {
if (!sptk::WriteStream(binary_polarity, &std::cout)) {
Expand Down Expand Up @@ -334,7 +336,8 @@ int main(int argc, char* argv[]) {
const double bias(kSine == output_format ? 0.0 : 0.5 * sptk::kPi);
for (int n(0), i(0); n <= num_pitch_marks; ++n) {
const int next_pitch_mark(
n < num_pitch_marks ? static_cast<int>(std::round(pitch_mark[n])) : waveform_length);
n < num_pitch_marks ? static_cast<int>(std::round(pitch_mark[n]))
: waveform_length);
// Find the point across voiced region to unvoiced one.
int j(i);
for (; j < next_pitch_mark; ++j) {
Expand Down
3 changes: 2 additions & 1 deletion src/utils/sptk_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ bool ReadStream(bool zero_padding, int stream_skip, int read_point,
return false; // Something wrong!
}

std::fill_n(sequence_to_read->begin() + end - num_zeros, num_zeros, static_cast<T>(0));
std::fill_n(sequence_to_read->begin() + end - num_zeros, num_zeros,
static_cast<T>(0));

return !input_stream->bad();
}
Expand Down
2 changes: 1 addition & 1 deletion tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

PYTHON_VERSION := 3.8
SHELLCHECK_VERSION := 0.9.0
SHFMT_VERSION := 3.7.0
SHFMT_VERSION := 3.8.0
JOBS := 4


Expand Down

0 comments on commit a9dac5a

Please sign in to comment.