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

Rewrite resampler #166

Merged
merged 8 commits into from
Jul 31, 2024
Merged

Rewrite resampler #166

merged 8 commits into from
Jul 31, 2024

Commits on Jul 11, 2024

  1. Rewrite resampler

    MarkKremer committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    5e1638c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7301df4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3d1c089 View commit details
    Browse the repository at this point in the history
  4. Revert resampler pts length increase

    The original length of pts made sense because when wantPos is a decimal position like 3.5, you want the window for quality 1 to contain positions 3 and 4. Having a window of 1 more doesn't make sense for that. My previous reasoning for increasing the window size was arguing from the point of wantPosition always being an integer value, which isn't the case.
    MarkKremer committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    79137fc View commit details
    Browse the repository at this point in the history
  5. Fuzz & fix Resampler

    Two bugs:
    - SetRatio() could cause out of range panic when the ratio was sufficiently big. This happens when the newly calculated position was casted to an int. This caused the value to be rounded down. If difference times the ratio was bigger than the buffer, the calculated wantPos could be a negative index in buf1.
    - When the ratio is sufficiently big, the Stream function may not only need to fill the buffers with new data once, but multiple times. The if statement has been replaced with a for loop, so the check is executed until the desired samples are reached.
    MarkKremer committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    7ea20bc View commit details
    Browse the repository at this point in the history
  6. Fix typo

    MarkKremer committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    0705855 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6fbcee9 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2024

  1. Configuration menu
    Copy the full SHA
    df94d52 View commit details
    Browse the repository at this point in the history