Skip to content

Commit

Permalink
Merge pull request #3883 from uklotzde/signalinfo
Browse files Browse the repository at this point in the history
Revert "signalinfo: Add explicit double casts"
  • Loading branch information
daschuer authored May 20, 2021
2 parents edf4747 + e215f95 commit 3656b98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/audio/signalinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SignalInfo final {
// Conversion: #samples / sample offset -> #frames / frame offset
double samples2framesFractional(double samples) const {
DEBUG_ASSERT(getChannelCount().isValid());
return samples / static_cast<double>(getChannelCount());
return samples / getChannelCount();
}

// Conversion: #frames / frame offset -> #samples / sample offset
Expand All @@ -58,7 +58,7 @@ class SignalInfo final {
// Conversion: #frames / frame offset -> second offset
double frames2secsFractional(double frames) const {
DEBUG_ASSERT(getSampleRate().isValid());
return frames / static_cast<double>(getSampleRate());
return frames / getSampleRate();
}

// Conversion: #frames / frame offset -> second offset
Expand All @@ -69,7 +69,7 @@ class SignalInfo final {
// Conversion: second offset -> #frames / frame offset
double secs2frames(double seconds) const {
DEBUG_ASSERT(getSampleRate().isValid());
return seconds * static_cast<double>(getSampleRate());
return seconds * getSampleRate();
}

// Conversion: #frames / frame offset -> millisecond offset
Expand Down

0 comments on commit 3656b98

Please sign in to comment.