To detect a hard end shouldn’t be to hard, and could be modified to find a fade out as well.
Use a callback to analyze the buffer, you’ll be looking for the “graph” of how the ending 3 to 5 seconds is. If the graph drops fast, then its a hard end, if its a gradual drop then its a fade.
I hope I’m correct on this, but silence would return zero’s for the buffer, so you’ll be looking at how fast (the step say of) the samples.
Doah! You can use the VU to get the volume (Geez I feel stupid) and just analyze how fast it goes to silence!
Now if you want to know this before the song gets to the end, then you need to use a buffer and analyze the information as I said before. Remember, the buffer returns floating point values from -32647 to +32648.
- NiteBeast answered 15 years ago
- You must login to post comments
Please login first to submit.