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