SongIterator *build_iterator(EngineState *s, int song_nr, SongIteratorType type, songit_id_t id) { Resource *song = s->resmgr->findResource(ResourceId(kResourceTypeSound, song_nr), 0); if (!song) return NULL; return songit_new(song->data, song->size, type, id); }
static song_iterator_t * build_iterator(resource_mgr_t *resmgr, int song_nr, int type, songit_id_t id) { resource_t *song = scir_find_resource(resmgr, sci_sound, song_nr, 0); if (!song) return NULL; return songit_new(song->data, song->size, type, id); }