Q:

Asseration failed error while searching for Active Sound

I want to get PlaybackTime from FActiveSound class. However i always get this error:
 Assertion failed: IsInAudioThread()

when i call this:
FActiveSound* ActiveSound = AudioDevice->FindActiveSound(AudioComponent->GetAudioComponentID());

My question is why is that? It may be nooby question but I cannot make it work on myself. 
EDIT:1
What I'm doing atm is this:
Binding delegate : AudioComponent->OnAudioPlaybackPercent.AddDynamic(this, &UAudioController::GimmePlaybackPosition);
then there is my function which looks like this:
void UAudioController::GimmePlaybackPosition(const USoundWave* SoundWave, float PlaybackPercent)
{
    FAudioDevice* AudioDevice = GEngine->GetAudioDevice();
    if (AudioDevice)
    {
        FActiveSound* ActiveSound;
    }
    //GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, TEXT("Delegate fire"));
}
And now I'm wondering, how can I get there my AudioComponent, to get PlaybackTime ;/

A:

You have to run the code that accesses AudioDevice in the audio thread via FAudioThread::RunCommandOnAudioThread.
Here is a snippet used in AudioComponent.cpp:
if (FAudioDevice* AudioDevice = GetAudioDevice())
{
    const uint64 MyAudioComponentID = AudioComponentID;
    FAudioThread::RunCommandOnAudioThread([AudioDevice, MyAudioComponentID, InName, InFloat]()
    {
        FActiveSound* ActiveSound = AudioDevice->FindActiveSound(MyAudioComponentID);
        if (ActiveSound)
        {
            ActiveSound->SetFloatParameter(InName, InFloat);
        }
    }, GET_STATID(STAT_AudioSetFloatParameter));
}

