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

Side by Side Diff: src/shared/ppapi_proxy/plugin_audio_config.cc

Issue 4210003: Started on Resource class. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Resource->PluginResource Created 10 years, 1 month 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 | « src/shared/ppapi_proxy/plugin_audio_config.h ('k') | src/shared/ppapi_proxy/plugin_buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 The Native Client Authors. All rights reserved. 2 * Copyright 2010 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 #include "native_client/src/shared/ppapi_proxy/plugin_audio_config.h" 7 #include "native_client/src/shared/ppapi_proxy/plugin_audio_config.h"
8 8
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 14 matching lines...) Expand all
25 UNREFERENCED_PARAMETER(sample_rate); 25 UNREFERENCED_PARAMETER(sample_rate);
26 UNREFERENCED_PARAMETER(sample_frame_count); 26 UNREFERENCED_PARAMETER(sample_frame_count);
27 return kInvalidResourceId; 27 return kInvalidResourceId;
28 } 28 }
29 29
30 uint32_t RecommendSampleFrameCount(uint32_t request_sample_frame_count) { 30 uint32_t RecommendSampleFrameCount(uint32_t request_sample_frame_count) {
31 UNREFERENCED_PARAMETER(request_sample_frame_count); 31 UNREFERENCED_PARAMETER(request_sample_frame_count);
32 return 0; 32 return 0;
33 } 33 }
34 34
35 PP_Bool IsAudioConfig(PP_Resource config) { 35 PP_Bool IsAudioConfig(PP_Resource resource) {
36 UNREFERENCED_PARAMETER(config); 36 return PluginResource::GetAs<PluginAudioConfig>(resource).get()
37 return PP_FALSE; 37 ? PP_TRUE : PP_FALSE;
38 } 38 }
39 39
40 PP_AudioSampleRate_Dev GetSampleRate(PP_Resource config) { 40 PP_AudioSampleRate_Dev GetSampleRate(PP_Resource config) {
41 UNREFERENCED_PARAMETER(config); 41 UNREFERENCED_PARAMETER(config);
42 return PP_AUDIOSAMPLERATE_NONE; 42 return PP_AUDIOSAMPLERATE_NONE;
43 } 43 }
44 44
45 uint32_t GetSampleFrameCount(PP_Resource config) { 45 uint32_t GetSampleFrameCount(PP_Resource config) {
46 UNREFERENCED_PARAMETER(config); 46 UNREFERENCED_PARAMETER(config);
47 return PP_AUDIOMINSAMPLEFRAMECOUNT; 47 return PP_AUDIOMINSAMPLEFRAMECOUNT;
48 } 48 }
49 } // namespace 49 } // namespace
50 50
51 const PPB_AudioConfig_Dev* PluginAudioConfig::GetInterface() { 51 const PPB_AudioConfig_Dev* PluginAudioConfig::GetInterface() {
52 static const PPB_AudioConfig_Dev intf = { 52 static const PPB_AudioConfig_Dev intf = {
53 CreateStereo16Bit, 53 CreateStereo16Bit,
54 RecommendSampleFrameCount, 54 RecommendSampleFrameCount,
55 IsAudioConfig, 55 IsAudioConfig,
56 GetSampleRate, 56 GetSampleRate,
57 GetSampleFrameCount, 57 GetSampleFrameCount,
58 }; 58 };
59 return &intf; 59 return &intf;
60 } 60 }
61 61
62 } // namespace ppapi_proxy 62 } // namespace ppapi_proxy
OLDNEW
« no previous file with comments | « src/shared/ppapi_proxy/plugin_audio_config.h ('k') | src/shared/ppapi_proxy/plugin_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698