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.
But now that I think about it, that's probably because of the code being old.
I'll try and focus on
kha.audio2then. It really does make more sense.
To put things in context, I'm finally getting around to implementing
audio1for 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.
- 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.
- 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?
- 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.
- Is the 'Empty' backend a template for future backends?
It looks like
Emptyis just a template, so I'm just looking for confirmation.
Since there are no tests for audio, what would constitute a good test for the implementation?
Android audio playback can be handled in different ways, but for
SoundPoolclass 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.