OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CONTENT_RENDERER_AUDIO_DEVICE_H_ | 5 #ifndef CONTENT_RENDERER_AUDIO_DEVICE_H_ |
6 #define CONTENT_RENDERER_AUDIO_DEVICE_H_ | 6 #define CONTENT_RENDERER_AUDIO_DEVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 RenderCallback* callback); | 35 RenderCallback* callback); |
36 virtual ~AudioDevice(); | 36 virtual ~AudioDevice(); |
37 | 37 |
38 // Returns |true| on success. | 38 // Returns |true| on success. |
39 bool Start(); | 39 bool Start(); |
40 bool Stop(); | 40 bool Stop(); |
41 | 41 |
42 private: | 42 private: |
43 // AudioMessageFilter::Delegate implementation. | 43 // AudioMessageFilter::Delegate implementation. |
44 virtual void OnRequestPacket(AudioBuffersState buffers_state); | 44 virtual void OnRequestPacket(AudioBuffersState buffers_state); |
45 virtual void OnStateChanged(const ViewMsg_AudioStreamState_Params& state); | 45 virtual void OnStateChanged(AudioStreamState state); |
46 virtual void OnCreated(base::SharedMemoryHandle handle, uint32 length); | 46 virtual void OnCreated(base::SharedMemoryHandle handle, uint32 length); |
47 virtual void OnLowLatencyCreated(base::SharedMemoryHandle handle, | 47 virtual void OnLowLatencyCreated(base::SharedMemoryHandle handle, |
48 base::SyncSocket::Handle socket_handle, | 48 base::SyncSocket::Handle socket_handle, |
49 uint32 length); | 49 uint32 length); |
50 virtual void OnVolume(double volume); | 50 virtual void OnVolume(double volume); |
51 virtual void OnDestroy(); | 51 virtual void OnDestroy(); |
52 | 52 |
53 // DelegateSimpleThread::Delegate implementation. | 53 // DelegateSimpleThread::Delegate implementation. |
54 virtual void Run(); | 54 virtual void Run(); |
55 | 55 |
(...skipping 19 matching lines...) Expand all Loading... |
75 | 75 |
76 static scoped_refptr<AudioMessageFilter> filter_; | 76 static scoped_refptr<AudioMessageFilter> filter_; |
77 int32 stream_id_; | 77 int32 stream_id_; |
78 scoped_ptr<base::SharedMemory> shared_memory_; | 78 scoped_ptr<base::SharedMemory> shared_memory_; |
79 scoped_ptr<base::SyncSocket> socket_; | 79 scoped_ptr<base::SyncSocket> socket_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(AudioDevice); | 81 DISALLOW_COPY_AND_ASSIGN(AudioDevice); |
82 }; | 82 }; |
83 | 83 |
84 #endif // CONTENT_RENDERER_AUDIO_DEVICE_H_ | 84 #endif // CONTENT_RENDERER_AUDIO_DEVICE_H_ |
OLD | NEW |