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
player.play() doesn't correctly handle sound files with non-default format #358
Comments
Hello! Thanks for the issue. If this is a general help question, for a faster response consider joining the official Discord Server Else if you have an issue with the library please wait for someone to help you here. |
I don't have any 5.1 or 7.1 files, but I would guess they will also be handled incorrectly, maybe the pitch will shift down? |
So, a small update:
before |
This is where the sample rate is hard coded. It just appears like this just isnt finished, and local files havnt been fully covered yet. Idk if theres a better way, maybe try to read in sample rate from meta data on audio, but I made a PR to at least allow you to set the values of those things that way we dont have to change the library code anymore lol |
The actual rate right now for the audio files must be converted to 48000 and not 44100. I don't think this is mentioned in the docs anywhere and is not trivial find this solution. Is there a problem to merge the PR by @sockheadrps? |
I forgot it existed :) |
I'm trying to use the new Sounds ext, and I have noticed that playing mp3 files with only one channel produces weird result - I'd say the file is played at 2x speed, or the pitch is shifted up. Converting the file to stereo fixes the issue.
MediaInfo output for mono file:
MediaInfo output for stereo file:
The text was updated successfully, but these errors were encountered: