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

Unified Diff: content/browser/speech/audio_buffer.h

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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 | « content/browser/site_per_process_browsertest.cc ('k') | content/browser/speech/audio_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/speech/audio_buffer.h
diff --git a/content/browser/speech/audio_buffer.h b/content/browser/speech/audio_buffer.h
index 7b0fd7e19df77a4fffed5b276c018e1ebe69d7af..d9415438697dbe20b7025522c9a93c21f3167e7d 100644
--- a/content/browser/speech/audio_buffer.h
+++ b/content/browser/speech/audio_buffer.h
@@ -5,10 +5,13 @@
#ifndef CONTENT_BROWSER_SPEECH_AUDIO_BUFFER_H_
#define CONTENT_BROWSER_SPEECH_AUDIO_BUFFER_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <deque>
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
@@ -21,15 +24,17 @@ class CONTENT_EXPORT AudioChunk :
explicit AudioChunk(int bytes_per_sample);
// Creates a chunk of |length| bytes, initialized to zeros.
AudioChunk(size_t length, int bytes_per_sample);
- AudioChunk(const uint8* data, size_t length, int bytes_per_sample);
+ AudioChunk(const uint8_t* data, size_t length, int bytes_per_sample);
bool IsEmpty() const;
int bytes_per_sample() const { return bytes_per_sample_; }
size_t NumSamples() const;
const std::string& AsString() const;
- int16 GetSample16(size_t index) const;
- const int16* SamplesData16() const;
- uint8* writable_data() { return reinterpret_cast<uint8*>(&data_string_[0]); }
+ int16_t GetSample16(size_t index) const;
+ const int16_t* SamplesData16() const;
+ uint8_t* writable_data() {
+ return reinterpret_cast<uint8_t*>(&data_string_[0]);
+ }
private:
friend class base::RefCountedThreadSafe<AudioChunk>;
@@ -49,7 +54,7 @@ class AudioBuffer {
~AudioBuffer();
// Enqueues a copy of |length| bytes of |data| buffer.
- void Enqueue(const uint8* data, size_t length);
+ void Enqueue(const uint8_t* data, size_t length);
// Dequeues, in FIFO order, a single chunk respecting the length of the
// corresponding Enqueue call (in a nutshell: multiple Enqueue calls followed
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/browser/speech/audio_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698