OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/speech/audio_encoder.h" | 5 #include "content/browser/speech/audio_encoder.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
10 #include "content/browser/speech/audio_buffer.h" | 12 #include "content/browser/speech/audio_buffer.h" |
11 | 13 |
12 namespace content { | 14 namespace content { |
13 | 15 |
14 namespace { | 16 namespace { |
15 | 17 |
16 const char* const kContentTypeFLAC = "audio/x-flac; rate="; | 18 const char* const kContentTypeFLAC = "audio/x-flac; rate="; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 std::string AudioEncoder::GetMimeType() { | 81 std::string AudioEncoder::GetMimeType() { |
80 return std::string(kContentTypeFLAC) + | 82 return std::string(kContentTypeFLAC) + |
81 base::UintToString(FLAC__stream_encoder_get_sample_rate(encoder_)); | 83 base::UintToString(FLAC__stream_encoder_get_sample_rate(encoder_)); |
82 } | 84 } |
83 | 85 |
84 int AudioEncoder::GetBitsPerSample() { | 86 int AudioEncoder::GetBitsPerSample() { |
85 return FLAC__stream_encoder_get_bits_per_sample(encoder_); | 87 return FLAC__stream_encoder_get_bits_per_sample(encoder_); |
86 } | 88 } |
87 | 89 |
88 } // namespace content | 90 } // namespace content |
OLD | NEW |