Skip to content

Commit 120b61d

Browse files
authored
resample, changed README to 960 frames
1 parent 83e283f commit 120b61d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/flowgraph/resampler/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Higher quality levels will sound better but consume more CPU because they have m
2929

3030
Note that the number of output frames generated for a given number of input frames can vary.
3131

32-
For example, suppose you are converting from 44100 Hz to 48000 Hz and using an input buffer with 940 frames. If you calculate the number of output frames you get:
32+
For example, suppose you are converting from 44100 Hz to 48000 Hz and using an input buffer with 960 frames. If you calculate the number of output frames you get:
3333

34-
940 * 48000 * 44100 = 1023.1292517...
34+
960 * 48000 * 44100 = 1044.897959...
3535

36-
You cannot generate a fractional number of frames. So the resampler will sometimes generate 1023 frames and sometimes 1024 frames. On average it will generate 1023.1292517 frames. The resampler stores the fraction internally and keeps track of when to consume or generate a frame.
36+
You cannot generate a fractional number of frames. So the resampler will sometimes generate 1044 frames and sometimes 1045 frames. On average it will generate 1044.897959 frames. The resampler stores the fraction internally and keeps track of when to consume or generate a frame.
3737

3838
You can either use a fixed number of input frames or a fixed number of output frames. The other frame count will vary.
3939

0 commit comments

Comments
 (0)