Page 1 of 1
Unable to reuse a Player to handle another sound...
Posted: Wed Apr 16, 2008 7:03 pm
by astroboy
Hi there!
In Revolution 2.9, you can reproduce what seems to be a bug, following these steps:
1. Assign a sound file to a player. Play the sound with "start player" or whatever.
2. After the sound is finished, assign another sound file to the same player. Play the sound.
Alas! the sound is not the most recently assigned, it's the first one!
I also tried to change the sound of the player using script "set the filename of player..." but no luck. The player always plays the first assigned sound, no matter what filename it has set.
I'm using the Linux version. Is this also happening in other OSes?
Thanks in advance.
Posted: Wed Apr 16, 2008 8:07 pm
by Klaus
Hi astroboy,
try this, which worked for me in the past:
...
set the filename of player XYZ to empty
wait 2 millisecs
set the filename of player XYZ to "Your new file here..."
...
At least worth a try
Best
Klaus
Posted: Wed Apr 16, 2008 11:58 pm
by astroboy
Nope. That didn't work...
Same problem here
Posted: Thu Apr 24, 2008 10:53 pm
by Drachen Jager
Klaus's fix doesn't work for me either (windows xp 64)
Also, I notice that sometimes I can get the sound to change but I'm not really sure why it does it sometimes and not others.
The "Property Inspector" of the player shows the correct (changed) filename even when the player is playing the old file.
This is completely new to 2.9, older versions work fine.
AUGH! Revolution programmers! I paid money for your fixes and I was hoping to be publishing soon now that you fixed your previous bugs with audio only now I find it's STILL too buggy for me to publish my project. Would you get your act together!
Posted: Thu Apr 24, 2008 11:06 pm
by Drachen Jager
I just realized why it was working for me sometimes. If the command to switch audio files is executed BY the player (for example as an "on Stopped") it seems to switch correctly, needs more testing but it appears to work OK.
Still it's going to be a pain in the butt to reprogram everything with that as a workaround.
Posted: Fri Apr 25, 2008 3:44 pm
by astroboy
Hi Drachen
I hadn't been able to test successfully your workaround here (RunRev 2.9 Linux). I put "set the filename of player..." as a script in the player (onStopped, even as on playstopped), and the filename changes, but it is still playing the first assigned sound...
The ugly workaround I did is... to create a player for EVERY sound in the app... Yep, that means 140 players for this particular app...

Ha!
Posted: Wed May 21, 2008 9:52 pm
by Drachen Jager
140 sounds! I wish I only had 140... I'd have to work it out but I think I'm more like 1,400.
In other words, not realistic.
Posted: Thu May 22, 2008 8:23 am
by Mark
Hi DJ,
You can play a file without loading it into Revolution, but I can imagine that large sound files play with some delay.
play <path to soundfile>
Best,
Mark