You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix generating audio files that are a teeny tiny bit longer than the original (#16)
* Respect SampleCount metadata when rebuilding ogg files
Since Vorbis blocks are always one of two possible sizes, a Vorbis
container needs some other field to hold the actual number of samples in
the audio file. This change essentially copies the SampleCount FSB
metadata field to the ogg output.
* Respect SampleCount metadata when rebuilding wav files
FSB PCM files appear to be padded with zeroes, meaning the correct
number of samples to copy is the SampleCount value instead of just the
rest of the file.
Copy file name to clipboardExpand all lines: Fmod5Sharp/FmodTypes/FmodSampleMetadata.cs
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,12 @@ public class FmodSampleMetadata : IBinaryReadable
9
9
{
10
10
internalboolHasAnyChunks;
11
11
internaluintFrequencyId;
12
-
internalulongDataOffset;
12
+
internaluintDataOffset;
13
13
internalList<FmodSampleChunk>Chunks=new();
14
14
internalintNumChannels;
15
15
16
16
publicboolIsStereo;
17
-
publiculongSampleCount;
17
+
publicuintSampleCount;
18
18
19
19
publicintFrequency=>FsbLoader.Frequencies.TryGetValue(FrequencyId,outvaractualFrequency)?actualFrequency:(int)FrequencyId;//If set by FREQUENCY chunk, id is actual frequency
0 commit comments