Remove testonly from unpack_aecdump.
This CL duplicates a few lines of utility code from //modules/audio_processing:audioproc_test_utils (which contains more testonly things) and allows the possibility to remove testonly from the unpack_aecdump tool. Bug: b/237526033 Change-Id: If2e1dd4cc825429c496091cf8640c67069fb6e6f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267701 Reviewed-by: Per Åhgren <peah@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37437}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
6939f63ca1
commit
2ad75b3956
@ -29,21 +29,6 @@ namespace webrtc {
|
||||
static const AudioProcessing::Error kNoErr = AudioProcessing::kNoError;
|
||||
#define EXPECT_NOERR(expr) EXPECT_EQ(kNoErr, (expr))
|
||||
|
||||
class RawFile final {
|
||||
public:
|
||||
explicit RawFile(const std::string& filename);
|
||||
~RawFile();
|
||||
|
||||
RawFile(const RawFile&) = delete;
|
||||
RawFile& operator=(const RawFile&) = delete;
|
||||
|
||||
void WriteSamples(const int16_t* samples, size_t num_samples);
|
||||
void WriteSamples(const float* samples, size_t num_samples);
|
||||
|
||||
private:
|
||||
FILE* file_handle_;
|
||||
};
|
||||
|
||||
// Encapsulates samples and metadata for an integer frame.
|
||||
struct Int16FrameData {
|
||||
// Max data size that matches the data size of the AudioFrame class, providing
|
||||
@ -126,17 +111,6 @@ class ChannelBufferVectorWriter final {
|
||||
std::vector<float>* output_;
|
||||
};
|
||||
|
||||
void WriteIntData(const int16_t* data,
|
||||
size_t length,
|
||||
WavWriter* wav_file,
|
||||
RawFile* raw_file);
|
||||
|
||||
void WriteFloatData(const float* const* data,
|
||||
size_t samples_per_channel,
|
||||
size_t num_channels,
|
||||
WavWriter* wav_file,
|
||||
RawFile* raw_file);
|
||||
|
||||
// Exits on failure; do not use in unit tests.
|
||||
FILE* OpenFile(const std::string& filename, const char* mode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user