SFML community forums

Help => Audio => Topic started by: oOhttpOo on April 27, 2015, 04:46:27 pm

Title: Sample volume of audio file every second?
Post by: oOhttpOo on April 27, 2015, 04:46:27 pm
I'm not expecting you to write a load of code for me (unless its very simple), but can anyone advise on if it is possible to sample the amplitutude/volume of the .wav/.ogg file every 1 second or less with the sfml audio? What function would allow me to do this? And please could you explain how it would work briefly if there is a function for it? Thanks  ;)
Title: AW: Sample volume of audio file every second?
Post by: eXpl0it3r on April 27, 2015, 05:17:41 pm
Look at the audio tutorials and documentation. Everything that is possible is explained there.

Programming is about solving problems. If you have to rely on others to solve any problem for you, you'll have a really hard time.
Title: Re: AW: Sample volume of audio file every second?
Post by: oOhttpOo on April 27, 2015, 05:27:55 pm
Look at the audio tutorials and documentation. Everything that is possible is explained there.

Programming is about solving problems. If you have to rely on others to solve any problem for you, you'll have a really hard time.

Righto. Is it possible to do this with the getSound function? I mean like once every 100 milliseconds or something
Title: Re: Sample volume of audio file every second?
Post by: Nexus on April 27, 2015, 07:37:50 pm
There is no getSound() function.

Documentation exists for a reason...
Title: Re: Sample volume of audio file every second?
Post by: oOhttpOo on April 27, 2015, 11:03:47 pm
The class or whatever it is. Some people are just so satirical with their posts they might of just not bothered to respond instead of actually trying to help. I'm not wasting anymore time going on this stupid forum, bye
Title: Re: Sample volume of audio file every second?
Post by: Nexus on April 27, 2015, 11:48:52 pm
If you are looking for help, the very least we can expect from you is that you express yourself clearly and show at least a bit of self-initiative. Apparently you don't even bother investing 2 minutes looking up the "class or whatever it is" in the documentation. Instead, you prefer letting us figure out what you could have meant, hoping that we solve your problem in the meantime. ::)
Title: Re: Sample volume of audio file every second?
Post by: Hapax on April 28, 2015, 02:19:44 am
You may also want to consider what you mean by "volume". Do you mean the current position of the wave (sample value) or the perceived loudness (the overall volume of the sound) at that position?