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

Fixed sampling rate in jukebox mode #125

Closed
glesik opened this issue Mar 9, 2021 · 2 comments
Closed

Fixed sampling rate in jukebox mode #125

glesik opened this issue Mar 9, 2021 · 2 comments

Comments

@glesik
Copy link

glesik commented Mar 9, 2021

Thanks to @lxea for jukebox mode implementation! It looks like in its current form all audio is resampled to 48 kHz:

sr: beep.SampleRate(48000),

The Beep wiki states that it's possible to use the sampling rate of the file being played. Can this method be used? Are there limitations to using per-file frequency (gapless playback issues maybe)?

@lxea
Copy link
Contributor

lxea commented Mar 9, 2021

I think it should be possible, I didnt look into doing that yet though. It shouldn't be too hard, taglib can get the sample rate I think. I'm not sure if the gonic db has it stored or If I'll need to parse each file again 🤔

@glesik
Copy link
Author

glesik commented Mar 9, 2021

Shouldn't the sampling rate be in format.SampleRate after calling streamer, format, err = flac.Decode(f) in doUpdateSpeaker? But then speaker is already initialized with some rate, right? Can speaker.Init be called right before speaker.Play?

Sorry if it makes no sense, it's the first time I look at Go code 😕

sentriz added a commit that referenced this issue Apr 13, 2022
sentriz added a commit that referenced this issue Apr 13, 2022
sentriz added a commit that referenced this issue Apr 21, 2022
sentriz added a commit that referenced this issue Nov 2, 2022
sentriz added a commit that referenced this issue Nov 2, 2022
sentriz added a commit that referenced this issue Nov 3, 2022
sentriz added a commit that referenced this issue Nov 9, 2022
sentriz added a commit that referenced this issue Nov 9, 2022
sentriz added a commit that referenced this issue Nov 9, 2022
sentriz added a commit that referenced this issue Nov 9, 2022
sentriz added a commit that referenced this issue Nov 9, 2022
sentriz added a commit that referenced this issue Nov 10, 2022
sentriz added a commit that referenced this issue Nov 10, 2022
sentriz added a commit that referenced this issue Nov 16, 2022
@sentriz sentriz added this to the next release milestone Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants