Deltafire/SCPlayer

generate produces silence on Android

Closed this issue · 6 comments

I compiled this for Android, init and load works as expected but when i try to generate sound, i only get buffer full of zeroes. I followed the guideline how to use this lib.

Could you provide some more information which could be useful for discovering the cause? The library has been tested on Linux, OSX and Amiga without issues.

Sure, this is what i do:

LOAD:
result = player.init(44100);
result = player.load(filename);
GET_DATA:
player.generate(out, size);

the buffer out has always zeroes, no idea what i'm doing wrong. Do you need the android.mk makefile? I'm not sure what other information i could provide, let me know if you need something.
Since it has been tested with Linux, it should work on Android also.

I think you need the player.load() call before the player.init() - can you try swapping them around?

tried, same deal :(

Did you figure out why it wasn't working?

nope :( I tried checking the code from various places and couldn't figure out what causes the silence. Odd case.