You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made sure that the issue I am raising doesn't already exist
Use case / Problem
I'd like to implement a 10 band equalizer.
It fits in this package because it's easier to implement this way (compared to a standalone package).
Proposal / Solution
There will be changes to AudioPlayer class API (see "Example Code") . No breaking changes.
I forked this repo and made an implementaion for Linux (my repo).
AudioPlayer's API was extended. Controls were added for the example app. Everything's working. You can change the EQ controls in the example app to verify.
In github actions 2 tests didn't pass. Android test
Maybe something's wrong with my github actions. Does anyone know the solution?
Example Code
Additional API would be like this:
/// Gets the EQ gain by band index.doublegetGain(int bandIndex) {
return _gains[bandIndex];
}
/// Gets the EQ bandwidth by band index.doublegetBandwidth(int bandIndex) {
return _bandwidths[bandIndex];
}
/// Gets the EQ frequency by band index.doublegetFrequency(int bandIndex) {
return _frequencies[bandIndex];
}
/// Sets the EQ gain. /// Value range: [-24.0, 12.0]Future<void> setGain(int bandIndex, double value) async {
assert(
-24.0<= value && value <=12.0,
'Gain is not in range [-24.0, 12.0]: $value',
);
_gains[bandIndex] = value;
await creatingCompleter.future;
return _platform.setGain(playerId, bandIndex, value);
}
/// Sets the EQ bandwidth. /// Value range: [0.0, 20_000.0]Future<void> setBandwidth(int bandIndex, double value) async {
assert(
0.0<= value && value <=20000.0,
'Bandwidth is not in range [0.0, 20_000.0]: $value',
);
_bandwidths[bandIndex] = value;
await creatingCompleter.future;
return _platform.setBandwidth(playerId, bandIndex, value);
}
/// Sets the EQ frequency. /// Value range: [20.0, 20_000.0]Future<void> setFrequency(int bandIndex, double value) async {
assert(
20.0<= value && value <=20000.0,
'Frequency is not in range [20.0, 20_000.0]: $value',
);
_frequencies[bandIndex] = value;
await creatingCompleter.future;
return _platform.setFrequency(playerId, bandIndex, value);
}
API usage:
AudioPlayer player =AudioPlayer();
int i =5; // band indexdouble gain =10.0; // dbdouble bw =200;
double freq =300; // Hz
player.setGain(i, gain);
player.setBandwidth(i, bw);
player.setFrequency(i, freq);
Affected platforms
Android, Windows, Linux
Platform details
For starters I want to support Android, Linux, Windows.
Checklist
Use case / Problem
I'd like to implement a 10 band equalizer.
It fits in this package because it's easier to implement this way (compared to a standalone package).
Proposal / Solution
There will be changes to AudioPlayer class API (see "Example Code") . No breaking changes.
I forked this repo and made an implementaion for Linux (my repo).
AudioPlayer's API was extended. Controls were added for the example app. Everything's working. You can change the EQ controls in the example app to verify.
In github actions 2 tests didn't pass.
Android test
Web test
Maybe something's wrong with my github actions. Does anyone know the solution?
Example Code
Additional API would be like this:
API usage:
Affected platforms
Android, Windows, Linux
Platform details
For starters I want to support Android, Linux, Windows.
Audio Files/URLs/Sources
No response
Mockups
Additions to the UI of example app:
Related issues / more information
Related issue: #303
So, I'd like to make a PR. Please answer something after you read this issue.
Working on PR
yeah
The text was updated successfully, but these errors were encountered: