• dstrekelj

    Where / when should the releasing of resources be handled? In the SystemImpl.shutdown() method?

    posted in Kode read more
  • dstrekelj

    Thanks for the replies.

    Regarding point #1, I see now that I kind of mixed two issues together. I should have linked to an example to make it a little clearer.

    What I'm concerned about is situations like the the one in kha.android.Sound, which imports kha.audio1.AudioChannel even though it doesn't exist for that backend.

    But now that I think about it, that's probably because of the code being old.

    I'll try and focus on kha.audio2 then. It really does make more sense.

    posted in Kode read more
  • dstrekelj

    To put things in context, I'm finally getting around to implementing audio1 for Android (Java). As it turns out, I'm a little confused about how the backends are laid out.

    Below are some questions I'd like to know the answers to. Of course, any additional information that comes to mind is welcome as well. My plan is to compile this into a Wiki entry later on, so that people who want to contribute to Kha know what to watch out for.

    General questions

    1. How are the backend sources included in the compilation process?

    The library sources and backend sources often overlap. I'm wondering if the packages are remapped before compilation so that the backend types overwrite the library types, or is there something else going on? It's a bit confusing because backend sources often reference types from library sources that aren't implemented for that backend. Makes it difficult to configure the display server and get completion, so far I had to write a couple of stubs or temporarily comment things to appease the parser.

    1. What is the purpose of stub classes (definitions without implementations) in Kha library sources?

    Some classes in the library sources only contain method stubs (e.g. kha.graphics2.Graphics). Is your intention for these classes to be implemented by the backend?

    1. Some backends have kha/<backend name> folders. When should these be created?

    I assume it's for implementations that require more code to be written in order for the end result to conform to Kha's API.

    1. Is the 'Empty' backend a template for future backends?

    It looks like Empty is just a template, so I'm just looking for confirmation.

    kha.audio1 questions

    1. Since there are no tests for audio, what would constitute a good test for the implementation?

    2. Android audio playback can be handled in different ways, but for kha.audio1 the SoundPool class seems like a good choice. However, it puts a limit on the maximum number of simultaneous playback streams. What should the limit be?

    I feel like there's more I want to ask, but these questions will do for now.

    EDIT: The questions were originally posted in this Gist.

    posted in Kode read more

Looks like your connection to Kode Forum was lost, please wait while we try to reconnect.