Add "tones remaining" argument to DTMF ontonechange callback
Bug: webrtc:9725
Change-Id: I2ad3e57d7357a9bd7cfbfa675df36ec66ff7c851
Reviewed-on: https://webrtc-review.googlesource.com/98361
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24633}
diff --git a/api/dtmfsenderinterface.h b/api/dtmfsenderinterface.h
index b79bb31..d8714f5 100644
--- a/api/dtmfsenderinterface.h
+++ b/api/dtmfsenderinterface.h
@@ -26,7 +26,14 @@
// Triggered when DTMF |tone| is sent.
// If |tone| is empty that means the DtmfSender has sent out all the given
// tones.
- virtual void OnToneChange(const std::string& tone) = 0;
+ // The callback includes the state of the tone buffer at the time when
+ // the tone finished playing.
+ virtual void OnToneChange(const std::string& tone,
+ const std::string& tone_buffer) {}
+ // DEPRECATED: Older API without tone buffer.
+ // TODO(bugs.webrtc.org/9725): Remove old API and default implementation
+ // when old callers are gone.
+ virtual void OnToneChange(const std::string& tone) {}
protected:
virtual ~DtmfSenderObserverInterface() = default;