|
|
73cc96 |
diff -up firefox-102.0/third_party/libwebrtc/common_audio/wav_file.cc.big-endian-errors firefox-102.0/third_party/libwebrtc/common_audio/wav_file.cc
|
|
|
73cc96 |
--- firefox-102.0/third_party/libwebrtc/common_audio/wav_file.cc.big-endian-errors 2022-08-17 13:19:53.056891028 +0200
|
|
|
73cc96 |
+++ firefox-102.0/third_party/libwebrtc/common_audio/wav_file.cc 2022-08-17 13:19:57.251879556 +0200
|
|
|
73cc96 |
@@ -89,9 +89,6 @@ void WavReader::Reset() {
|
|
|
73cc96 |
|
|
|
73cc96 |
size_t WavReader::ReadSamples(const size_t num_samples,
|
|
|
73cc96 |
int16_t* const samples) {
|
|
|
73cc96 |
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
|
|
73cc96 |
-#error "Need to convert samples to big-endian when reading from WAV file"
|
|
|
73cc96 |
-#endif
|
|
|
73cc96 |
|
|
|
73cc96 |
size_t num_samples_left_to_read = num_samples;
|
|
|
73cc96 |
size_t next_chunk_start = 0;
|
|
|
73cc96 |
@@ -129,9 +126,6 @@ size_t WavReader::ReadSamples(const size
|
|
|
73cc96 |
}
|
|
|
73cc96 |
|
|
|
73cc96 |
size_t WavReader::ReadSamples(const size_t num_samples, float* const samples) {
|
|
|
73cc96 |
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
|
|
73cc96 |
-#error "Need to convert samples to big-endian when reading from WAV file"
|
|
|
73cc96 |
-#endif
|
|
|
73cc96 |
|
|
|
73cc96 |
size_t num_samples_left_to_read = num_samples;
|
|
|
73cc96 |
size_t next_chunk_start = 0;
|
|
|
73cc96 |
@@ -213,9 +207,6 @@ WavWriter::WavWriter(FileWrapper file,
|
|
|
73cc96 |
}
|
|
|
73cc96 |
|
|
|
73cc96 |
void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) {
|
|
|
73cc96 |
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
|
|
73cc96 |
-#error "Need to convert samples to little-endian when writing to WAV file"
|
|
|
73cc96 |
-#endif
|
|
|
73cc96 |
|
|
|
73cc96 |
for (size_t i = 0; i < num_samples; i += kMaxChunksize) {
|
|
|
73cc96 |
const size_t num_remaining_samples = num_samples - i;
|
|
|
73cc96 |
@@ -243,9 +234,6 @@ void WavWriter::WriteSamples(const int16
|
|
|
73cc96 |
}
|
|
|
73cc96 |
|
|
|
73cc96 |
void WavWriter::WriteSamples(const float* samples, size_t num_samples) {
|
|
|
73cc96 |
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
|
|
73cc96 |
-#error "Need to convert samples to little-endian when writing to WAV file"
|
|
|
73cc96 |
-#endif
|
|
|
73cc96 |
|
|
|
73cc96 |
for (size_t i = 0; i < num_samples; i += kMaxChunksize) {
|
|
|
73cc96 |
const size_t num_remaining_samples = num_samples - i;
|
|
|
73cc96 |
diff -up firefox-102.0/third_party/libwebrtc/common_audio/wav_header.cc.big-endian-errors firefox-102.0/third_party/libwebrtc/common_audio/wav_header.cc
|
|
|
73cc96 |
--- firefox-102.0/third_party/libwebrtc/common_audio/wav_header.cc.big-endian-errors 2022-08-17 13:18:04.688187393 +0200
|
|
|
73cc96 |
+++ firefox-102.0/third_party/libwebrtc/common_audio/wav_header.cc 2022-08-17 13:18:22.451138816 +0200
|
|
|
73cc96 |
@@ -26,10 +26,6 @@
|
|
|
73cc96 |
namespace webrtc {
|
|
|
73cc96 |
namespace {
|
|
|
73cc96 |
|
|
|
73cc96 |
-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
|
|
|
73cc96 |
-#error "Code not working properly for big endian platforms."
|
|
|
73cc96 |
-#endif
|
|
|
73cc96 |
-
|
|
|
73cc96 |
#pragma pack(2)
|
|
|
73cc96 |
struct ChunkHeader {
|
|
|
73cc96 |
uint32_t ID;
|