0
0

Is it possible to analyse and audio file (mp3) and detect when the silence at the start or end of a track starts/finishes, so i can crossfade properly instead of using an arbitrary time, at the moment i am using 5 seconds but if a track has a lot of silence at the start and end i don’t get gapless playback, or if there is no silence in a track then i lose 5 seconds of the song

  • You must to post comments
0
0

you can use Channel::getWaveData if you want to analyze a signal, or Channel::getSpectrum

  • You must to post comments
0
0

brett

How to analyze without sound… could use FMOD_Sound_ReadData?
As it would be with getWaveData?

Lindomar.

  • You must to post comments
0
0

yes you could use readData if it is non realtime, but it would be the format of the sound, not float -1.0f to +1.0f like getWaveData is.

  • You must to post comments
0
0

I just tried getWaveData, and it complained that i was using HARDWARE mode instead of SOFTWARE, so i changed it to SOFTWARE… but shouldn’t the getWaveData take float[] wave data as a REF parameter?… after the call, my float[] array has nothing in it.

  • You must to post comments
0
0

[quote="brett":192yuqfd]yes you could use readData if it is non realtime, but it would be the format of the sound, not float -1.0f to +1.0f like getWaveData is.[/quote:192yuqfd]

Brett…
How do I do to acquire the sound format and not of bit?
It is that I don’t understand a lot of this part of get auditive sound in readData.
At a long time I am wanting to know this…
My problem is really this.

Lindomar

  • You must to post comments
0
0

OK, I managed to extract some data using readData, but it doesn’t really mean anything to me, I could just find the first non-zero value and move the track to that position and play from there, but i would prefer to be able to set a certain threshold… What is the best way to do this, i would like to load a track and store in a variable the position in MS where the song data starts, and another variable to store where it finishes, then i can just seek to the start pos, before playing and , queue my cross-fade to start before the end-pos instead of the end of the track

  • You must to post comments
0
0

[quote="codeMonkey76":je89khn7]OK, I managed to extract some data using readData, but it doesn’t really mean anything to me, I could just find the first non-zero value and move the track to that position and play from there, but i would prefer to be able to set a certain threshold… What is the best way to do this, i would like to load a track and store in a variable the position in MS where the song data starts, and another variable to store where it finishes, then i can just seek to the start pos, before playing and , queue my cross-fade to start before the end-pos instead of the end of the track[/quote:je89khn7]

How did you get the readdata sound?
How to extract sound in readdata?

  • You must to post comments
0
0

[quote="codeMonkey76":1e05nvy2]OK, I managed to extract some data using readData, but it doesn’t really mean anything to me, I could just find the first non-zero value and move the track to that position and play from there, but i would prefer to be able to set a certain threshold… What is the best way to do this, i would like to load a track and store in a variable the position in MS where the song data starts, and another variable to store where it finishes, then i can just seek to the start pos, before playing and , queue my cross-fade to start before the end-pos instead of the end of the track[/quote:1e05nvy2]

you should be scanning blocks of data and using an averaging/min/max type system, not just looking for 0 or non 0. Silence does not mean all zeroes, it may fluctuate a bit.

  • You must to post comments
0
0

I’m doing the exact same thing but am not sure about of couple of things.

What type for the buffer should I use to read the data into? Float, int, char? It shouldn’t differ if I play an MP3 or a mod, right?

  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.