Character/String to Integer Conversion Algorithm; Voice/mp3 input?
It took my awhile but I finally got a brainwave to solve a simple yet annoying problem. You know when you have a string or character array and you want to get numbers inside it to be real numbers, like 'string num="10101"' to be 'int num=10101'? Well I finally wrote an algorithm that does that. I would post it if other people are interested. Alternatively, tell me how you got around it or if there is some function that does it. I have spent years asking on many forums and no one has told me one that works. The algorithm is a function that uses the following syntax:
It takes a string as an argument and returns the numerical value in that string. Make sure that the string actually contains numbers though, and only numbers...
BTW I am in Bloodshed DEV-C++ on Windows XP.
Also, I need to know how to get input from mp3's and voice (microphone). Preferably I would like to get this information as a number of frequency every x milliseconds. So that an mp3 might get a list of frequencies that show how the song changes. I don't know much about audio files or voice input but I am primarily looking to identify the deepest parts of the song (the beat). I have an algorithm that, if provided a list of frequencies, can organize it into a universal beat scheme that I need for my application.