From 4e952a3f44e96cb36148cbe8c1796e277742f95c Mon Sep 17 00:00:00 2001 From: Jonas Olsson Date: Fri, 8 Jun 2018 14:57:46 +0200 Subject: [PATCH] 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 Reviewed-by: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#23609} --- common_audio/wav_file.cc | 9 --------- common_audio/wav_file.h | 3 --- 2 files changed, 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 #include #include -#include #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