You mean to position the soundplayer at a certain (time)position?
There is no such function, but you could maybe do it using a trick. I didn't test this myself and maybe it isn't possible due to the way the hardware works, but anyway:
Calculate the frequency, the sound must be played to reach the desired position in 1 millisecs, then play it with this frequency for exactly one millisecond. Of course, you need to know the currently used samplerate. In THEORY you should be able to seek the sound this way.
If you don't want to wait one millisecond, you could also use the average fps time and use this to calculate the required frequency, then "fastforward" the sound during the next frame. Of course, this method may be not so accurate.
But to be honest, I really never tried to play a sound with a sample frequency like, say, a million hertz.
|