OLD | NEW |
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_IMPL_H_ | 5 #ifndef COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_IMPL_H_ |
6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_IMPL_H_ | 6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_IMPL_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 28 matching lines...) Expand all Loading... |
39 void set_output_stream_for_testing( | 39 void set_output_stream_for_testing( |
40 media::AudioOutputStream* output_stream_for_testing) { | 40 media::AudioOutputStream* output_stream_for_testing) { |
41 output_stream_for_testing_.reset(output_stream_for_testing); | 41 output_stream_for_testing_.reset(output_stream_for_testing); |
42 } | 42 } |
43 | 43 |
44 private: | 44 private: |
45 friend class AudioPlayerTest; | 45 friend class AudioPlayerTest; |
46 FRIEND_TEST_ALL_PREFIXES(AudioPlayerTest, BasicPlayAndStop); | 46 FRIEND_TEST_ALL_PREFIXES(AudioPlayerTest, BasicPlayAndStop); |
47 FRIEND_TEST_ALL_PREFIXES(AudioPlayerTest, OutOfOrderPlayAndStopMultiple); | 47 FRIEND_TEST_ALL_PREFIXES(AudioPlayerTest, OutOfOrderPlayAndStopMultiple); |
48 | 48 |
49 virtual ~AudioPlayerImpl(); | 49 ~AudioPlayerImpl() override; |
50 | 50 |
51 // Methods to do our various operations; all of these need to be run on the | 51 // Methods to do our various operations; all of these need to be run on the |
52 // audio thread. | 52 // audio thread. |
53 void InitializeOnAudioThread(); | 53 void InitializeOnAudioThread(); |
54 void PlayOnAudioThread( | 54 void PlayOnAudioThread( |
55 const scoped_refptr<media::AudioBusRefCounted>& samples); | 55 const scoped_refptr<media::AudioBusRefCounted>& samples); |
56 void StopOnAudioThread(); | 56 void StopOnAudioThread(); |
57 void StopAndCloseOnAudioThread(); | 57 void StopAndCloseOnAudioThread(); |
58 void FinalizeOnAudioThread(); | 58 void FinalizeOnAudioThread(); |
59 | 59 |
(...skipping 20 matching lines...) Expand all Loading... |
80 | 80 |
81 // Index to the frame in the samples that we need to play next. | 81 // Index to the frame in the samples that we need to play next. |
82 int frame_index_; | 82 int frame_index_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(AudioPlayerImpl); | 84 DISALLOW_COPY_AND_ASSIGN(AudioPlayerImpl); |
85 }; | 85 }; |
86 | 86 |
87 } // namespace copresence | 87 } // namespace copresence |
88 | 88 |
89 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_IMPL_H_ | 89 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_IMPL_H_ |
OLD | NEW |