Closed 4-alok closed 4 years ago
I have the same problem but the function remove the 2 firsts letters
if you find the solution tell me please ;)
I shifted to flutter_audio_query, you may try this.
Curious.. it work from a console, but in flutter it shows only version... and maybe part of a song title.
If replace cleanFrame function with this then it works for me in Flutter, but i can't guarantee for all =)
List<int> cleanFrame(List<int> bytes) {
if (bytes.length > 3) {
List<int> newBytes = [];
newBytes.addAll(bytes.sublist(3));
newBytes.removeWhere((item) => item < 1);
return newBytes;
} else {
return bytes;
}
}
Thx this works for me
@technoqz that looks good. How about we do this to clean it beforehand?
List<int> cleanFrame(List<int> bytes) {
List<int> temp = new List<int>.from(bytes);
temp.removeWhere((item) => item < 1);
if (temp.length > 3) {
return temp.sublist(3);
} else {
return temp;
}
}
I haven't encountered any issues until now but can you test with the files you tested your patch with and make a PR with either version that works.
Console output
or may be i am wrong somewhere