Feature sample rate2#258
Open
simotek wants to merge 2 commits into
Open
Conversation
SDL2 will attempt to start audio at the sample rate specified in AUDIOSAMPLERATE. lgpt will now then run correctly at whichever sample rate SDL2 returns. Modern Linux systems running pipewire default to 48000 this allows lgpt to run at the native sample rate.
Owner
djdiskmachine
left a comment
There was a problem hiding this comment.
I like it! Feels like Piggy is entering the 2010s now, pretty sweet!
Maybe we can have a list of reasonable sample rates to accept, probably nothing above 48 and below 44.1 kHz?
| }; | ||
|
|
||
| int SDLAudioDriver::GetSampleRate() { | ||
| if (sampleRate_ == 0) { |
Owner
There was a problem hiding this comment.
are we allowing all types of weird sample rates? I know 11something kHz is pretty common if we have had connected bluetooth realtime devices..
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
SDL2 will attempt to start audio at the sample rate specified in
AUDIOSAMPLERATE. lgpt will now then run correctly at whichever
sample rate SDL2 returns.
Modern Linux systems running pipewire default to 48000 this allows
lgpt to run at the native sample rate.
clang-format was also run in a secondary commit.
Type of change
Please delete option that isn't relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions on how to reproduce.
Test Configuration:
Played the old beta test song, a sound font and a couple of my songs,
Checklist: