0
0

I am using this to set the position on a slider for playing of mp3’s

ret = FSOUND_Stream_SetPosition(streamHandle, PicPosValue(SlideIndex))

What is the equivalent for playing mods?

I can get the current postion by using FMUSIC_GetTime(songHandle) but there is no SetTime or SetPosition (well not that I can see). How do you set the playing position for a mod?

  • You must to post comments
0
0

Do I have to use the FMUSIC_SetOrderCallback command before the FMUSIC_SetOrder ?

I tried using FMUSIC_SetOrder(songhandle, PicPosValue(SlideIndex)) but it did not work.

  • You must to post comments
0
0

[code:xwyayhyh]
If FMUSIC_SetOrder(songHandle, position) Then
Debug.Print "ok"
End If
[/code:xwyayhyh]

above code tell me ‘ok’
but song is not moved other posotion

  • You must to post comments
0
0

it must be incramented by orders, use FMUSIC_GetNumOrders(songHandle)
to see how many orders there are.

Say there are 40 orders, you then set position between 0 and 40 or
something.

position = 20
FMUSIC_SetOrder(songHandle, position )

  • You must to post comments
0
0

for example

[quote:acyo55t3]
STRM = FMUSIC_LoadSong(strFileName)
Call FMUSIC_PlaySong(STRM)

sng_NumChans = FMUSIC_GetNumChannels(STRM) 
NumChannels = sng_NumChans 
sng_NumOrders = FMUSIC_GetNumOrders(STRM) 
BPM = FMUSIC_GetBPM(STRM) 
speed = FMUSIC_GetSpeed(STRM) 
KBPS = ((BPM * 2) / 5) 
st = ((1 / KBPS) * 1000) * speed 

For i = 0 To (sng_NumOrders - 1) 
    t = t + FMUSIC_GetPatternLength(STRM, i) 
Next i 

SongLenghtInBytes = t 
SongLenghtInMS = t * st 

[/quote:acyo55t3]

i has set slider bar max value by above caculation
and during play song, moved slider bar by FMUSIC_Gettime(STRM) with
timer

when user moved slider bar by manualy, the position is slider.value
so FMUSIC_SetOrder(songhaldle,position) for moved song position

? i don’t know that above song total length is correct or not???

  • You must to post comments
0
0

first off, your blowing away your channel handle. Should be:

[code:3ibg6naq]
Channel = FMUSIC_PlaySong(Music)
[/code:3ibg6naq]

Your calculation methods could work for getting the play duration, but
you cannot, cannot, set the position by that value. You can only set it by
orders.

If you calculate it by seconds for example 200, and you try to set the order
to 175, it won’t work, cuz there are not that many orders. Unless you have
a huge mode :)

  • You must to post comments
0
0

i try like this;

get OrderNumer and changed position within OrderNumer

i feel somthing changed song position.
but several times changed orderPosition, Sliderbar is Not move.

so i remembered GetTime is not real song position
[quote:3iy3w8wo]
FMUSIC_GetTime
Returns the time in milliseconds since the song was started
[/quote:3iy3w8wo]

SDK say Gettime is only playing time(milliseconds)

is this no way get real position form song like FSOUND_Stream_GetPosition?

  • You must to post comments
0
0

slider.value = FMUSIC_GetOrder(hmusic)

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.