Problem with sound not ready

2,116 views
Skip to first unread message
Assigned to halatmi...@gmail.com by me

Hal Abelson

unread,
Dec 29, 2014, 10:44:50 PM12/29/14
to
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...

Hal Abelson

unread,
Jan 31, 2015, 5:03:27 PM1/31/15
to mitappinv...@googlegroups.com
Enis:

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?

Enis

unread,
Feb 4, 2015, 12:40:56 PM2/4/15
to mitappinv...@googlegroups.com
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...
Sounds(1).aia

SteveJG

unread,
Feb 4, 2015, 12:54:48 PM2/4/15
to mitappinv...@googlegroups.com
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?

-- Steve

Abraham Getzler

unread,
Feb 4, 2015, 2:45:17 PM2/4/15
to mitappinv...@googlegroups.com
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".
ABG

Enis

unread,
Feb 4, 2015, 7:26:58 PM2/4/15
to mitappinv...@googlegroups.com
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...




SteveJG

unread,
Feb 4, 2015, 7:28:13 PM2/4/15
to mitappinv...@googlegroups.com
ALL work as designed here Enis.

Enis

unread,
Feb 4, 2015, 7:49:34 PM2/4/15
to mitappinv...@googlegroups.com
Odd...

Hal Abelson

unread,
Feb 5, 2015, 1:53:14 PM2/5/15
to mitappinv...@googlegroups.com
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.

Enis

unread,
Feb 5, 2015, 2:18:38 PM2/5/15
to mitappinv...@googlegroups.com
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...

Taifun

unread,
Feb 9, 2015, 11:57:59 AM2/9/15
to mitappinv...@googlegroups.com
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...
Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         

Reply all
Reply to author
Forward
0 new messages