diff options
author | Jonas Olsson <jonasolsson@webrtc.org> | 2018-06-08 14:57:46 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2018-06-14 09:05:20 +0000 |
commit | 4e952a3f44e96cb36148cbe8c1796e277742f95c (patch) | |
tree | 68d51b0ad7cd29c60e1f7de7cab3daf7a53cc9cf /common_audio | |
parent | 671cae2c7c1dee7feebb991670ea1c49f218feea (diff) | |
download | webrtc-4e952a3f44e96cb36148cbe8c1796e277742f95c.tar.gz |
Remove unused WavFile::FormatAsString method.
This lets us remove stringstreams from common_audio/
Bug: webrtc:8982
Change-Id: I450d87dc50090e838edabc7c1db645aca9c1b0f7
Reviewed-on: https://webrtc-review.googlesource.com/82163
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23609}
Diffstat (limited to 'common_audio')
-rw-r--r-- | common_audio/wav_file.cc | 9 | ||||
-rw-r--r-- | common_audio/wav_file.h | 3 |
2 files changed, 0 insertions, 12 deletions
diff --git a/common_audio/wav_file.cc b/common_audio/wav_file.cc index 1217e40ba7..e96b39df1b 100644 --- a/common_audio/wav_file.cc +++ b/common_audio/wav_file.cc @@ -13,7 +13,6 @@ #include <algorithm> #include <cstdio> #include <limits> -#include <sstream> #include "common_audio/include/audio_util.h" #include "common_audio/wav_header.h" @@ -39,14 +38,6 @@ class ReadableWavFile : public ReadableWav { FILE* file_; }; -std::string WavFile::FormatAsString() const { - std::ostringstream s; - s << "Sample rate: " << sample_rate() << " Hz, Channels: " << num_channels() - << ", Duration: " - << (1.f * num_samples()) / (num_channels() * sample_rate()) << " s"; - return s.str(); -} - WavReader::WavReader(const std::string& filename) : WavReader(rtc::OpenPlatformFileReadOnly(filename)) {} diff --git a/common_audio/wav_file.h b/common_audio/wav_file.h index befe73339a..69c241aad6 100644 --- a/common_audio/wav_file.h +++ b/common_audio/wav_file.h @@ -30,9 +30,6 @@ class WavFile { virtual int sample_rate() const = 0; virtual size_t num_channels() const = 0; virtual size_t num_samples() const = 0; - - // Returns a human-readable string containing the audio format. - std::string FormatAsString() const; }; // Simple C++ class for writing 16-bit PCM WAV files. All error handling is |