i've been losing my mind over the last couple hours trying to get the synth to play a note using the c api. current code i have can be summarised as follows:
SoundChannel* sound_effects = NULL;
PDSynth* projectile_sound = NULL;
// ....
snd = pd->sound;
// ...
sound_effects = snd->channel->newChannel();
projectile_sound = snd->synth->newSynth();
snd->channel->addSource(sound_effects, (SoundSource*)projectile_sound);
snd->channel->setVolume(sound_effects, 1.f);
snd->synth->setWaveform(projectile_sound, kWaveformSquare);
snd->synth->setAttackTime(projectile_sound, 0.f);
snd->synth->setDecayTime(projectile_sound, 0.f);
snd->synth->setSustainLevel(projectile_sound, 1.f);
snd->synth->setReleaseTime(projectile_sound, 0.1f);
xsnd->synth->setVolume(projectile_sound, 1.f, 1.f);
// ...
snd->synth->playNote(projectile_sound, 700.f, 1.f, 0.1f, 0);
happy to provide more if helpful, but i think this gives a good idea of where im at right now. given this code, i'm unable to make sounds either in the simulator or the actual hardware.