I try to use spectrum analysis on audio sound card input but it s not working
as far as i understand, I have to record the sample and play it back but i probably miss of piece of code
system->setOutput(FMOD_OUTPUTTYPE_ASIO); system->setRecordDriver(0); result = system->init(16, FMOD_INIT_NORMAL, 0); ERRCHECK(result); memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); exinfo.numchannels = 2; exinfo.format = FMOD_SOUND_FORMAT_PCM16; exinfo.defaultfrequency = 44100; exinfo.length = exinfo.defaultfrequency * sizeof(short) * exinfo.numchannels * 2; system->createSound( 0, FMOD_2D | FMOD_SOFTWARE | FMOD_OPENUSER, &exinfo, &sound); system->recordStart(sound,TRUE); system->playSound(FMOD_CHANNEL_REUSE, sound, false, &channel);
i think something is missing btw recordStart and playSound but dunno what..
- velk asked 10 years ago
I em new, my englisch is bad sorry for that.
I have made the same code of thes you try to do but i have use a loop,
I make a sound of 6 sec and record in loop to it,
then i take a pause of 10 ms and play this sound in loop to.
this do it fine.
you can after thad you can inplement your spectrum analyser or watherver you want.
notice also thad you record from your record device,
not from your line in or so.
you must define in windows wath you want to use to record from.
line-in, mic, sum,…
if you use the sum (speakers) you have to set the volume of your playing sound off, other wise you record wat you are playing and it wil turn in a nice echo efect.
I do it al fine, but …
i have an other problem,
Wen i let my program run for a few ours i notis a diference in my play and record speed my record speed seems to be ok,
but my play speed encraise badly.
wath can i do to solve this.
unfortunatly i program in visual basic 6.0.
any idee? 😕
- VIPER answered 9 years ago
Please login first to submit.