|
Sundi Metropolitan
Registered User
Join date: 14 Sep 2005
Posts: 24
|
07-28-2006 14:09
Hi, I am working on a script that plays music that is broken into 8 second segments. Most of it works pretty well, however, the timing is a real problem.
At first, I just played a file and went to sleep and then played the next one. That worked ok but didnt give me the ability to stop the music since the script was sleeping nearly all of the time.
So I put it in a timer loop using queueing and got it working pretty well with one exception: The first time through the first file takes several seconds to start playing and that blows off the timing. The second time through the song it starts playing immediately and the song sounds very good.
I have tried preloading the files with no effect.
Does anyone know why the first time through it takes so long? And is there any way to control or predict how long it will take? Or is there a better approach to playing the files?
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
07-28-2006 16:35
If they're all the same length... you probably want llSetSoundQueuing. You set it true, play the first sound, then the second. Once the first has finished (llSleep or llSetTimerEvent()) you start the third and so on. It's NOT perfect (in fact it's far from perfect), but it's OK for most applications.
|
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
07-28-2006 18:40
From: someone Does anyone know why the first time through it takes so long? And is there any way to control or predict how long it will take? Or is there a better approach to playing the files?
its finding the asset on the database and sending the file back to you, you upload cd quality stereo wav files, and it gets compressed to ogg... which is good but not nearly as compact as mp3 while i see LL's point in using high quality sound files the sad fact is most of these things sound like they were recorded by holding a "boombox" with a tapedeck up to a TV so i wish they would revamp the system for better speed (you cant loose quality when it sounds like crap in the first place right?)
|