0

Android SuperpoweredSDK Version 1.0.3

I trying to play WAV file by SuperpoweredAdvancedAudioPlayer in loop. I've got SuperpoweredAdvancedAudioPlayerEvent_DurationChanged before every SuperpoweredAdvancedAudioPlayerEvent_EOF for some reason. My loop is smaller and smaller after each playing. I can hear and see this in durationMs. It's not happaning when I play AAC or MP3. Looks like a bug, but maybe I don't know some important thing.

Process function:

bool process(short int *output, unsigned int numberOfSamples) {
    bool notEmpty = false;
    for (int i = 0; i != numStreams; ++i) {
        Stream* stream = streams[i];
        notEmpty = stream->player->process(stereoBuffer, notEmpty, numberOfSamples, stream->volume) || notEmpty;
    }
    if (notEmpty)
        SuperpoweredFloatToShortInt(stereoBuffer, output, numberOfSamples);
    return notEmpty;
}

1 Answers1

0

I did find a bug in the Superpowered source remotely connected to this, however it was unrelated to your specific example. If you are on the latest, currently available version (1.0.3), then this should not happen.

The next update will theoretically fix it, if this happens with version 1.0.3. Until then just ignore the duration changed event for your loops -- you don't really need it.

Gabor Szanto
  • 1,329
  • 8
  • 12
  • Thanks for answer. But I cannot ignore this behaviour. After each playing the loop is smaller then before. After some time it can play only 1/2 from original time. I tested SuperpoweredDecoder and can repeate that bug with only SuperpoweredDecoder::decode and SuperpoweredDecoder::seek methods using. Could you please provide some fix? Maybe one of earlier library versions? – Pavel Glagolev Mar 27 '17 at 12:35