2014년 12월 30일 화요일

Problem with sound not ready


From Enis:

File this as an issue,

In the block up above, if the asset is a little big, it errors out with a 710, not ready, but it IS ready a second later... Shouldn't there be a "loaded" event or something like that, in which, for example, I could enable that button so the 710 error wouldn't show?  These aren't HUGE assets, but they are 800K sounds...

--
I can't duplicate this.  The sound component already checks to see if the sound is ready before it attempts to play.
Could you create an app that elicits this problem and send it?

--
Run attached in the emulator (only 1st 4 buttons work), click the first button, get error, click button again and sound plays.  Other buttons the same...


--
Just tried your aia on the stock emulator; the buttons work on the first press... all of the active buttons that is.   Are you using that GennyMotion thing?

--
I vaguely remember an old issue where you had to
prime the sound or player component with
sound file names at initialization time.
and search for the paragraph "Telling Android to load the sounds".

--
Nope... the stock emulator.  It works better on the Geny... The first two work, the second two error out on the first click but work on the 2nd or 3rd click...

--
ALL work as designed here Enis.

--
Odd... 

--
I tried this on the emulator, and it is working as intended.  That is, when I try the 3rd button, it sometimes plays, and sometime shows a "not ready" notification.
The "not ready" means precisely what it says:  The Android media controller has not yet had time to prepare the sound.  But App Inventor is catching that condition
and that is why it displays the notification.

--
In my case, the first button (on the left) ALWAYS errors out the first time, and plays immediately after the second touch.  The same happens with the other buttons.

Doesn't matter... thanks Hal...

--
as ABG said... seems to be similar to the 703 issue...
btw. if the sounds are longer (e.g. sound 4 has 47 seconds) you should use the Player component...

--

댓글 없음:

댓글 쓰기