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

Side by Side Diff: webrtc/common_audio/wav_file.h

Issue 1409943002: Add aecdump support to audioproc_f. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/common_audio/wav_file.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 11 matching lines...) Expand all
22 namespace webrtc { 22 namespace webrtc {
23 23
24 // Interface to provide access to WAV file parameters. 24 // Interface to provide access to WAV file parameters.
25 class WavFile { 25 class WavFile {
26 public: 26 public:
27 virtual ~WavFile() {} 27 virtual ~WavFile() {}
28 28
29 virtual int sample_rate() const = 0; 29 virtual int sample_rate() const = 0;
30 virtual int num_channels() const = 0; 30 virtual int num_channels() const = 0;
31 virtual uint32_t num_samples() const = 0; 31 virtual uint32_t num_samples() const = 0;
32
33 // Returns a human-readable string containing the audio format.
34 std::string FormatAsString() const;
32 }; 35 };
33 36
34 // Simple C++ class for writing 16-bit PCM WAV files. All error handling is 37 // Simple C++ class for writing 16-bit PCM WAV files. All error handling is
35 // by calls to RTC_CHECK(), making it unsuitable for anything but debug code. 38 // by calls to RTC_CHECK(), making it unsuitable for anything but debug code.
36 class WavWriter final : public WavFile { 39 class WavWriter final : public WavFile {
37 public: 40 public:
38 // Open a new WAV file for writing. 41 // Open a new WAV file for writing.
39 WavWriter(const std::string& filename, int sample_rate, int num_channels); 42 WavWriter(const std::string& filename, int sample_rate, int num_channels);
40 43
41 // Close the WAV file, after writing its header. 44 // Close the WAV file, after writing its header.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 size_t num_samples); 109 size_t num_samples);
107 int rtc_WavSampleRate(const rtc_WavWriter* wf); 110 int rtc_WavSampleRate(const rtc_WavWriter* wf);
108 int rtc_WavNumChannels(const rtc_WavWriter* wf); 111 int rtc_WavNumChannels(const rtc_WavWriter* wf);
109 uint32_t rtc_WavNumSamples(const rtc_WavWriter* wf); 112 uint32_t rtc_WavNumSamples(const rtc_WavWriter* wf);
110 113
111 #ifdef __cplusplus 114 #ifdef __cplusplus
112 } // extern "C" 115 } // extern "C"
113 #endif 116 #endif
114 117
115 #endif // WEBRTC_COMMON_AUDIO_WAV_FILE_H_ 118 #endif // WEBRTC_COMMON_AUDIO_WAV_FILE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_audio/wav_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698