by yen223 · 4mo ago · 0 comments
I've since tested that theory on the Google Play Store (iOS has one built in), and it was depressingly true. The slow part was trying to find an app that didn't waste your time with ads.
const audioCtx = new AudioContext();
const sr = audioCtx.sampleRate;
const buffer = audioCtx.createBuffer(2, 2 * sr, sr);
for (let channel = 0; channel < buffer.numberOfChannels; channel += 1) {
const data = buffer.getChannelData(channel);
for (let frame = 0; frame < buffer.length; frame += 1) {
data[frame] = 2 * Math.random() - 1
}
}
const source = audioCtx.createBufferSource();
source.buffer = buffer;
source.loop = true;
source.connect(audioCtx.destination);
const button = document.createElement("button");
button.append("Play");
button.addEventListener("click", () => {
source.start();
});
document.body.append(button);Thoses marketplaces are filled with cheap softwares made to make a quick buck by any means without a thought for the whole user experience, with no way to flags grifters for a better community driven experience.
The economy must thrive I guess.