Commit Graph

5 Commits

Author SHA1 Message Date
36b1a5fcec Add mute state field to AudioFrame and switch some callers to use it. Also make AudioFrame::data_ private and instead provide:
const int16_t* data() const;
int16_t* mutable_data();

- data() returns a zeroed static buffer on muted frames (to avoid unnecessary zeroing of the member buffer) and directly returns AudioFrame::data_ on unmuted frames.
- mutable_data(), lazily zeroes AudioFrame::data_ if the frame is currently muted, sets muted=false, and returns AudioFrame::data_.

These accessors serve to "force" callers to be aware of the mute state field, i.e. lazy zeroing is not the primary motivation.

This change only optimizes handling of muted frames where it is somewhat trivial to do so. Other improvements requiring more significant structural changes will come later.

BUG=webrtc:7343
TBR=henrika

Review-Url: https://codereview.webrtc.org/2750783004
Cr-Commit-Position: refs/heads/master@{#18543}
2017-06-12 19:45:32 +00:00
65cb70d939 Fix cyclic deps: rent_a_codec<->audio_coding and rent_a_codec<->neteq
In short, what I did was to

  * Remove acm_common_defs.h (the stuff in it was used only by
    acm_codec_database.cc).

  * Move audio_coding_module_typedefs.h to a new build target.

  * Move the NetEqDecoder enum (and the associated
    NetEqDecoderToSdpAudioFormat function) to a new file in a new
    build target.

BUG=webrtc:7243, webrtc:7244

Review-Url: https://codereview.webrtc.org/2723253005
Cr-Commit-Position: refs/heads/master@{#17005}
2017-03-03 14:16:28 +00:00
087bd34d23 Move AudioDecoder and related stuff to the api/ directory
BUG=webrtc:5805, webrtc:6725

Review-Url: https://codereview.webrtc.org/2668523004
Cr-Commit-Position: refs/heads/master@{#16534}
2017-02-10 16:15:44 +00:00
26bddb92f0 Replace test_support_main by test_main and get rid of test_support_main_threaded_mac
test_support_main_threaded_mac doesn't seem to be used. It looks like it was
last used about a year and a half ago, and was removed in
https://webrtc-codereview.appspot.com/55379004

BUG=webrtc:6424
R=kjellander@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2540693002
Cr-Commit-Position: refs/heads/master@{#15332}
2016-11-30 14:12:10 +00:00
2504c0a91c Drop _oldapi from ACM test file names
Updating GN files, include paths, and include guards

BUG=None
NOTRY=True
NOPRESUBMIT=true

Review-Url: https://codereview.webrtc.org/2387113005
Cr-Commit-Position: refs/heads/master@{#14542}
2016-10-06 08:31:38 +00:00