Lines Matching refs:sf
393 static void awe_free_sf(sf_list *sf);
394 static void add_sf_info(sf_list *sf, awe_voice_list *rec);
395 static void add_sf_sample(sf_list *sf, awe_sample_list *smp);
401 static awe_sample_list *search_sample_index(sf_list *sf, int sample);
407 static int info_duplicated(sf_list *sf, awe_voice_list *rec);
2994 static int info_duplicated(sf_list *sf, awe_voice_list *rec) in info_duplicated() argument
2997 for (; sf; sf = sf->shared) { in info_duplicated()
2999 for (p = sf->infos; p; p = p->next) { in info_duplicated()
3018 awe_free_sf(sf_list *sf) in awe_free_sf() argument
3020 if (sf->infos) { in awe_free_sf()
3022 for (p = sf->infos; p; p = next) { in awe_free_sf()
3027 if (sf->samples) { in awe_free_sf()
3029 for (p = sf->samples; p; p = next) { in awe_free_sf()
3034 kfree(sf); in awe_free_sf()
3147 sf_list *sf; in awe_load_map() local
3167 if ((sf = check_patch_opened(AWE_PAT_TYPE_MAP, NULL)) == NULL) in awe_load_map()
3185 add_sf_info(sf, rec); in awe_load_map()
3245 remove_info(sf_list *sf, int bank, int instr) in remove_info() argument
3251 for (p = sf->infos; p; p = next) { in remove_info()
3259 sf->infos = next; in remove_info()
3260 if (p == sf->last_infos) in remove_info()
3261 sf->last_infos = prev; in remove_info()
3262 sf->num_info--; in remove_info()
3281 sf_list *sf; in awe_load_info() local
3305 if ((sf = check_patch_opened(AWE_PAT_TYPE_MISC, NULL)) == NULL) in awe_load_info()
3312 for (rec = sf->infos; rec; rec = rec->next) { in awe_load_info()
3321 remove_info(sf, hdr.bank, hdr.instr); in awe_load_info()
3343 if (sf && sf->shared) { in awe_load_info()
3344 if (info_duplicated(sf, rec)) { in awe_load_info()
3352 add_sf_info(sf, rec); in awe_load_info()
3366 sf_list *sf; in awe_remove_info() local
3368 if (! patch_opened || (sf = sftail) == NULL) { in awe_remove_info()
3375 if (! remove_info(sf, bank, instr)) in awe_remove_info()
3389 sf_list *sf; in awe_load_data() local
3391 if ((sf = check_patch_opened(AWE_PAT_TYPE_MISC, NULL)) == NULL) in awe_load_data()
3405 if (search_sample_index(sf, tmprec.sample) != NULL) { in awe_load_data()
3408 if (sf->type & AWE_PAT_SHARED) in awe_load_data()
3425 sf->mem_ptr += rc; in awe_load_data()
3428 add_sf_sample(sf, rec); in awe_load_data()
3443 sf_list *sf; in awe_replace_data() local
3446 if (! patch_opened || (sf = sftail) == NULL) { in awe_replace_data()
3467 for (rec = sf->samples; rec; rec = rec->next) { in awe_replace_data()
3665 sf_list *sf; in awe_load_guspatch() local
3680 if ((sf = check_patch_opened(AWE_PAT_TYPE_GUS, NULL)) == NULL) in awe_load_guspatch()
3690 smp->sample = sf->num_sample; in awe_load_guspatch()
3724 sf->mem_ptr += rc; in awe_load_guspatch()
3725 add_sf_sample(sf, smprec); in awe_load_guspatch()
3730 rec->sample = sf->num_info; /* the last sample */ in awe_load_guspatch()
3799 add_sf_info(sf, vrec); in awe_load_guspatch()
3815 static void add_sf_info(sf_list *sf, awe_voice_list *rec) in add_sf_info() argument
3817 if (sf == NULL) in add_sf_info()
3819 rec->holder = sf; in add_sf_info()
3820 rec->v.sf_id = sf->sf_id; in add_sf_info()
3821 if (sf->last_infos) in add_sf_info()
3822 sf->last_infos->next = rec; in add_sf_info()
3824 sf->infos = rec; in add_sf_info()
3825 sf->last_infos = rec; in add_sf_info()
3827 sf->num_info++; in add_sf_info()
3831 static void add_sf_sample(sf_list *sf, awe_sample_list *rec) in add_sf_sample() argument
3833 if (sf == NULL) in add_sf_sample()
3835 rec->holder = sf; in add_sf_sample()
3836 rec->v.sf_id = sf->sf_id; in add_sf_sample()
3837 if (sf->last_samples) in add_sf_sample()
3838 sf->last_samples->next = rec; in add_sf_sample()
3840 sf->samples = rec; in add_sf_sample()
3841 sf->last_samples = rec; in add_sf_sample()
3843 sf->num_sample++; in add_sf_sample()
3979 search_sample_index(sf_list *sf, int sample) in search_sample_index() argument
3984 while (sf) { in search_sample_index()
3985 for (p = sf->samples; p; p = p->next) { in search_sample_index()
3989 sf = sf->shared; in search_sample_index()
3994 if (sf) { in search_sample_index()
3995 for (p = sf->samples; p; p = p->next) { in search_sample_index()