166a358217004e1580453e46ce99041533e994985henrike@webrtc.org/*
266a358217004e1580453e46ce99041533e994985henrike@webrtc.org *  Copyright 2004 The WebRTC Project Authors. All rights reserved.
366a358217004e1580453e46ce99041533e994985henrike@webrtc.org *
466a358217004e1580453e46ce99041533e994985henrike@webrtc.org *  Use of this source code is governed by a BSD-style license
566a358217004e1580453e46ce99041533e994985henrike@webrtc.org *  that can be found in the LICENSE file in the root of the source
666a358217004e1580453e46ce99041533e994985henrike@webrtc.org *  tree. An additional intellectual property rights grant can be found
766a358217004e1580453e46ce99041533e994985henrike@webrtc.org *  in the file PATENTS.  All contributing project authors may
866a358217004e1580453e46ce99041533e994985henrike@webrtc.org *  be found in the AUTHORS file in the root of the source tree.
966a358217004e1580453e46ce99041533e994985henrike@webrtc.org */
1066a358217004e1580453e46ce99041533e994985henrike@webrtc.org
1166a358217004e1580453e46ce99041533e994985henrike@webrtc.org#ifndef WEBRTC_SOUND_NULLSOUNDSYSTEM_H_
1266a358217004e1580453e46ce99041533e994985henrike@webrtc.org#define WEBRTC_SOUND_NULLSOUNDSYSTEM_H_
1366a358217004e1580453e46ce99041533e994985henrike@webrtc.org
1466a358217004e1580453e46ce99041533e994985henrike@webrtc.org#include "webrtc/sound/soundsysteminterface.h"
1566a358217004e1580453e46ce99041533e994985henrike@webrtc.org
1666a358217004e1580453e46ce99041533e994985henrike@webrtc.orgnamespace rtc {
1766a358217004e1580453e46ce99041533e994985henrike@webrtc.org
1866a358217004e1580453e46ce99041533e994985henrike@webrtc.orgclass SoundDeviceLocator;
1966a358217004e1580453e46ce99041533e994985henrike@webrtc.orgclass SoundInputStreamInterface;
2066a358217004e1580453e46ce99041533e994985henrike@webrtc.orgclass SoundOutputStreamInterface;
2166a358217004e1580453e46ce99041533e994985henrike@webrtc.org
2266a358217004e1580453e46ce99041533e994985henrike@webrtc.org// A simple reference sound system that drops output samples and generates
2366a358217004e1580453e46ce99041533e994985henrike@webrtc.org// no input samples.
2466a358217004e1580453e46ce99041533e994985henrike@webrtc.orgclass NullSoundSystem : public SoundSystemInterface {
2566a358217004e1580453e46ce99041533e994985henrike@webrtc.org public:
2666a358217004e1580453e46ce99041533e994985henrike@webrtc.org  static SoundSystemInterface *Create() {
2766a358217004e1580453e46ce99041533e994985henrike@webrtc.org    return new NullSoundSystem();
2866a358217004e1580453e46ce99041533e994985henrike@webrtc.org  }
2966a358217004e1580453e46ce99041533e994985henrike@webrtc.org
30a35ae7f507cc4e909dd4253106c97528db315adbtfarina  ~NullSoundSystem() override;
3166a358217004e1580453e46ce99041533e994985henrike@webrtc.org
32a35ae7f507cc4e909dd4253106c97528db315adbtfarina  bool Init() override;
33a35ae7f507cc4e909dd4253106c97528db315adbtfarina  void Terminate() override;
3466a358217004e1580453e46ce99041533e994985henrike@webrtc.org
35a35ae7f507cc4e909dd4253106c97528db315adbtfarina  bool EnumeratePlaybackDevices(SoundDeviceLocatorList *devices) override;
36a35ae7f507cc4e909dd4253106c97528db315adbtfarina  bool EnumerateCaptureDevices(SoundDeviceLocatorList *devices) override;
3766a358217004e1580453e46ce99041533e994985henrike@webrtc.org
38a35ae7f507cc4e909dd4253106c97528db315adbtfarina  SoundOutputStreamInterface *OpenPlaybackDevice(
3966a358217004e1580453e46ce99041533e994985henrike@webrtc.org      const SoundDeviceLocator *device,
40a35ae7f507cc4e909dd4253106c97528db315adbtfarina      const OpenParams &params) override;
41a35ae7f507cc4e909dd4253106c97528db315adbtfarina  SoundInputStreamInterface *OpenCaptureDevice(
4266a358217004e1580453e46ce99041533e994985henrike@webrtc.org      const SoundDeviceLocator *device,
43a35ae7f507cc4e909dd4253106c97528db315adbtfarina      const OpenParams &params) override;
4466a358217004e1580453e46ce99041533e994985henrike@webrtc.org
45a35ae7f507cc4e909dd4253106c97528db315adbtfarina  bool GetDefaultPlaybackDevice(SoundDeviceLocator **device) override;
46a35ae7f507cc4e909dd4253106c97528db315adbtfarina  bool GetDefaultCaptureDevice(SoundDeviceLocator **device) override;
4766a358217004e1580453e46ce99041533e994985henrike@webrtc.org
48a35ae7f507cc4e909dd4253106c97528db315adbtfarina  const char *GetName() const override;
4966a358217004e1580453e46ce99041533e994985henrike@webrtc.org};
5066a358217004e1580453e46ce99041533e994985henrike@webrtc.org
5166a358217004e1580453e46ce99041533e994985henrike@webrtc.org}  // namespace rtc
5266a358217004e1580453e46ce99041533e994985henrike@webrtc.org
5366a358217004e1580453e46ce99041533e994985henrike@webrtc.org#endif  // WEBRTC_SOUND_NULLSOUNDSYSTEM_H_
54