View Single Post
Old 07-26-2018, 12:21 PM  
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 12,067
Default

Quote:
Originally Posted by mespotine View Post
The ValidatePtr2 and ValidatePtr only accepts parameter ctypename set "PCM_Source*" as true.
Maybe a typo somewhere?
Yeah it allows unknown types... which PCM_Source* is. PCM_source* only works (at the moment) if the PCM_source exists in the current project. Fixing that to also include PCM_Source_CreateFromFile() via Lua/EEL (Lua/EEL scripts are accidentally completely permissive for invalid PCM_sources, which is the cause of the hang issue).

Quote:
Edit: Would it be possible to add checking for other Reaper-types as well into ValidatePtr2 and ValidatePtr? Like HWND, AudioAccessor, reaper.array, IReapercontrolSurface, joystick_getaxis and FastStrings?
FastStrings are not meant to be used from scripts! The fact that the sws extension does it is, ugh.. :/

ValidatePtr("HWND") should already work, calling IsWindow(), which may be of limited usefulness (IsWindow() should be avoided really)
Justin is online now   Reply With Quote