OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_SOUND_NULLSOUNDSYSTEM_H_ | 11 #ifndef WEBRTC_SOUND_NULLSOUNDSYSTEM_H_ |
12 #define WEBRTC_SOUND_NULLSOUNDSYSTEM_H_ | 12 #define WEBRTC_SOUND_NULLSOUNDSYSTEM_H_ |
13 | 13 |
14 #include "webrtc/sound/soundsysteminterface.h" | 14 #include "webrtc/sound/soundsysteminterface.h" |
15 | 15 |
16 namespace rtc { | 16 namespace rtc { |
17 | 17 |
18 class SoundDeviceLocator; | 18 class SoundDeviceLocator; |
19 class SoundInputStreamInterface; | 19 class SoundInputStreamInterface; |
20 class SoundOutputStreamInterface; | 20 class SoundOutputStreamInterface; |
21 | 21 |
22 // A simple reference sound system that drops output samples and generates | 22 // A simple reference sound system that drops output samples and generates |
23 // no input samples. | 23 // no input samples. |
24 class NullSoundSystem : public SoundSystemInterface { | 24 class NullSoundSystem : public SoundSystemInterface { |
25 public: | 25 public: |
26 static SoundSystemInterface *Create() { | 26 static SoundSystemInterface *Create() { |
27 return new NullSoundSystem(); | 27 return new NullSoundSystem(); |
28 } | 28 } |
29 | 29 |
30 virtual ~NullSoundSystem(); | 30 ~NullSoundSystem() override; |
31 | 31 |
32 virtual bool Init(); | 32 bool Init() override; |
33 virtual void Terminate(); | 33 void Terminate() override; |
34 | 34 |
35 virtual bool EnumeratePlaybackDevices(SoundDeviceLocatorList *devices); | 35 bool EnumeratePlaybackDevices(SoundDeviceLocatorList *devices) override; |
36 virtual bool EnumerateCaptureDevices(SoundDeviceLocatorList *devices); | 36 bool EnumerateCaptureDevices(SoundDeviceLocatorList *devices) override; |
37 | 37 |
38 virtual SoundOutputStreamInterface *OpenPlaybackDevice( | 38 SoundOutputStreamInterface *OpenPlaybackDevice( |
39 const SoundDeviceLocator *device, | 39 const SoundDeviceLocator *device, |
40 const OpenParams ¶ms); | 40 const OpenParams ¶ms) override; |
41 virtual SoundInputStreamInterface *OpenCaptureDevice( | 41 SoundInputStreamInterface *OpenCaptureDevice( |
42 const SoundDeviceLocator *device, | 42 const SoundDeviceLocator *device, |
43 const OpenParams ¶ms); | 43 const OpenParams ¶ms) override; |
44 | 44 |
45 virtual bool GetDefaultPlaybackDevice(SoundDeviceLocator **device); | 45 bool GetDefaultPlaybackDevice(SoundDeviceLocator **device) override; |
46 virtual bool GetDefaultCaptureDevice(SoundDeviceLocator **device); | 46 bool GetDefaultCaptureDevice(SoundDeviceLocator **device) override; |
47 | 47 |
48 virtual const char *GetName() const; | 48 const char *GetName() const override; |
49 }; | 49 }; |
50 | 50 |
51 } // namespace rtc | 51 } // namespace rtc |
52 | 52 |
53 #endif // WEBRTC_SOUND_NULLSOUNDSYSTEM_H_ | 53 #endif // WEBRTC_SOUND_NULLSOUNDSYSTEM_H_ |
OLD | NEW |