Make the `play_at` API accept other sample types than f32.
Closed this issue · 3 comments
mbillingr commented
Currently the play_at
function expects sources with sample type f32
because that is what's internally used.
Converting sources from other types requires annoying boilerplate #5.
It should be possible to make the function generic to accept any type that can be safely cast to f32
.
bjadamson commented
Would play_omni
benefit from this as well?
mbillingr commented
Yes, absolutely.
mbillingr commented
Turns out Rodio sources expose a .convert_samples()
method which seems to be convenient enough to use.
I'll rather avoid reimplementing the conversion because Rodio is more likely to get it right.