OLD | NEW |
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 REMOTING_CLIENT_AUDIO_PLAYER_H_ | 5 #ifndef REMOTING_CLIENT_AUDIO_PLAYER_H_ |
6 #define REMOTING_CLIENT_AUDIO_PLAYER_H_ | 6 #define REMOTING_CLIENT_AUDIO_PLAYER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 AudioPacket::SamplingRate sampling_rate_; | 45 AudioPacket::SamplingRate sampling_rate_; |
46 | 46 |
47 bool start_failed_; | 47 bool start_failed_; |
48 | 48 |
49 // Protects |queued_packets_|, |queued_samples_ and |bytes_consumed_|. This is | 49 // Protects |queued_packets_|, |queued_samples_ and |bytes_consumed_|. This is |
50 // necessary to prevent races, because Pepper will call the callback on a | 50 // necessary to prevent races, because Pepper will call the callback on a |
51 // separate thread. | 51 // separate thread. |
52 base::Lock lock_; | 52 base::Lock lock_; |
53 | 53 |
54 AudioPacketQueue queued_packets_; | 54 AudioPacketQueue queued_packets_; |
55 int queued_samples_; | 55 int queued_bytes_; |
56 | 56 |
57 // The number of bytes from |queued_packets_| that have been consumed. | 57 // The number of bytes from |queued_packets_| that have been consumed. |
58 size_t bytes_consumed_; | 58 size_t bytes_consumed_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(AudioPlayer); | 60 DISALLOW_COPY_AND_ASSIGN(AudioPlayer); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace remoting | 63 } // namespace remoting |
64 | 64 |
65 #endif // REMOTING_CLIENT_AUDIO_PLAYER_H_ | 65 #endif // REMOTING_CLIENT_AUDIO_PLAYER_H_ |
OLD | NEW |