Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: webrtc/common_audio/wav_file.cc

Issue 1710083006: Changes in the wav_file implementation in order to avoid clang warnings (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/common_audio/wav_file.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/wav_file.cc
diff --git a/webrtc/common_audio/wav_file.cc b/webrtc/common_audio/wav_file.cc
index 94b7a3c2c051c64c5ad5ddf34bc08f253979ea18..572c94ba3d25480ca9f186f013705d1942b68bac 100644
--- a/webrtc/common_audio/wav_file.cc
+++ b/webrtc/common_audio/wav_file.cc
@@ -64,6 +64,18 @@ WavReader::~WavReader() {
Close();
}
+int WavReader::sample_rate() const {
+ return sample_rate_;
+}
+
+size_t WavReader::num_channels() const {
+ return num_channels_;
+}
+
+size_t WavReader::num_samples() const {
+ return num_samples_;
+}
+
size_t WavReader::ReadSamples(size_t num_samples, int16_t* samples) {
#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
#error "Need to convert samples to big-endian when reading from WAV file"
@@ -118,6 +130,18 @@ WavWriter::~WavWriter() {
Close();
}
+int WavWriter::sample_rate() const {
+ return sample_rate_;
+}
+
+size_t WavWriter::num_channels() const {
+ return num_channels_;
+}
+
+size_t WavWriter::num_samples() const {
+ return num_samples_;
+}
+
void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) {
#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
#error "Need to convert samples to little-endian when writing to WAV file"
« no previous file with comments | « webrtc/common_audio/wav_file.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698