FMODforRev Internet Streaming

Howard Bornstein howard.bornstein at
Fri Sep 23 17:07:35 EDT 2005

On 9/23/05, Trevor DeVore <lists at> wrote:

> Howard,
> Do you have any streaming urls you can provide that are giving you
> problems.  I've tested the Apple streaming files on Mac OS X and
> Windows XP and if I set the playRate the streaming works flawlessly
> every time.
> Perhaps if you could provide an example that doesn't work then we can
> figure out what is going on.

Hi Trevor,

I was very puzzled why you seemed to not have problems when using "set
the playrate" and I did. After further testing I found that I ran into
the dreaded -5401 Bad State error if I set the currenttime of the
player to 0. Then, even if I use the set playrate, it it generates
this error.

I'm trying to work around this by finding another way to tell when the
stream has stopped (I can't rely on the currenttime apparently because
it keeps incrementing even if the stream has stopped). I was just
going to test out the Enhanced QT External to try to read the error
messages, hoping that will work.

BTW, I'd appreciate it if you could confirm this problem with setting
the currenttime to 0.

After setting a player to an appropriate URL I use these handlers in
Start and Stop buttons:

Start Button:
on mouseup
  set the playrate of player "stream" to 1
end mouseup

Stop button:
on mouseup
  set the playrate of player "stream" to 0
  set the currenttime of player "stream" to 0 -- this one causes the
error message
end mouseup

If I delete the last line of the Stop button handler, it works fine.
If it's there, the next time I click Start, I get a "-5401: Bad State"
error. This is on Mac OSX.


Howard Bornstein

More information about the Use-livecode mailing list