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

Unified Diff: webrtc/sound/nullsoundsystem.cc

Issue 1715043002: Remove webrtc/sound/ subdir. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@remove_devicemanager
Patch Set: rebase Created 4 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/sound/nullsoundsystem.h ('k') | webrtc/sound/nullsoundsystemfactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sound/nullsoundsystem.cc
diff --git a/webrtc/sound/nullsoundsystem.cc b/webrtc/sound/nullsoundsystem.cc
deleted file mode 100644
index 6f908c9fc34f90d12182dd54907485bd96954750..0000000000000000000000000000000000000000
--- a/webrtc/sound/nullsoundsystem.cc
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright 2004 The WebRTC Project Authors. All rights reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/sound/nullsoundsystem.h"
-
-#include "webrtc/sound/sounddevicelocator.h"
-#include "webrtc/sound/soundinputstreaminterface.h"
-#include "webrtc/sound/soundoutputstreaminterface.h"
-#include "webrtc/base/logging.h"
-
-namespace rtc {
-class Thread;
-}
-
-namespace rtc {
-
-// Name used for the single device and the sound system itself.
-static const char kNullName[] = "null";
-
-class NullSoundDeviceLocator : public SoundDeviceLocator {
- public:
- NullSoundDeviceLocator() : SoundDeviceLocator(kNullName, kNullName) {}
-
- SoundDeviceLocator *Copy() const override {
- return new NullSoundDeviceLocator();
- }
-};
-
-class NullSoundInputStream : public SoundInputStreamInterface {
- public:
- bool StartReading() override {
- return true;
- }
-
- bool StopReading() override {
- return true;
- }
-
- bool GetVolume(int *volume) override {
- *volume = SoundSystemInterface::kMinVolume;
- return true;
- }
-
- bool SetVolume(int volume) override {
- return false;
- }
-
- bool Close() override {
- return true;
- }
-
- int LatencyUsecs() override {
- return 0;
- }
-};
-
-class NullSoundOutputStream : public SoundOutputStreamInterface {
- public:
- bool EnableBufferMonitoring() override {
- return true;
- }
-
- bool DisableBufferMonitoring() override {
- return true;
- }
-
- bool WriteSamples(const void *sample_data, size_t size) override {
- LOG(LS_VERBOSE) << "Got " << size << " bytes of playback samples";
- return true;
- }
-
- bool GetVolume(int *volume) override {
- *volume = SoundSystemInterface::kMinVolume;
- return true;
- }
-
- bool SetVolume(int volume) override {
- return false;
- }
-
- bool Close() override {
- return true;
- }
-
- int LatencyUsecs() override {
- return 0;
- }
-};
-
-NullSoundSystem::~NullSoundSystem() {
-}
-
-bool NullSoundSystem::Init() {
- return true;
-}
-
-void NullSoundSystem::Terminate() {
- // Nothing to do.
-}
-
-bool NullSoundSystem::EnumeratePlaybackDevices(
- SoundSystemInterface::SoundDeviceLocatorList *devices) {
- ClearSoundDeviceLocatorList(devices);
- SoundDeviceLocator *device;
- GetDefaultPlaybackDevice(&device);
- devices->push_back(device);
- return true;
-}
-
-bool NullSoundSystem::EnumerateCaptureDevices(
- SoundSystemInterface::SoundDeviceLocatorList *devices) {
- ClearSoundDeviceLocatorList(devices);
- SoundDeviceLocator *device;
- GetDefaultCaptureDevice(&device);
- devices->push_back(device);
- return true;
-}
-
-bool NullSoundSystem::GetDefaultPlaybackDevice(
- SoundDeviceLocator **device) {
- *device = new NullSoundDeviceLocator();
- return true;
-}
-
-bool NullSoundSystem::GetDefaultCaptureDevice(
- SoundDeviceLocator **device) {
- *device = new NullSoundDeviceLocator();
- return true;
-}
-
-SoundOutputStreamInterface *NullSoundSystem::OpenPlaybackDevice(
- const SoundDeviceLocator *device,
- const OpenParams &params) {
- return new NullSoundOutputStream();
-}
-
-SoundInputStreamInterface *NullSoundSystem::OpenCaptureDevice(
- const SoundDeviceLocator *device,
- const OpenParams &params) {
- return new NullSoundInputStream();
-}
-
-const char *NullSoundSystem::GetName() const {
- return kNullName;
-}
-
-} // namespace rtc
« no previous file with comments | « webrtc/sound/nullsoundsystem.h ('k') | webrtc/sound/nullsoundsystemfactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698