Heh just noticed a new VB forum, sorry to confuse or repeat but this question really bugs me
I know I’ve sorta grouped this in my previous posts but it hasnt gotten much attention so I thought I’d separate it to a new thread.
In my app I have several arrays to hold status, stream and channel handles for several “carts” like a radio DJ setup. SetPaused() doesnt seem to unpause, given a handle to the channel I paused. Here’s a simplified snippet of my existing pause code (“Index” is a channel handle):
If FSOUND_IsPlaying(Index) Then
fm = FSOUND_SetPaused(Index, True)
fm = FSOUND_SetPaused(Index, False)
Play and Stop commands which look strikingly similar to the above work perfectly. I use the FSOUND_Stream_* methods to open/close play/stop etc. What could be wrong?
- K6Deux asked 15 years ago
Well if I had to do a fade in, i would over a loop of say 2 or 3 seconds or so start the mp3 with a volume of 0, and over a interval of every half second to quarter second increase the volume till it reaches ur desired interval.
As for looping, i could get it to work however I found for mp3’s it works for the most part perfectly. For music modules however, its a bit more complex, most modules will jump back to the start and start themselves, I really wish fmod stopped this by calcualting the lenght of the song or something and stopping when it did finish.
In respects to looping i check to see if FMOD is playing every second or so, if its not I know the mp3 is ended, and simply reinit Fmod and start again.
hope this helps.
Yeah I spose thats one way to do it. Usually the supplied Loop methods ensure a clean transition tho.
As for the fade-in and pause deal, I’m all fixed! Amazing what pulling an all nighter and eating breakfast before bed will do =)
Your on the right track, however The is playing will return true even if it is paused i believe. I did something like this
private Paused as boolean
Public Sub TogglePause()
‘ Check to make sure u have a strm
‘ or a handle to either a stream or music
If isStream = True Then If Paused = False Then Call FSOUND_SetPaused(chan, 1) Paused = True Else Call FSOUND_SetPaused(chan, 0) Paused = False End If Else If Paused = False Then Call FMUSIC_SetPaused(STRM, 1) Paused = True Else Call FMUSIC_SetPaused(STRM, 0) Paused = False End If End If
public function isPaused() as boolean
isPaused = Paused
Course I have this in a class module but you should get the point.
<font size=-1>[ This Message was edited by: Cire on 2002-02-28 01:26 ]</font>
Genius! It works perfectly to check my cart status variable instead of IsPlaying(). Thanks!
One more… any ideas on a Fade-in (I have a working Fade-out). I use an API timer to run the VUs and all progress (works great for automatic volume slides).
Also I can’t seem to get Looping to work right either. Isn’t it just a matter of calling _SetLoopMode(chan, boolean) before _Stream_Play ?
Please login first to submit.