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