x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

SoundVisualizations

Hello everyone, I am trying to use the SoundVisualizations module in c++. But i keep geting a linker error.

I add the SoundVisualizations to the PublicDependencyModuleNames

 PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "SoundVisualizations" });

In my cpp file i add #include <SoundVisualizationStatics.h>

I am using this function just trying to get it to build.

 void AAudioVisualizer::GenerateFrequenciesArray()
 {
     USoundVisualizationStatics::CalculateFrequencySpectrum(soundWave, false, 0.0f, 0.19, 20, spectrum);
 }

soundWave and spectrum are in the .h file.

Am i missing something ?

Product Version: UE 4.19
Tags:
more ▼

asked Apr 05 '18 at 04:04 AM in C++ Programming

avatar image

ReneZwaan
6 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

Well, what's the linker error?

more ▼

answered Apr 05 '18 at 04:17 PM

avatar image

Minus_Kelvin STAFF
912 23 4 31

avatar image ReneZwaan Apr 05 '18 at 05:09 PM

Hey Thank you for your reply. This is the linker error i am getting.

 Severity    Code    Description    Project    File    Line    Suppression State
 Error    LNK2019    unresolved external symbol "public: static void __cdecl USoundVisualizationStatics::CalculateFrequencySpectrum(class USoundWave *,int,float,float,int,class TArray<float,class FDefaultAllocator> &)" (?CalculateFrequencySpectrum@USoundVisualizationStatics@@SAXPEAVUSoundWave@@HMMHAEAV?$TArray@MVFDefaultAllocator@@@@@Z) referenced in function "public: void __cdecl AAudioVisualizer::GenerateFrequenciesArray(void)" (?GenerateFrequenciesArray@AAudioVisualizer@@QEAAXXZ)    Practicing    C:\Users\zwaan\OneDrive\Documents\Unreal Projects\Practicing\Intermediate\ProjectFiles\AudioVisualizer.cpp.obj    1    
 
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Have you enabled the plugin for your project?

more ▼

answered Apr 05 '18 at 05:34 PM

avatar image

Minus_Kelvin STAFF
912 23 4 31

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Im having the same issue... was there a resolve for this?

more ▼

answered Mar 20 '19 at 10:12 PM

avatar image

skealeye
136 3 4 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Found the issue, at least the one i was having..

Go into the .h file of the plugin and change

class ISoundVisualizationsPlugin : public IModuleInterface

to:

class SOUNDVISUALIZATIONS_API ISoundVisualizationsPlugin : public IModuleInterface

Then rebuild the engine

more ▼

answered Mar 21 '19 at 04:29 AM

avatar image

skealeye
136 3 4 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question