Commit Graph

3 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
eb1fde4a26 Injectable audio encoders: Moved audio encoder, factory and builtin factory to api/.
Plumbed AudioEncoderFactory up into CreatePeerConnectionFactory.

BUG=webrtc:5806

Review-Url: https://codereview.webrtc.org/2799033006
Cr-Commit-Position: refs/heads/master@{#17977}
2017-05-02 13:46:30 +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