summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp
diff options
context:
space:
mode:
authornfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 01:35:50 +0000
committernfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 01:35:50 +0000
commit56e8cc35efd400a3c38a8d459dff06bd20e9e899 (patch)
tree8333c74ebf20d17930caff775d28c9be9d1e8849 /ppapi/cpp
parentf76f2689acac6ec1fd8e39f9a5cf46749e3c1834 (diff)
downloadchromium_src-56e8cc35efd400a3c38a8d459dff06bd20e9e899.zip
chromium_src-56e8cc35efd400a3c38a8d459dff06bd20e9e899.tar.gz
chromium_src-56e8cc35efd400a3c38a8d459dff06bd20e9e899.tar.bz2
Remove dev/audio, dev/audio_config, and dev/audio_trusted
Also, bump NaCl in deps to pull in new version of NaCl, which has now migrated to non-dev audio. Review URL: http://codereview.chromium.org/6281007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71897 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp')
-rw-r--r--ppapi/cpp/dev/audio_config_dev.cc48
-rw-r--r--ppapi/cpp/dev/audio_config_dev.h60
-rw-r--r--ppapi/cpp/dev/audio_dev.cc41
-rw-r--r--ppapi/cpp/dev/audio_dev.h38
4 files changed, 0 insertions, 187 deletions
diff --git a/ppapi/cpp/dev/audio_config_dev.cc b/ppapi/cpp/dev/audio_config_dev.cc
deleted file mode 100644
index 754a78f..0000000
--- a/ppapi/cpp/dev/audio_config_dev.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/cpp/dev/audio_config_dev.h"
-
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/module_impl.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_AudioConfig_Dev>() {
- return PPB_AUDIO_CONFIG_DEV_INTERFACE;
-}
-
-} // namespace
-
-AudioConfig_Dev::AudioConfig_Dev()
- : sample_rate_(PP_AUDIOSAMPLERATE_NONE),
- sample_frame_count_(0) {
-}
-
-AudioConfig_Dev::AudioConfig_Dev(Instance* instance,
- PP_AudioSampleRate_Dev sample_rate,
- uint32_t sample_frame_count)
- : sample_rate_(sample_rate),
- sample_frame_count_(sample_frame_count) {
- if (has_interface<PPB_AudioConfig_Dev>()) {
- PassRefFromConstructor(
- get_interface<PPB_AudioConfig_Dev>()->CreateStereo16Bit(
- instance->pp_instance(), sample_rate, sample_frame_count));
- }
-}
-
-// static
-uint32_t AudioConfig_Dev::RecommendSampleFrameCount(
- uint32_t requested_sample_frame_count) {
- if (!has_interface<PPB_AudioConfig_Dev>())
- return 0;
- return get_interface<PPB_AudioConfig_Dev>()->
- RecommendSampleFrameCount(requested_sample_frame_count);
-}
-
-} // namespace pp
-
diff --git a/ppapi/cpp/dev/audio_config_dev.h b/ppapi/cpp/dev/audio_config_dev.h
deleted file mode 100644
index 64079f0..0000000
--- a/ppapi/cpp/dev/audio_config_dev.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PPAPI_CPP_DEV_AUDIO_CONFIG_DEV_H_
-#define PPAPI_CPP_DEV_AUDIO_CONFIG_DEV_H_
-
-#include "ppapi/c/dev/ppb_audio_config_dev.h"
-#include "ppapi/c/pp_stdint.h"
-#include "ppapi/cpp/resource.h"
-
-namespace pp {
-
-class Instance;
-
-// Typical usage:
-//
-// // Create an audio config with a supported frame count.
-// uint32_t sample_frame_count =
-// AudioConfig_Dev::RecommendSampleFrameCount(4096);
-// AudioConfig_Dev config(PP_AUDIOSAMPLERATE_44100, sample_frame_count);
-// if (config.is_null())
-// return false; // Couldn't configure audio.
-//
-// // Then use the config to create your audio resource.
-// Audio_dev audio(..., config, ...);
-// if (audio.is_null())
-// return false; // Couldn't create audio.
-class AudioConfig_Dev : public Resource {
- public:
- AudioConfig_Dev();
-
- // Creates an audio config based on the given sample rate and frame count.
- // If the rate and frame count aren't supported, the resulting resource
- // will be is_null(). Pass the result of RecommendSampleFrameCount as the
- // sample frame count.
- //
- // See PPB_AudioConfigDev.CreateStereo16Bit for more.
- AudioConfig_Dev(Instance* instance,
- PP_AudioSampleRate_Dev sample_rate,
- uint32_t sample_frame_count);
-
- // Returns a supported frame count for use in the constructor.
- //
- // See PPB_AudioConfigDev.RecommendSampleFrameCount.
- static uint32_t RecommendSampleFrameCount(
- uint32_t requested_sample_frame_count);
-
- PP_AudioSampleRate_Dev sample_rate() const { return sample_rate_; }
- uint32_t sample_frame_count() { return sample_frame_count_; }
-
- private:
- PP_AudioSampleRate_Dev sample_rate_;
- uint32_t sample_frame_count_;
-};
-
-} // namespace pp
-
-#endif // PPAPI_CPP_DEV_AUDIO_CONFIG_DEV_H_
-
diff --git a/ppapi/cpp/dev/audio_dev.cc b/ppapi/cpp/dev/audio_dev.cc
deleted file mode 100644
index b80d196..0000000
--- a/ppapi/cpp/dev/audio_dev.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/cpp/dev/audio_dev.h"
-
-#include "ppapi/cpp/module_impl.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_Audio_Dev>() {
- return PPB_AUDIO_DEV_INTERFACE;
-}
-
-} // namespace
-
-Audio_Dev::Audio_Dev(Instance* instance,
- const AudioConfig_Dev& config,
- PPB_Audio_Callback callback,
- void* user_data)
- : config_(config) {
- if (has_interface<PPB_Audio_Dev>()) {
- PassRefFromConstructor(get_interface<PPB_Audio_Dev>()->Create(
- instance->pp_instance(), config.pp_resource(), callback, user_data));
- }
-}
-
-bool Audio_Dev::StartPlayback() {
- return has_interface<PPB_Audio_Dev>() &&
- get_interface<PPB_Audio_Dev>()->StartPlayback(pp_resource());
-}
-
-bool Audio_Dev::StopPlayback() {
- return has_interface<PPB_Audio_Dev>() &&
- get_interface<PPB_Audio_Dev>()->StopPlayback(pp_resource());
-}
-
-} // namespace pp
-
diff --git a/ppapi/cpp/dev/audio_dev.h b/ppapi/cpp/dev/audio_dev.h
deleted file mode 100644
index a355cb6..0000000
--- a/ppapi/cpp/dev/audio_dev.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PPAPI_CPP_DEV_AUDIO_DEV_H_
-#define PPAPI_CPP_DEV_AUDIO_DEV_H_
-
-#include "ppapi/c/pp_stdint.h"
-#include "ppapi/c/dev/ppb_audio_dev.h"
-#include "ppapi/cpp/dev/audio_config_dev.h"
-#include "ppapi/cpp/dev/buffer_dev.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/resource.h"
-
-namespace pp {
-
-class Audio_Dev : public Resource {
- public:
- Audio_Dev() {}
- Audio_Dev(Instance* instance,
- const AudioConfig_Dev& config,
- PPB_Audio_Callback callback,
- void* user_data);
-
- AudioConfig_Dev& config() { return config_; }
- const AudioConfig_Dev& config() const { return config_; }
-
- bool StartPlayback();
- bool StopPlayback();
-
- private:
- AudioConfig_Dev config_;
-};
-
-} // namespace pp
-
-#endif // PPAPI_CPP_DEV_AUDIO_DEV_H_
-