- Home /
Record Audio for triggering something
Hey all, and thanks for reading this.
I have forked a guys code based on audio input from a line in/mic. Its a great concept I wanted to leverage in a prototype but am having a bit of difficulty. Problem: the logic is sound..it checks for audio input , and when it picks it up (a process that also needs further refinement in the script) The while loop is the issue.... i`m unsure right at this moment how to re implement the audio.Play(); method so the while does not automatically replay the loop for each audio capture stored in the cached audio array[256].
Hopeful Pointers to a successful Outcome: Some friendly guidance as to what should be changed in order to process a non looping single instantiation of an object per registered hit. Perhaps also a point in the right direction as to how I could ensure a general tap or noise could be restricted to one instantiation/per registered noise. (so far I had tried reducing the array size so it only has one place to store the loudness data which sort of worked but was dubious , though that maybe due to the code in its current state.
Any help and guidance would be appreciated and i have included a package which has the scene ready to go that demonstrates my problem.
(The code concept was not mine but any changes so far are. However, I prefer a free world and wish this to go forward and become a nice script that everyone can benefit from in the end) ahhhhh , world peace n stuff....
Thanks once again for reading this. Gruffy x link text:) x
I have to ask, and know someone will put me right thinking im stupid but..... Why cant we upload straight unity packages to this site (ie why have to zip it so it can upload - it already is one)? Maybe its a server executable thingy issue with webby bits on it or something, but odd to me. ;)
Cheers all