public static CREATESOUNDEXINFO CreateFromInternal(ref CREATESOUNDEXINFO_INTERNAL exinfoInt)
{
CREATESOUNDEXINFO exinfo = new CREATESOUNDEXINFO();
exinfo.cbsize = Marshal.SizeOf(typeof(CREATESOUNDEXINFO_INTERNAL));
exinfo.length = exinfoInt.length;
exinfo.fileoffset = exinfoInt.fileoffset;
exinfo.numchannels = exinfoInt.numchannels;
exinfo.defaultfrequency = exinfoInt.defaultfrequency;
exinfo.format = exinfoInt.format;
exinfo.decodebuffersize = exinfoInt.decodebuffersize;
exinfo.initialsubsound = exinfoInt.initialsubsound;
exinfo.numsubsounds = exinfoInt.numsubsounds;
exinfo.inclusionlist = exinfoInt.inclusionlist;
exinfo.inclusionlistnum = exinfoInt.inclusionlistnum;
exinfo.pcmreadcallback = exinfoInt.pcmreadcallback != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer(exinfoInt.pcmreadcallback, typeof(SOUND_PCMREADCALLBACK)) as SOUND_PCMREADCALLBACK : null;
exinfo.pcmsetposcallback = exinfoInt.pcmsetposcallback != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer(exinfoInt.pcmsetposcallback, typeof(SOUND_PCMSETPOSCALLBACK)) as SOUND_PCMSETPOSCALLBACK : null;
exinfo.nonblockcallback = exinfoInt.nonblockcallback != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer(exinfoInt.nonblockcallback, typeof(SOUND_NONBLOCKCALLBACK)) as SOUND_NONBLOCKCALLBACK : null;
exinfo.dlsname = exinfoInt.dlsname;
exinfo.encryptionkey = exinfoInt.encryptionkey;
exinfo.maxpolyphony = exinfoInt.maxpolyphony;
exinfo.userdata = exinfoInt.userdata;
exinfo.suggestedsoundtype = exinfoInt.suggestedsoundtype;
exinfo.fileuseropen = exinfoInt.fileuseropen != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer(exinfoInt.fileuseropen, typeof(FILE_OPENCALLBACK)) as FILE_OPENCALLBACK : null;
exinfo.fileuserclose = exinfoInt.fileuserclose != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer(exinfoInt.fileuserclose, typeof(FILE_CLOSECALLBACK)) as FILE_CLOSECALLBACK : null;
exinfo.fileuserread = exinfoInt.fileuserread != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer(exinfoInt.fileuserread, typeof(FILE_READCALLBACK)) as FILE_READCALLBACK : null;
exinfo.fileuserseek = exinfoInt.fileuserseek != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer(exinfoInt.fileuserseek, typeof(FILE_SEEKCALLBACK)) as FILE_SEEKCALLBACK : null;
exinfo.fileuserasyncread = exinfoInt.fileuserasyncread != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer(exinfoInt.fileuserasyncread, typeof(FILE_ASYNCREADCALLBACK)) as FILE_ASYNCREADCALLBACK : null;
exinfo.fileuserasynccancel = exinfoInt.fileuserasynccancel != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer(exinfoInt.fileuserasynccancel, typeof(FILE_ASYNCCANCELCALLBACK)) as FILE_ASYNCCANCELCALLBACK : null;
exinfo.fileuserdata = exinfoInt.fileuserdata;
exinfo.filebuffersize = exinfoInt.filebuffersize;
exinfo.channelorder = exinfoInt.channelorder;
exinfo.channelmask = exinfoInt.channelmask;
exinfo.initialsoundgroup = exinfoInt.initialsoundgroup;
exinfo.initialseekposition = exinfoInt.initialseekposition;
exinfo.initialseekpostype = exinfoInt.initialseekpostype;
exinfo.ignoresetfilesystem = exinfoInt.ignoresetfilesystem;
exinfo.audioqueuepolicy = exinfoInt.audioqueuepolicy;
exinfo.minmidigranularity = exinfoInt.minmidigranularity;
exinfo.nonblockthreadid = exinfoInt.nonblockthreadid;
exinfo.fsbguid = exinfoInt.fsbguid;
return exinfo;
}
}