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 PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ |
6 #define PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "base/sync_socket.h" | 10 #include "base/sync_socket.h" |
11 #include "base/threading/simple_thread.h" | 11 #include "base/threading/simple_thread.h" |
12 #include "media/base/audio_bus.h" | |
12 #include "ppapi/c/ppb_audio.h" | 13 #include "ppapi/c/ppb_audio.h" |
13 #include "ppapi/shared_impl/resource.h" | 14 #include "ppapi/shared_impl/resource.h" |
14 #include "ppapi/thunk/ppb_audio_api.h" | 15 #include "ppapi/thunk/ppb_audio_api.h" |
15 | 16 |
16 #if defined(OS_NACL) | 17 #if defined(OS_NACL) |
17 #include "native_client/src/untrusted/irt/irt_ppapi.h" | 18 #include "native_client/src/untrusted/irt/irt_ppapi.h" |
18 #endif | 19 #endif |
19 | 20 |
20 namespace ppapi { | 21 namespace ppapi { |
21 | 22 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 | 95 |
95 static void CallRun(void* self); | 96 static void CallRun(void* self); |
96 #endif | 97 #endif |
97 | 98 |
98 // Callback to call when audio is ready to accept new samples. | 99 // Callback to call when audio is ready to accept new samples. |
99 PPB_Audio_Callback callback_; | 100 PPB_Audio_Callback callback_; |
100 | 101 |
101 // User data pointer passed verbatim to the callback function. | 102 // User data pointer passed verbatim to the callback function. |
102 void* user_data_; | 103 void* user_data_; |
103 | 104 |
105 // AudioBus for shuttling data across the shared memory. | |
106 scoped_ptr<media::AudioBus> audio_bus_; | |
107 | |
108 // Internal buffer for user's integer audio data. | |
109 int audio_buffer_size_; | |
110 scoped_ptr<uint8_t> audio_buffer_; | |
Chris Rogers
2012/08/24 20:20:26
scoped_array<> ??
DaleCurtis
2012/08/24 23:53:12
Done.
| |
111 | |
104 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Shared); | 112 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Shared); |
105 }; | 113 }; |
106 | 114 |
107 } // namespace ppapi | 115 } // namespace ppapi |
108 | 116 |
109 #endif // PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ | 117 #endif // PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ |
OLD | NEW |