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

Make the play_at API accept other sample types than f32. #6

Closed
mbillingr opened this issue Feb 8, 2021 · 3 comments
Closed

Make the play_at API accept other sample types than f32. #6

mbillingr opened this issue Feb 8, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@mbillingr
Copy link
Owner

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.

@mbillingr mbillingr added the enhancement New feature or request label Feb 8, 2021
@mbillingr mbillingr self-assigned this Feb 8, 2021
@bjadamson
Copy link
Contributor

Would play_omni benefit from this as well?

@mbillingr
Copy link
Owner Author

Yes, absolutely.

@mbillingr
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants