Skip to content

resampler for a live-signal #243

@Toddler-Boy

Description

@Toddler-Boy

Apologies if I'm being dense here, but I can't figure out how to use the resampler of only parts of a continuous signal.

My use case: I have an audio-app that plays back a buffer and adds some FX. I only render e.g. 512 samples at a time but my internal sample-rate is always 44.1 kHz, whereas the audio-card may wants 48 kHz, or 96 kHz or whatever.

So I need to fill 512 samples at 96 kHz, and now I need to feed in 235.2 audio-samples into the resampler. What do I do with the 0.2 samples left over? I need to roll this into the next call, but the resampler-class doesn't know anything about that. I think it always assume that you resample an entire buffer, all in one go, instead of parts of it over multiple calls. Or does it's filters continue from their previous state?

Again: maybe I'm being dense here, but I can't figure out how to write a FIFO buffer for the KFR resampler.

I want to feed in as much data as required to get "N" output samples, and then do that over and over, feeding data in as needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions