C api documentation doesn't mention SoundSource being a parent class of PDSynthInstrument

currently the documentation for sdk version 1.11.0 (latest as of posting) says the following about the SoundSource class:

SoundSource is the parent class of FilePlayer, SamplePlayer, PDSynth, and DelayLineTap.
Any objects of those types can be cast to SoundSource type and used in these functions.

now, i do get that in the section for PDSynthInstrument we do say that it is a collection of PDSynths, but if it actually does inherit from SoundSource then i feel like it should be explicitly mentioned.

reason this came to my attention is because the bach.mid example project actually does the following:

snd = playdate->sound;
// ...
PDSynthInstrument* inst = snd->instrument->newInstrument();
// ...
snd->channel->addSource(snd->getDefaultChannel(), (SoundSource*)inst);

and it does indeed work as you'd expect, which makes me assume that it does inherit from SoundSource.

1 Like

thanks for pointing this out! I've filed it and will get it fixed as soon as I can.

1 Like

I saw the following in the C header (maybe it didn't make it to the generated documentation site?):

// SoundSource is the parent class for FilePlayer, SamplePlayer, PDSynth, and DelayLineTap. You can safely cast those objects to a SoundSource* and use these functions:

yup! it did make it into the documentation, though that comment also misses out on mentioning that PDSynthInstrument inherits from SoundSource