Skip to content

newbie cant implement boost #1074

Closed Answered by pschatzmann
Pearl-Fish asked this question in Q&A
Discussion options

You must be logged in to vote

There is a small bug in your code when you set up the volume.
You don't use the right variable in the begin:

// set initial volume
auto Config = volume.defaultConfig();
volume.begin(config); // we need to provide the bits_per_sample and channels
volume.setVolume(1.0);

I suggest that you use some speaking variable names.
If you want to allow volume values > 1.0 you need to set allow_boost to true.
So I suggest you do something like this:

  // set initial volume
  auto vol_config = volume.defaultConfig();
  vol_config.volume = 1.1;
  vol_config.allow_boost = true;
  volume.begin(vol_config);  

But be careful, if you set the volume too high you will get distortions. And of cause you can chan…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pschatzmann
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants