Here's what i have so far:
InputStream is = AudioSystem.getAudioInputStream(new File("C:/users/barnao/desktop/uotm.wav"));
byte[] bytes = IOUtils.toByteArray(is);
short[] shorts = new short[bytes.length/2];
ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(shorts);
double[] vals = new double[shorts.length];
for (int i = 0; i < shorts.length; i++)
vals[i] = (double) shorts[i];
FastFourierTransformer fft = new FastFourierTransformer(DftNormalization.STANDARD);
Complex[] freqs = fft.transform(vals, TransformType.FORWARD);
However i'm getting an error message that the input isn't a power of 2...
Exception in thread "main" org.apache.commons.math3.exception.MathIllegalArgumentException: 31,590,166 is not a power of 2, consider padding for fix
How do i fix this?
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
My team and me made a Webapp in Spring as a project and we have to test most of our codeThe problem is that we use FaceContext messages in quite a lot of methods and always when we try to test those methods we get NullPointerException s at the FaceContext-Messages
I have implemeted app and server sideThe App has a Socket and the server side has a ServerSocket as well as socket to talk with the Android app
How can I create a program to create a Firebase account in my app? Now I can write my data into firebase but I dont know how to check if the account has been created or not
How is it possible to read/write to the Windows Registry using java?