How to use getName in the c# api?

I’m trying to get the name of my ChannelGroup for debug purposes, but I have no clue how ChannelGroup.getName works. I’m not sure what to pass into the “namelen” since you can’t know the length beforehand. I tried passing in a bunch of numbers but I always get giberish back, including some weird emojis.

In a testcase I know the name is “sfx”.
I use this code;
string channelGroupName = null;
var result = grp.getName( out channelGroupName, 32 );

channelGroupName comes back as “:slight_smile:

Any pointers?

Internally FMOD will allocate some unmanaged memory to transfer the name back to C#, the length is used for that allocation. If you are receiving an invalid parameter, the most likely cause is an invalid ChannelGroup. Can you check the grp.handle is not zero?

Since the function returned an error, you must ignore the value of the name returned, it could be garbage.