argh, may be better to just divide by 100 instead of 104 ...

still not sure WHY it needed?

24-bit raw PCM still broken ..:(

On Fri, Jan 19, 2024 at 6:32 PM Andrew Randrianasulu
<[email protected]> wrote:
>
> try andy dv test file, render only audio as Big Endian, Signed, 16 bits.
>
> Load it back and watch too loud audio.
>
> note: wav file not tested
From 2fddf7e23d61879883740c9e07ec7b062b87ee2b Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <[email protected]>
Date: Fri, 19 Jan 2024 20:07:08 +0300
Subject: [PATCH 2/2] Filesndfile - /1024 was too much, /100 works better?

---
 cinelerra-5.1/cinelerra/filesndfile.C | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cinelerra-5.1/cinelerra/filesndfile.C b/cinelerra-5.1/cinelerra/filesndfile.C
index f4b15386..516b0972 100644
--- a/cinelerra-5.1/cinelerra/filesndfile.C
+++ b/cinelerra-5.1/cinelerra/filesndfile.C
@@ -346,7 +346,8 @@ int FileSndFile::write_samples(double **buffer, int64_t len)
 //if(sample > 1.0 || sample < -1.0) printf("FileSndFile::write_samples %f\n", sample);
 //printf("FileSndFile::write_samples %d %d\n", asset->bits, BITSFLOAT);
 			if(asset->bits != BITSFLOAT) CLAMP(sample, -1.0, (32767.0 / 32768.0));
-			temp_double[j * asset->channels + i] = sample/1024;
+			if(asset->format == FILE_PCM && asset->bits == BITSLINEAR16) sample = sample/100;
+			temp_double[j * asset->channels + i] = sample;
 		}
 	}
 
-- 
2.35.8

-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to