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

Side by Side Diff: media/audio/audio_output_stream_sink.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/audio_output_resampler.cc ('k') | media/audio/audio_output_stream_sink.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_OUTPUT_STREAM_SINK_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 21 matching lines...) Expand all
32 void Initialize(const AudioParameters& params, 32 void Initialize(const AudioParameters& params,
33 RenderCallback* callback) override; 33 RenderCallback* callback) override;
34 void Start() override; 34 void Start() override;
35 void Stop() override; 35 void Stop() override;
36 void Pause() override; 36 void Pause() override;
37 void Play() override; 37 void Play() override;
38 bool SetVolume(double volume) override; 38 bool SetVolume(double volume) override;
39 OutputDevice* GetOutputDevice() override; 39 OutputDevice* GetOutputDevice() override;
40 40
41 // AudioSourceCallback implementation. 41 // AudioSourceCallback implementation.
42 int OnMoreData(AudioBus* dest, uint32 total_bytes_delay) override; 42 int OnMoreData(AudioBus* dest,
43 uint32_t total_bytes_delay,
44 uint32_t frames_skipped) override;
43 void OnError(AudioOutputStream* stream) override; 45 void OnError(AudioOutputStream* stream) override;
44 46
45 private: 47 private:
46 ~AudioOutputStreamSink() override; 48 ~AudioOutputStreamSink() override;
47 void ClearCallback(); 49 void ClearCallback();
48 50
49 // Helper methods for running AudioManager methods on the audio thread. 51 // Helper methods for running AudioManager methods on the audio thread.
50 void DoStart(const AudioParameters& params); 52 void DoStart(const AudioParameters& params);
51 void DoStop(); 53 void DoStop();
52 void DoPause(); 54 void DoPause();
(...skipping 23 matching lines...) Expand all
76 78
77 // The actual AudioOutputStream, must only be accessed on the audio thread. 79 // The actual AudioOutputStream, must only be accessed on the audio thread.
78 AudioOutputStream* stream_; 80 AudioOutputStream* stream_;
79 81
80 DISALLOW_COPY_AND_ASSIGN(AudioOutputStreamSink); 82 DISALLOW_COPY_AND_ASSIGN(AudioOutputStreamSink);
81 }; 83 };
82 84
83 } // namepace media 85 } // namepace media
84 86
85 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ 87 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_
OLDNEW
« no previous file with comments | « media/audio/audio_output_resampler.cc ('k') | media/audio/audio_output_stream_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698