Skip to content

Apply playback factor on startup, pass Volume and recalculate ByteLimits #11

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

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

h3ndrik
Copy link
Contributor

@h3ndrik h3ndrik commented Mar 1, 2024

I've made a few smaller fixes:

  1. The Playback factor isn't set on startup, just after the first interval which doesn't ever happen for the Fixed version. I've added this to the initial sync.
  2. The Volume isn't set passed at startup. Well it is, but it gets overwritten by the default vol_cfg
  3. Also I think the mute function was missing a conversion
  4. I've included a workaround for TimedStream: recalculate ByteLimits when setting values arduino-audio-tools#1407 in timed_stream. I can drop that commit if you like.

Regarding the TimedStream: There is still something wrong. It still doesn't make a difference what I set. I can't wrap my head around that... Is this code alright?:

https://github.com/pschatzmann/arduino-audio-tools/blob/70a927ff23fae2f0fece2da85b0a9ba51b15edf7/src/AudioTools/AudioIO.h#L277-L279

In case this returns false: Does whover writes to it actually keep the samples in buffer so we actually delay it? Or are the buffers dropped on 'false' and we start with the same data anyways?

@h3ndrik h3ndrik changed the title Various fixes and omissions Apply playback factor on startup, pass Volume and recalculate ByteLimits Mar 1, 2024
@pschatzmann
Copy link
Owner

I think the logic in setVolume to divide by 100.0 is wrong!
The comments in the SnapClient says that the values are between 0.0 and 1.0. That's also the range that the VolumeStream expects.

@pschatzmann pschatzmann merged commit 74df451 into pschatzmann:main Mar 1, 2024
@h3ndrik
Copy link
Contributor Author

h3ndrik commented Mar 1, 2024

I think b9e9059 doesn't work as intended. Now my initial volume is 8.0 instead of 0.08. Maybe the server message needs to be divided by 100.

@pschatzmann
Copy link
Owner

good point! I agree...

@pschatzmann
Copy link
Owner

I committed the correction!

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

Successfully merging this pull request may close these issues.

2 participants