Reland of Add aecdump support to audioproc_f. (patchset #2 id:250001 of https://codereview.webrtc.org/1423693008/ )

Reason for revert:
Oh dear, this broke compilation.
I guess more was built on top of this CL before I reverted it.

Reverting now for futher investigation (and re-land using CQ)

Original issue's description:
> Revert of Add aecdump support to audioproc_f. (patchset #8 id:200001 of https://codereview.webrtc.org/1409943002/ )
>
> Reason for revert:
> This breaks iOS GYP generation as described on http://www.webrtc.org/native-code/ios
> I'm going to drive getting the build_with_libjingle=1 setting removed from the bots to match the official instructions.
>
> See https://code.google.com/p/webrtc/issues/detail?id=4653 for more context, as this is exactly what that issue tries to solve.
>
> Original issue's description:
> > Add aecdump support to audioproc_f.
> >
> > Add a new interface to abstract away file operations. This CL temporarily
> > removes support for dumping the output of reverse streams. It will be easy to
> > restore in the new framework, although we may decide to only allow it with
> > the aecdump format.
> >
> > We also now require the user to specify the output format, rather than
> > defaulting to the input format.
> >
> > TEST=Bit-exact output to the previous audioproc_f version using an input wav
> > file, and to the legacy audioproc using an aecdump file.
> >
> > Committed: https://crrev.com/bdafe31b86e9819b0adb9041f87e6194b7422b08
> > Cr-Commit-Position: refs/heads/master@{#10460}
>
> TBR=aluebs@webrtc.org,peah@webrtc.org,andrew@webrtc.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/d279941bb54bfdc6e7324bf36cac76581474b96d
> Cr-Commit-Position: refs/heads/master@{#10523}

TBR=aluebs@webrtc.org,peah@webrtc.org,andrew@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.webrtc.org/1419953010

Cr-Commit-Position: refs/heads/master@{#10524}
This commit is contained in:
kjellander
2015-11-05 06:23:02 -08:00
committed by Commit bot
parent d279941bb5
commit 86b40506b3
10 changed files with 463 additions and 160 deletions

View File

@ -43,6 +43,35 @@ class RawFile final {
RTC_DISALLOW_COPY_AND_ASSIGN(RawFile);
};
// Reads ChannelBuffers from a provided WavReader.
class ChannelBufferWavReader final {
public:
explicit ChannelBufferWavReader(rtc::scoped_ptr<WavReader> file);
// Reads data from the file according to the |buffer| format. Returns false if
// a full buffer can't be read from the file.
bool Read(ChannelBuffer<float>* buffer);
private:
rtc::scoped_ptr<WavReader> file_;
std::vector<float> interleaved_;
RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavReader);
};
// Writes ChannelBuffers to a provided WavWriter.
class ChannelBufferWavWriter final {
public:
explicit ChannelBufferWavWriter(rtc::scoped_ptr<WavWriter> file);
void Write(const ChannelBuffer<float>& buffer);
private:
rtc::scoped_ptr<WavWriter> file_;
std::vector<float> interleaved_;
RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavWriter);
};
void WriteIntData(const int16_t* data,
size_t length,
WavWriter* wav_file,
@ -118,6 +147,9 @@ std::vector<T> ParseList(const std::string& to_parse) {
std::vector<Point> ParseArrayGeometry(const std::string& mic_positions,
size_t num_mics);
// Same as above, but without the num_mics check for when it isn't available.
std::vector<Point> ParseArrayGeometry(const std::string& mic_positions);
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_