Could not match arguments

Writing a blueprint node that calls the USoundVisualizationStatics::GetAmplitude function. Cant seem to figure out why its not compiling correctly.

CompilerResultsLog:
E:\unreal\projects\Realtime\Dance\Test\Source\Test\Dance.cpp(34)
: error C2665:
‘USoundVisualizationStatics::GetAmplitude’:
none of the 2 overloads could convert
all the argument types
CompilerResultsLog:
E:\unreal\EngineVersion\UE_421_Gameworks\Engine\Plugins\Runtime\SoundVisualizations\Source\SoundVisualizations\Classes\SoundVisualizationStatics.h(41):
note: could be ‘void
USoundVisualizationStatics::GetAmplitude(USoundWave
*,int32,float,float,int32,TArray
&)’ CompilerResultsLog:
E:\unreal\EngineVersion\UE_421_Gameworks\Engine\Plugins\Runtime\SoundVisualizations\Source\SoundVisualizations\Classes\SoundVisualizationStatics.h(30):
note: or ‘void
USoundVisualizationStatics::GetAmplitude(USoundWave
*,const bool,const float,const float,const
int32,TArray,FDefaultAllocator>
&)’ CompilerResultsLog:
E:\unreal\projects\Realtime\Dance\Test\Source\Test\Dance.cpp(34):
note: while trying to match the
argument list ‘(UDance::USoundWave *,
int32, float, float, int32,
TArray)’

here is my code:

void UDance::DrawSoundLines(bool Draw, bool Amp, bool L_R, float TimeLength, USoundWave* SoundWave, float Thickness, float Duration,
	int32 Width, float VisDelay, TArray<FVector> CylinderLocationsL, TArray<FVector> CylinderLocationsR, TArray<float>& OutSpectrum)
{

	if (SoundWave != nullptr) return; 

	TArray<float> OutputVals;

	float GameTime  = UGameplayStatics::GetTimeSeconds(GEngine->GetWorld());
	float StartTime = FMath::Clamp((GameTime + VisDelay), 0.0f, 100000000.0f);


	// Set audio Channel and Location
	int32 Channel = 1;
	TArray<FVector> ReturnLocation = CylinderLocationsL;
	if (L_R)
	{
		Channel = 2;
		ReturnLocation = CylinderLocationsR;
	}

	if (SoundWave != nullptr) 
	{
		//Audio Calculation Type
		if (Amp) { USoundVisualizationStatics::GetAmplitude(SoundWave,Channel,StartTime,TimeLength,Width,OutputVals); }
	}
}

Issue was a forward declaration error of USoundWave in my .h

now im getting this :

CompilerResultsLog: Error:
Dance.cpp.obj : error LNK2019:
unresolved external symbol “public:
static void __cdecl
USoundVisualizationStatics::GetAmplitude(class
USoundWave *,int,float,float,int,class
TArray
&)”
(?GetAmplitude@USoundVisualizationStatics@@SAXPEAVUSoundWave@@HMMHAEAV?$TArray@MVFDefaultAllocator@@@@@Z)
referenced in function “public:
static void __cdecl
UDance::DrawSoundLines(bool,bool,bool,float,class
USoundWave
*,float,float,int,float,class TArray FDefaultAllocator>,class TArray FVector,class FDefaultAllocator>,class
TArray
&)”
(?DrawSoundLines@UDance@@SAX_N00MPEAVUSoundWave@@MMHMV?$TArray@UFVector@@VFDefa
ultAllocator@@@@2AEAV?$TArray@MVFDefaultAllocator@@@@@Z)
CompilerResultsLog: Error:
E:\unreal\projects\Realtime\Dance\Test\Binaries\Win64\UE4Editor-Test-9771.dll
: fatal error LNK1120: 1 unresolved
externals CompilerResultsLog: ERROR:
UBT ERROR: Failed to produce item:
E:\unreal\projects\Realtime\Dance\Test\Binaries\Win64\UE4Editor-Test-9771.dll

Found my issue plugin was missing XXX_API in the header file

Hey! could you share me how you fixed your issue ? I’m getting same error, dont know how did you apply the XXX_API header file. Could you please share ?