How to create a texture?
Cocos
APRIL 22, 2024
this is how I get the data audioSource.getPCMData(0).then(dataView => { if (!dataView) return; for (let i = 0; i < dataView.length; ++i) { console.log('data: ' + dataView.getData(i)); } }); in the console I get this data -0.000030517578125 0 0.000030518509447574615 -0.000030517578125 0 0.000030518509447574615 -0.000030517578125 I put the data in an array this.amplitudes.push(dataView.getData(i)); this is what is in the array [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Let's personalize your content