Skip to content

Commit

Permalink
Refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
complexlogic committed Sep 15, 2022
1 parent 2a13229 commit 0e7b363
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ extern "C" {
#include "output.hpp"
#include "tag.hpp"

#define OUTPUT_FORMAT AV_SAMPLE_FMT_S16

extern bool multithread;

static void scan_av_log(void *avcl, int level, const char *fmt, va_list args);
Expand Down Expand Up @@ -89,9 +91,8 @@ FileType ScanJob::add_directory(std::filesystem::path &path)

// Determine directory filetype
for (const std::filesystem::directory_entry &entry : std::filesystem::directory_iterator(path)) {
if (!entry.is_regular_file() || !entry.path().has_extension()) {
if (!entry.is_regular_file() || !entry.path().has_extension())
continue;
}
file_type = determine_filetype(entry.path().extension().string());
if (file_type != FileType::INVALID)
extensions.insert(file_type);
Expand Down Expand Up @@ -143,9 +144,9 @@ bool ScanJob::scan(const Config &config, std::mutex *ffmpeg_mutex)
}

if (config.tag_mode != 'd')
this->calculate_loudness(config);
calculate_loudness(config);

this->tag_tracks(config);
tag_tracks(config);
return true;
}

Expand Down Expand Up @@ -397,7 +398,7 @@ void ScanJob::calculate_loudness(const Config &config)

// Album loudness calculations
if (config.do_album)
this->calculate_album_loudness(config);
calculate_album_loudness(config);

// Check clipping conditions
if (config.clip_mode != 'n') {
Expand Down
1 change: 0 additions & 1 deletion src/scan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <ebur128.h>
#include "scan.hpp"

#define OUTPUT_FORMAT AV_SAMPLE_FMT_S16
void free_ebur128(ebur128_state *ebur128);

enum class FileType {
Expand Down

0 comments on commit 0e7b363

Please sign in to comment.