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

Side by Side Diff: components/copresence/mediums/audio/audio_player.h

Issue 481193003: Remove AudioBuffersState usage in Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix silly build buster Created 6 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | components/copresence/mediums/audio/audio_player.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 COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_H_ 5 #ifndef COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_H_
6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_H_ 6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void InitializeOnAudioThread(); 60 void InitializeOnAudioThread();
61 void PlayOnAudioThread( 61 void PlayOnAudioThread(
62 const scoped_refptr<media::AudioBusRefCounted>& samples); 62 const scoped_refptr<media::AudioBusRefCounted>& samples);
63 void StopOnAudioThread(); 63 void StopOnAudioThread();
64 void StopAndCloseOnAudioThread(); 64 void StopAndCloseOnAudioThread();
65 void FinalizeOnAudioThread(); 65 void FinalizeOnAudioThread();
66 66
67 // AudioOutputStream::AudioSourceCallback overrides: 67 // AudioOutputStream::AudioSourceCallback overrides:
68 // Following methods could be called from *ANY* thread. 68 // Following methods could be called from *ANY* thread.
69 virtual int OnMoreData(media::AudioBus* dest, 69 virtual int OnMoreData(media::AudioBus* dest,
70 media::AudioBuffersState /* state */) OVERRIDE; 70 int total_bytes_delay) OVERRIDE;
71 virtual void OnError(media::AudioOutputStream* /* stream */) OVERRIDE; 71 virtual void OnError(media::AudioOutputStream* /* stream */) OVERRIDE;
rkc 2014/09/17 22:41:36 Nit: Change the /* stream */ to stream to keep thi
acolwell GONE FROM CHROMIUM 2014/09/18 00:25:06 Done.
72 72
73 // Flushes the audio loop, making sure that any queued operations are 73 // Flushes the audio loop, making sure that any queued operations are
74 // performed. 74 // performed.
75 void FlushAudioLoopForTesting(); 75 void FlushAudioLoopForTesting();
76 76
77 bool is_playing_; 77 bool is_playing_;
78 78
79 // Self-deleting object. 79 // Self-deleting object.
80 media::AudioOutputStream* stream_; 80 media::AudioOutputStream* stream_;
81 81
82 scoped_ptr<media::AudioOutputStream> output_stream_for_testing_; 82 scoped_ptr<media::AudioOutputStream> output_stream_for_testing_;
83 83
84 // All fields below here are protected by this lock. 84 // All fields below here are protected by this lock.
85 base::Lock state_lock_; 85 base::Lock state_lock_;
86 86
87 scoped_refptr<media::AudioBusRefCounted> samples_; 87 scoped_refptr<media::AudioBusRefCounted> samples_;
88 88
89 // Index to the frame in the samples that we need to play next. 89 // Index to the frame in the samples that we need to play next.
90 int frame_index_; 90 int frame_index_;
91 91
92 DISALLOW_COPY_AND_ASSIGN(AudioPlayer); 92 DISALLOW_COPY_AND_ASSIGN(AudioPlayer);
93 }; 93 };
94 94
95 } // namespace copresence 95 } // namespace copresence
96 96
97 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_H_ 97 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_H_
OLDNEW
« no previous file with comments | « no previous file | components/copresence/mediums/audio/audio_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698