music-field/src/wav.cpp
Vindicator645 29fa1a5dd6 Added.
This section contains the fft part which is used to transform sound signal into color more accurately but due to time and knowledge constraint is sadly unused.
2018-12-27 10:03:40 +08:00

19 lines
318 B
C++

#include <wav.hpp>
extern WAV twav;
FILE * readWAVInfo(void){
FILE *fp = NULL;
struct WAV_Format wav;
fp = fopen("test.wav", "rb");
fread(&wav, 1, sizeof(struct WAV_Format), fp);
return fp;
}
int init_test_wav(int ms) {
twav.getInfo();
twav.setTimer(ms);
return sqrt(twav.m_pss.step);
}