Speaker & Mic activity meter
-
Hi All! How can i get the activity on speaker/mic so that i can build the activity meter within my aplication. My application allows voice conversation between two parties. I want to display speaker & mic activity meter on my application. Any sample or piece of code will be highly appreciated. Thanks a lot Bilal Anjum
-
Hi All! How can i get the activity on speaker/mic so that i can build the activity meter within my aplication. My application allows voice conversation between two parties. I want to display speaker & mic activity meter on my application. Any sample or piece of code will be highly appreciated. Thanks a lot Bilal Anjum
read a raw sound block coming from the mic(they have to be quite small), then initialize 2 variables called "iMin" and "iMax"(both initialized with the null sample values), setup a loop for every sample, and then check if the sample is bigger then iMax or lower than iMin and correct the variable then. after the block, you know, that the average volume is! show a scale from 0 till sizeof(bytespersample) and show ( iMax - iMin ) there. Don't try it, just do it! ;-)
-
read a raw sound block coming from the mic(they have to be quite small), then initialize 2 variables called "iMin" and "iMax"(both initialized with the null sample values), setup a loop for every sample, and then check if the sample is bigger then iMax or lower than iMin and correct the variable then. after the block, you know, that the average volume is! show a scale from 0 till sizeof(bytespersample) and show ( iMax - iMin ) there. Don't try it, just do it! ;-)
Hi! Thnaks for the solution, but i am just a newbie and have no idea where and how to read mic/speaker buffer? If you can tell me some APIs or any example coz i have no idea of sound APIs and data structure, that will be really helpful. Regards Bilal Anjum