Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound duration #39

Open
sergeevabc opened this issue Mar 2, 2024 · 3 comments
Open

Sound duration #39

sergeevabc opened this issue Mar 2, 2024 · 3 comments
Assignees

Comments

@sergeevabc
Copy link

sergeevabc commented Mar 2, 2024

Windows 7 x64, ReSampler 2.1.0

Source: Swept_24.wav from http://src.infinitewave.ca/TestSignals.zip

$ mediainfo Swept_24.wav
Duration                                 : 8 s 0 ms

$ resampler -i Swept_24.wav -o out-res.wav -r 44100 --doubleprecision
2.1.0 64-bit version
Input file: Swept_24.wav
Output file: out-res.wav
Using double precision for calculations.
input bit format: 24
source file channels: 1
input sample rate: 96000
output sample rate: 44100
Scanning input file for peaks ...Done
Peak input sample: 0.500000 (-6.020598 dBFS) at 0:0:0.100000
LPF transition frequency: 20045.45 Hz (90.91 %)
Conversion ratio: 0.459375 (147:320)
Writing Metadata
Converting (multi-stage) ...
Writing to output file ...
Done
Peak output sample: 0.500000 (-6.020597 dBFS)
Time=333 ms [24.0x]

$ mediainfo out-res.wav
Duration                                 : 7 s 997 ms

If I add --singleStage, then Duration is still not 8 s, but 7 s 999 ms.

Other resamplers I know of keep the sound duration intact.

@jniemann66
Copy link
Owner

jniemann66 commented Mar 3, 2024

Yes, this is a manifestation of the same problem as Issue #34

The good news is that I actually fixed it (in the source code).
The bad news is that I neglected to compile and release the new binaries for it !
(my apologies)

I'm building a new set of binaries now, and will upload a new release shortly, once I am satisfied that it's all good.

here is what happens when I repeat your test above:

$ ReSampler -i /c/Users/juddn/Documents/infinitewave-test-signals/Swept_24.wav -o ass.wav -r 44100
2.1.0 64-bit version
Input file: C:/Users/juddn/Documents/infinitewave-test-signals/Swept_24.wav
Output file: ass.wav
input bit format: 24
source file channels: 1
input sample rate: 96000
output sample rate: 44100
Scanning input file for peaks ...Done
Peak input sample: 0.500000 (-6.020598 dBFS) at 0:0:0.100000
LPF transition frequency: 20045.45 Hz (90.91 %)
Conversion ratio: 0.459375 (147:320)
Writing Metadata
Converting (multi-stage) ...
Writing to output file ...
Done
Peak output sample: 0.500000 (-6.020595 dBFS)
Time=209 ms [38.3x]


$ /c/bin/MediaInfo.exe ass.wav
General
Complete name                            : ass.wav
Format                                   : Wave
Format settings                          : PcmWaveformat
File size                                : 1.01 MiB
Duration                                 : 8 s 0 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 058 kb/s

Audio
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 1
Duration                                 : 8 s 0 ms
Bit rate mode                            : Constant
Bit rate                                 : 1 058 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 44.1 kHz
Bit depth                                : 24 bits
Stream size                              : 1.01 MiB (100%)

@jniemann66 jniemann66 self-assigned this Mar 3, 2024
@jniemann66
Copy link
Owner

@sergeevabc I have published a pre-release of 2.1.1
Can you please see if you can get it running, and verify whether it has addressed the issue ?
Many Thanks,
Judd

@sergeevabc
Copy link
Author

sergeevabc commented Mar 3, 2024

Judd, I confirm that it works on my end.

By the way, why are the files created with the --singleStage flag slightly different in size?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants