Index: webrtc/common_audio/wav_file.h |
diff --git a/webrtc/common_audio/wav_file.h b/webrtc/common_audio/wav_file.h |
index 1fbf9541fabcff29af06dfda72c5d439c4d82941..bcd618c810583f7181de1fd2b7edf0de653c8329 100644 |
--- a/webrtc/common_audio/wav_file.h |
+++ b/webrtc/common_audio/wav_file.h |
@@ -24,7 +24,7 @@ namespace webrtc { |
class WavWriter { |
public: |
// Open a new WAV file for writing. |
- WavWriter(const std::string& filename, int sample_rate, int num_channels); |
+ WavWriter(const std::string& filename, int sample_rate, size_t num_channels); |
// Close the WAV file, after writing its header. |
~WavWriter(); |
@@ -36,14 +36,14 @@ class WavWriter { |
void WriteSamples(const int16_t* samples, size_t num_samples); |
int sample_rate() const { return sample_rate_; } |
- int num_channels() const { return num_channels_; } |
- uint32_t num_samples() const { return num_samples_; } |
+ size_t num_channels() const { return num_channels_; } |
+ size_t num_samples() const { return num_samples_; } |
private: |
void Close(); |
const int sample_rate_; |
- const int num_channels_; |
- uint32_t num_samples_; // Total number of samples written to file. |
+ const size_t num_channels_; |
+ size_t num_samples_; // Total number of samples written to file. |
FILE* file_handle_; // Output file, owned by this class |
}; |
@@ -62,15 +62,15 @@ class WavReader { |
size_t ReadSamples(size_t num_samples, int16_t* samples); |
int sample_rate() const { return sample_rate_; } |
- int num_channels() const { return num_channels_; } |
- uint32_t num_samples() const { return num_samples_; } |
+ size_t num_channels() const { return num_channels_; } |
+ size_t num_samples() const { return num_samples_; } |
private: |
void Close(); |
int sample_rate_; |
- int num_channels_; |
- uint32_t num_samples_; // Total number of samples in the file. |
- uint32_t num_samples_remaining_; |
+ size_t num_channels_; |
+ size_t num_samples_; // Total number of samples in the file. |
+ size_t num_samples_remaining_; |
FILE* file_handle_; // Input file, owned by this class. |
}; |
@@ -83,13 +83,13 @@ extern "C" { |
typedef struct rtc_WavWriter rtc_WavWriter; |
rtc_WavWriter* rtc_WavOpen(const char* filename, |
int sample_rate, |
- int num_channels); |
+ size_t num_channels); |
void rtc_WavClose(rtc_WavWriter* wf); |
void rtc_WavWriteSamples(rtc_WavWriter* wf, |
const float* samples, |
size_t num_samples); |
int rtc_WavSampleRate(const rtc_WavWriter* wf); |
-int rtc_WavNumChannels(const rtc_WavWriter* wf); |
+size_t rtc_WavNumChannels(const rtc_WavWriter* wf); |
uint32_t rtc_WavNumSamples(const rtc_WavWriter* wf); |
#ifdef __cplusplus |