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

[raudio] cheatsheet doesn't state posible values for sampleSize in LoadAudioStream #4752

Closed
Rafailek opened this issue Feb 6, 2025 · 2 comments

Comments

@Rafailek
Copy link

Rafailek commented Feb 6, 2025

The LoadAudioStream function has a parameter sampleSize which determines the bit depth of the samples. What I couldn't initially figure out however, is the exact datatype of the samples (whether it's signed, unsigned, a float, etc.), or what options you even have.

I eventually figured out, that setting sampleSize to 8 makes them an unsigned char, setting it to 16 makes them a signed short, and any other value makes them a (32 bit) float. It would perhaps be nice if this was in the cheatsheet.

I apologize if this sort of thing should be obvious of if it's mentioned elsewhere (I already checked the "raw stream" example and couldn't find it there).

@CrackedPixel
Copy link
Contributor

It's not obvious by comments, but it is pretty easy to check in the source code

@Rafailek
Copy link
Author

Rafailek commented Feb 7, 2025

Thanks! That is also how I found this out myself. I just didn't want to leave the findings to myself in case anyone else needed this.

@Rafailek Rafailek closed this as completed Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants