diff --git a/api/neteq/neteq_controller.h b/api/neteq/neteq_controller.h index 1d47eaca78..9cad41515c 100644 --- a/api/neteq/neteq_controller.h +++ b/api/neteq/neteq_controller.h @@ -152,7 +152,15 @@ class NetEqController { virtual void AddSampleMemory(int32_t value) = 0; // Returns the target buffer level in ms. - virtual int TargetLevelMs() = 0; + // TODO(bugs.webrtc.org/11622): Delete the non-const version and default + // implementation, once downstream code is updated. + virtual int TargetLevelMs() { + return const_cast(this)->TargetLevelMs(); + } + + virtual int TargetLevelMs() const { + return const_cast(this)->TargetLevelMs(); + } // Notify the NetEqController that a packet has arrived. Returns the relative // arrival delay, if it can be computed.