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 PDSynth
s, 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
.