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

Side by Side Diff: webrtc/modules/audio_mixer/audio_mixer_defines.h

Issue 2396483002: Made MixerAudioSource a pure interface. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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
(...skipping 26 matching lines...) Expand all
37 37
38 // The implementation of GetAudioFrameWithMuted should update 38 // The implementation of GetAudioFrameWithMuted should update
39 // audio_frame with new audio every time it's called. Implementing 39 // audio_frame with new audio every time it's called. Implementing
40 // classes are allowed to return the same AudioFrame pointer on 40 // classes are allowed to return the same AudioFrame pointer on
41 // different calls. The pointer must stay valid until the next 41 // different calls. The pointer must stay valid until the next
42 // mixing call or until this audio source is disconnected from the 42 // mixing call or until this audio source is disconnected from the
43 // mixer. 43 // mixer.
44 virtual AudioFrameWithMuted GetAudioFrameWithMuted(int32_t id, 44 virtual AudioFrameWithMuted GetAudioFrameWithMuted(int32_t id,
45 int sample_rate_hz) = 0; 45 int sample_rate_hz) = 0;
46 46
47 // Returns true if the audio source was mixed this mix iteration.
48 bool IsMixed() const;
49
50 // Returns true if the audio source was mixed previous mix
51 // iteration.
52 bool WasMixed() const;
53
54 // Updates the mixed status.
55 int32_t SetIsMixed(bool mixed);
56
57 void ResetMixedStatus();
58
59 private:
60 bool is_mixed_;
61
62 protected: 47 protected:
63 MixerAudioSource(); 48 MixerAudioSource();
64 virtual ~MixerAudioSource(); 49 virtual ~MixerAudioSource();
the sun 2016/10/04 20:36:09 - Remove ctor. - Make the dtor inline and move to
aleloi 2016/10/05 15:18:18 I don't understand what you mean by moving the dto
the sun 2016/10/05 19:32:10 A protected virtual destructor means that the obje
aleloi 2016/10/06 09:26:12 I see. Good point!
65 }; 50 };
66 } // namespace webrtc 51 } // namespace webrtc
67 52
68 #endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_DEFINES_H_ 53 #endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698