Skip to content

Replace sample generics with fixed f32 #678

@dvdsk

Description

@dvdsk

Idea by @roderickvd see #669 (comment).

The single argument for this change is how much simpler the rodio code base will be with it applied. That leads to better maintainability and that means more time for adding fun stuff :)

We will lose the ability to losslessly support audio using more then 24 bits (f32 supports integers up to 2^24 without loss of precision). This is a non argument since there is no purpose to such precision in audio playback, 16bit already being transparent to human hearing. The 24 bits provided by f32 give ample room for additional effects that could affect the noise floor.

As an example of the extra complexity induced by having a generic sample argument see: #670 (comment).

We would still need a sample convertor in the interface to cpal, though f32 outputs should be preferred.

This will be a big though simple effort, maybe we can take turns on working on this on a separate branch?

Metadata

Metadata

Assignees

Labels

breakingProposed change that would break the public APIenhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions