Skip to content

Commit

Permalink
technique common helper
Browse files Browse the repository at this point in the history
  • Loading branch information
recp committed Jan 22, 2024
1 parent fafd109 commit 33f7e1c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/ak/profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ AK_EXPORT
AkProfileCommon*
ak_getProfileCommon(struct AkEffect * __restrict effect);

AK_EXPORT
AkTechniqueFxCommon*
ak_getProfileTechniqueCommon(struct AkEffect * __restrict effect);

#ifdef __cplusplus
}
#endif
Expand Down
15 changes: 15 additions & 0 deletions src/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,18 @@ ak_getProfileCommon(struct AkEffect * __restrict effect) {

return (AkProfileCommon *)profile;
}

AK_EXPORT
AkTechniqueFxCommon*
ak_getProfileTechniqueCommon(struct AkEffect * __restrict effect) {
AkProfileCommon *profileCommon;
AkTechniqueFx *techn;
AkTechniqueFxCommon *technCommon;

if ((profileCommon = ak_getProfileCommon(effect))
&& (techn = profileCommon->technique)) {
return techn->common;
}

return NULL;
}

0 comments on commit 33f7e1c

Please sign in to comment.