Merge lp:~vicamo/telephony-service/send-stop-tone-at-last into lp:telephony-service
Status: | Merged |
---|---|
Approved by: | Gustavo Pichorim Boiko |
Approved revision: | 1043 |
Merged at revision: | 1059 |
Proposed branch: | lp:~vicamo/telephony-service/send-stop-tone-at-last |
Merge into: | lp:telephony-service |
Diff against target: |
38 lines (+6/-10) 1 file modified
libtelephonyservice/tonegenerator.cpp (+6/-10) |
To merge this branch: | bzr merge lp:~vicamo/telephony-service/send-stop-tone-at-last |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gustavo Pichorim Boiko (community) | Approve | ||
Review via email: mp+248214@code.launchpad.net |
Commit message
Class ToneGenerator creates a oneshot timer to keep track of when to send a StopTone req after successfully sending a StartEventTone one. However, when playDTMFTone() is called the second time within the timeout interval (0.2s), it's currently completely ignored and no tone will ever be generated. As a result, when someone presses dialpad buttons very quickly, some of them sound missed because not each of them is accompanied by a DTMF tone.
This patch changes the behavior as: for each playDTMFTone() call, send a StartEventTone and (re)start the timer. This way, every dialpad press causes a DTMF tone being generated and the longest duration of each tone is still 0.2 second.
Description of the change
Class ToneGenerator creates a oneshot timer to keep track of when to send a StopTone req after successfully sending a StartEventTone one. However, when playDTMFTone() is called the second time within the timeout interval (0.2s), it's currently completely ignored and no tone will ever be generated. As a result, when someone presses dialpad buttons very quickly, some of them sound missed because not each of them is accompanied by a DTMF tone.
This patch changes the behavior as: for each playDTMFTone() call, send a StartEventTone and (re)start the timer. This way, every dialpad press causes a DTMF tone being generated and the longest duration of each tone is still 0.2 second.
Any comments?