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

Side by Side Diff: media/audio/audio_device_thread.h

Issue 1538563002: Forward the number of skipped frames by the OS in audio playout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fix. git cl format. 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 unified diff | Download patch
« no previous file with comments | « media/audio/android/opensles_output.cc ('k') | media/audio/audio_input_device.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 // 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 #ifndef MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_
6 #define MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_ 6 #define MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 int total_segments); 43 int total_segments);
44 virtual ~Callback(); 44 virtual ~Callback();
45 45
46 // One time initialization for the callback object on the audio thread. 46 // One time initialization for the callback object on the audio thread.
47 void InitializeOnAudioThread(); 47 void InitializeOnAudioThread();
48 48
49 // Derived implementations must call shared_memory_.Map appropriately 49 // Derived implementations must call shared_memory_.Map appropriately
50 // before Process can be called. 50 // before Process can be called.
51 virtual void MapSharedMemory() = 0; 51 virtual void MapSharedMemory() = 0;
52 52
53 // Called whenever we receive notifications about pending data. 53 // Called whenever we receive notifications about pending input data.
54 virtual void Process(uint32 pending_data) = 0; 54 virtual void Process(uint32_t pending_data) = 0;
55 55
56 protected: 56 protected:
57 // Protected so that derived classes can access directly. 57 // Protected so that derived classes can access directly.
58 // The variables are 'const' since values are calculated/set in the 58 // The variables are 'const' since values are calculated/set in the
59 // constructor and must never change. 59 // constructor and must never change.
60 const AudioParameters audio_parameters_; 60 const AudioParameters audio_parameters_;
61 const int samples_per_ms_; 61 const int samples_per_ms_;
62 const int bytes_per_ms_; 62 const int bytes_per_ms_;
63 63
64 base::SharedMemory shared_memory_; 64 base::SharedMemory shared_memory_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 base::Lock thread_lock_; 108 base::Lock thread_lock_;
109 scoped_refptr<AudioDeviceThread::Thread> thread_; 109 scoped_refptr<AudioDeviceThread::Thread> thread_;
110 110
111 DISALLOW_COPY_AND_ASSIGN(AudioDeviceThread); 111 DISALLOW_COPY_AND_ASSIGN(AudioDeviceThread);
112 }; 112 };
113 113
114 } // namespace media. 114 } // namespace media.
115 115
116 #endif // MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_ 116 #endif // MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_
OLDNEW
« no previous file with comments | « media/audio/android/opensles_output.cc ('k') | media/audio/audio_input_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698