Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Android runs out of tracks playing sounds #127

Open
chrisgarrity opened this issue Mar 23, 2017 · 3 comments
Open

Android runs out of tracks playing sounds #127

chrisgarrity opened this issue Mar 23, 2017 · 3 comments

Comments

@chrisgarrity
Copy link
Contributor

Steps to reproduce:

  1. Create a project with several longer sounds on a sprite
  2. Drag out the individual sound blocks and tap them randomly to start/restart them playing
  3. Eventually some of the sounds won't play when the device runs out of tracks.
  4. If some of the sounds are playing, each sound will still play if you wait until other sounds finish before tapping, but probably won't play more than one at the same time.

Here's an except of the adb logcat when tapping a sound that won't play.

03-23 15:18:20.459   224 14611 E AudioMixer: AudioMixer::getTrackName out of available tracks
03-23 15:18:20.459   224 14611 E AudioFlinger: no more track names available
03-23 15:18:20.459   224 14611 E AudioFlinger: createTrack_l() initCheck failed -12; no control block?
03-23 15:18:20.459   224 14611 E AudioTrack: AudioFlinger could not create track, status: -12
03-23 15:18:20.459   224 14611 E AudioSink: Unable to create audio track
03-23 15:18:20.459   224 14611 W NuPlayerRenderer: openAudioSink: non offloaded open failed status: -19
03-23 15:18:20.460   224 14608 E NuPlayer: received error(0xffffffed) from audio decoder, flushing(0), now shutting down
03-23 15:18:20.460   224 14608 D NuPlayerDriver: notifyListener_l(0xab011900), (100, 1, -19)
03-23 15:18:20.460   224 14611 W NuPlayerRenderer: onDrainAudioQueue(): audio sink is not ready
03-23 15:18:20.460 10229 10239 E MediaPlayer: error (1, -19)
03-23 15:18:20.461 10229 10312 E MediaPlayer: Error (1,-19)
03-23 15:18:20.461   224  1312 D NuPlayerDriver: reset(0xab011900)
03-23 15:18:20.461   224  1312 D NuPlayerDriver: notifyListener_l(0xab011900), (8, 0, 0)
03-23 15:18:20.466   224 14608 W AMessage: failed to post message as target looper for handler 0 is gone.
03-23 15:18:20.467   224 14608 D NuPlayerDriver: notifyResetComplete(0xab011900)
03-23 15:18:21.864   224 14591 I NuPlayerDecoder: [audio] saw output EOS
03-23 15:18:23.810   224 14603 I NuPlayerDecoder: [audio] saw output EOS

ScratchJr only allows one instance of a sound to be playing at a time. I'm guessing that when a sound gets restarted the track resource grabbed for the original sound doesn't get released. Since tracks are shared across the whole device it depends on what else is holding on to tracks, but eventually the sound stops playing when the sound block is tapped.

@thisandagain thisandagain added this to the Backlog milestone Mar 28, 2017
@matak
Copy link

matak commented May 23, 2017

no progress? i have same problem

@driftlesscp
Copy link

Also having this issue on Asus Chromebook

@deepankarmalhan
Copy link
Contributor

Donald can help if he has capacity.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants