SoundSource (FilePlayer, SamplePlayer): freePlayer vs dealloc?

SamplePlayer API has method sound -> sampleplayer -> freePlayer,
and same for FilePlayer, and both of them is SoundSource (it's kinda inheritance).

But accordig the doc for sound -> channel -> addCallbackSource that returns new SoundSource,

The caller takes ownership of the allocated SoundSource, and should free it with

playdate->system->realloc(source, 0);

So, my question is,
when and in what cases should I call realloc and when freePlayer?

1 Like