Skip to content

Support multiple sample rates #271

@jmcker

Description

@jmcker

We only currently support 44,100 Hz (configured at compile time) and make some assumptions based on that.

Things to consider

  • If we record a file at X Hz and then play it back at Y Hz will libsndfile resample for us?
  • Switching sample rate during record or playback?
  • Size of ring buffer at higher sample rates. We allocate based on duration, but 2s of space at 48kHz is 1s at 96kHz.
  • Testing devices for supported sample rates and perhaps falling back to something on fail.

TODO

  • Replace use of SAMPLE_RATE macro with HulaSettings::getSampleRate()
  • Check all timing to ensure they account for a faster or slower sample rate
  • Add Controller API for retrieving HulaAudioSettings object or changing sample rate
  • Write test cases for different sample rates

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