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

Unified Diff: webrtc/modules/audio_mixer/audio_mixer_defines.h

Issue 2302483002: Style changes in Audio Mixer (Closed)
Patch Set: Includes and order of includes. Created 4 years, 3 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
Index: webrtc/modules/audio_mixer/audio_mixer_defines.h
diff --git a/webrtc/modules/audio_mixer/audio_mixer_defines.h b/webrtc/modules/audio_mixer/audio_mixer_defines.h
index b8d7234cf7e6b1d257c7a372065b4839bade705d..74b37d8f41dc22fb2cf74b4f78ad082285a54939 100644
--- a/webrtc/modules/audio_mixer/audio_mixer_defines.h
+++ b/webrtc/modules/audio_mixer/audio_mixer_defines.h
@@ -11,12 +11,34 @@
#ifndef WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_DEFINES_H_
#define WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_DEFINES_H_
+#include <memory>
+
#include "webrtc/base/checks.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/typedefs.h"
namespace webrtc {
-class NewMixHistory;
+
+class NewMixHistory {
+ public:
+ NewMixHistory();
+ ~NewMixHistory();
+
+ // Returns true if the audio source is being mixed.
+ bool IsMixed() const;
+
+ // Returns true if the audio source was mixed previous mix
+ // iteration.
+ bool WasMixed() const;
+
+ // Updates the mixed status.
+ int32_t SetIsMixed(bool mixed);
+
+ void ResetMixedStatus();
+
+ private:
+ bool is_mixed_;
+};
// A callback class that all mixer participants must inherit from/implement.
class MixerAudioSource {
@@ -46,7 +68,7 @@ class MixerAudioSource {
// Returns true if the participant was mixed this mix iteration.
bool IsMixed() const;
- NewMixHistory* mix_history_;
+ std::unique_ptr<NewMixHistory> mix_history_;
protected:
MixerAudioSource();

Powered by Google App Engine
This is Rietveld 408576698