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

Side by Side Diff: media/base/audio_renderer_mixer.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/base/audio_hash_unittest.cc ('k') | media/base/audio_renderer_mixer.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_BASE_AUDIO_RENDERER_MIXER_H_ 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_H_ 6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // never be switched, as it may result in a discrepancy between the output 47 // never be switched, as it may result in a discrepancy between the output
48 // parameters of the new device and the output parameters with which the 48 // parameters of the new device and the output parameters with which the
49 // mixer was initialized. See crbug.com/506507 49 // mixer was initialized. See crbug.com/506507
50 OutputDevice* GetOutputDevice(); 50 OutputDevice* GetOutputDevice();
51 51
52 private: 52 private:
53 // Maps input sample rate to the dedicated converter. 53 // Maps input sample rate to the dedicated converter.
54 typedef std::map<int, scoped_ptr<LoopbackAudioConverter>> AudioConvertersMap; 54 typedef std::map<int, scoped_ptr<LoopbackAudioConverter>> AudioConvertersMap;
55 55
56 // AudioRendererSink::RenderCallback implementation. 56 // AudioRendererSink::RenderCallback implementation.
57 int Render(AudioBus* audio_bus, int audio_delay_milliseconds) override; 57 int Render(AudioBus* audio_bus,
58 uint32_t audio_delay_milliseconds,
59 uint32_t frames_skipped) override;
58 void OnRenderError() override; 60 void OnRenderError() override;
59 61
60 bool is_master_sample_rate(int sample_rate) { 62 bool is_master_sample_rate(int sample_rate) {
61 return sample_rate == output_params_.sample_rate(); 63 return sample_rate == output_params_.sample_rate();
62 } 64 }
63 65
64 // Output sink for this mixer. 66 // Output sink for this mixer.
65 scoped_refptr<AudioRendererSink> audio_sink_; 67 scoped_refptr<AudioRendererSink> audio_sink_;
66 68
67 // Output parameters for this mixer. 69 // Output parameters for this mixer.
(...skipping 20 matching lines...) Expand all
88 base::TimeDelta pause_delay_; 90 base::TimeDelta pause_delay_;
89 base::TimeTicks last_play_time_; 91 base::TimeTicks last_play_time_;
90 bool playing_; 92 bool playing_;
91 93
92 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixer); 94 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixer);
93 }; 95 };
94 96
95 } // namespace media 97 } // namespace media
96 98
97 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_H_ 99 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
OLDNEW
« no previous file with comments | « media/base/audio_hash_unittest.cc ('k') | media/base/audio_renderer_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698