| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license | |
| 5 * that can be found in the LICENSE file in the root of the source | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_SOUND_SOUNDSYSTEMPROXY_H_ | |
| 12 #define WEBRTC_SOUND_SOUNDSYSTEMPROXY_H_ | |
| 13 | |
| 14 #include "webrtc/sound/soundsysteminterface.h" | |
| 15 #include "webrtc/base/basictypes.h" // for NULL | |
| 16 | |
| 17 namespace rtc { | |
| 18 | |
| 19 // A SoundSystemProxy is a sound system that defers to another one. | |
| 20 // Init(), Terminate(), and GetName() are left as pure virtual, so a sub-class | |
| 21 // must define them. | |
| 22 class SoundSystemProxy : public SoundSystemInterface { | |
| 23 public: | |
| 24 SoundSystemProxy() : wrapped_(NULL) {} | |
| 25 | |
| 26 // Each of these methods simply defers to wrapped_ if non-NULL, else fails. | |
| 27 | |
| 28 bool EnumeratePlaybackDevices(SoundDeviceLocatorList *devices) override; | |
| 29 bool EnumerateCaptureDevices(SoundDeviceLocatorList *devices) override; | |
| 30 | |
| 31 bool GetDefaultPlaybackDevice(SoundDeviceLocator **device) override; | |
| 32 bool GetDefaultCaptureDevice(SoundDeviceLocator **device) override; | |
| 33 | |
| 34 SoundOutputStreamInterface *OpenPlaybackDevice( | |
| 35 const SoundDeviceLocator *device, | |
| 36 const OpenParams ¶ms) override; | |
| 37 SoundInputStreamInterface *OpenCaptureDevice( | |
| 38 const SoundDeviceLocator *device, | |
| 39 const OpenParams ¶ms) override; | |
| 40 | |
| 41 protected: | |
| 42 SoundSystemInterface *wrapped_; | |
| 43 }; | |
| 44 | |
| 45 } // namespace rtc | |
| 46 | |
| 47 #endif // WEBRTC_SOUND_SOUNDSYSTEMPROXY_H_ | |
| OLD | NEW |