Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TheBlayder

Pages: [1]
1
Audio / Re: Analyzing "loudness" of an audio input.
« on: November 12, 2020, 10:52:00 am »
I see. Thanks.
I actually managed to find what wasn't working for me. I was printing out the decibel levels from the audio-input but the numbers were always remaining at 0. Because I had forgotten to update it in the onProcessSamples() function. So it was only calling the text at the beginning of the program, and not constantly updating it with the new info from onProcessSamples().

2
Audio / Re: Analyzing "loudness" of an audio input.
« on: November 12, 2020, 09:56:59 am »
This is possible with a class which inherits sf::SoundRecorder and implements onProcessSamples():
https://www.sfml-dev.org/tutorials/2.5/audio-recording.php#custom-recording

I did something similar a few years back which you might be able to adapt: https://github.com/fallahn/scratchvaders/blob/master/src/AudioIn.cpp#L58

I've been looking at your project that you sent me for a while now, and it has helped a lot to understand how it works and it has ofcourse helped the process of creating my project. Although something that has been bothering me is that I seem unable to find where you're calling the onProcessSamples() function. I can see that you are declaring it and defining it in AudioIn.h and AudioIn.cpp, but I can't find where the function is actually called and used.

3
Audio / Analyzing "loudness" of an audio input.
« on: October 13, 2020, 01:30:08 pm »
I am working on a project that requires me to have a auido input i.e. a microphone, which my program constantly checks how loud the sound that gets passed through the microphone is. Is there a way for being able to do this?

I know there is a function called sf::SoundSource::getVolume(). But that just gives a constant value of what volume the sound is being played at. Is there a fuction that I'm missing that can fix my problem, or is that function I need not a thing that exists in SFML?

Pages: [1]
anything