I'm running the C API on Windows, building with nmake, and having issues/confusion with the sampleplayer API.
SamplePlayer *sp = pd->sound->sampleplayer->newPlayer(); AudioSample *test = pd->sound->sample->load("sounds/Intro.mp3"); pd->sound->sampleplayer->setSample(sp, test);
Get this error in the log:
SamplePlayer_setSample: non-NULL value required for argument 's'
I'm sure the path is correct, and the following works fine using the FilePlayer.
FilePlayer *fp = pd->sound->fileplayer->newPlayer(); pd->sound->fileplayer->loadIntoPlayer(fp, "sounds/Intro.mp3"); pd->sound->fileplayer->play(fp, 0);
May have to do with me not understanding the purpose / difference between FilePlayer and SamplePlayer. The latter I want to use so I can preload all my sounds into AudioSources at startup rather than loading them within update().