Make NetEqController::TargetLevelMs method const

This method is used by GetStats, and hence must not modify any state.

This cl is step one of the api change, the non-const version of the
method can be deleted once downstream implementations of this
interface are updated.

Bug: webrtc:11622
Change-Id: Icfaccee6bc918ac5c8a39dd2567a1081e342e9e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183881
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32072}
diff --git a/api/neteq/neteq_controller.h b/api/neteq/neteq_controller.h
index 1d47eac..9cad415 100644
--- a/api/neteq/neteq_controller.h
+++ b/api/neteq/neteq_controller.h
@@ -152,7 +152,15 @@
   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<const NetEqController*>(this)->TargetLevelMs();
+  }
+
+  virtual int TargetLevelMs() const {
+    return const_cast<NetEqController*>(this)->TargetLevelMs();
+  }
 
   // Notify the NetEqController that a packet has arrived. Returns the relative
   // arrival delay, if it can be computed.