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

Android runs out of tracks playing sounds #127

Open
@chrisgarrity

Description

@chrisgarrity

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions