menu
 

Audiokinetic의 커뮤니티 Q&A는 사용자가 Wwise와 Strata 커뮤니티 내에서 서로 질문과 답변을 하는 포럼입니다. Audiokinetic의 기술 지원팀에게 문의하고 싶으신 경우 지원 티켓 페이지를 사용해주세요.

0 투표

Hello.  I'd like to use the Audio input plugin in C++ with UE4.

As background information, let me show you how I fist created a simple gunshot sound I was able to create with the First Person Template.

So I first load the bank from the BeginPlay().  Obviously, subsequent calls to LoadBank() will fail with AK_BankAlreadyLoaded but I'm not concerned with that for the moment.

void AWwiseTestCharacter::BeginPlay()
{
    FAkAudioDevice* AudioDevice = FAkAudioDevice::Get();

    AKRESULT res = AudioDevice->LoadBank("Main.bnk", AK_DEFAULT_POOL_ID, bankID);

    switch (res)
    {
        case AK_Success:

            break;

        case AK_BankAlreadyLoaded:
            UE_LOG(LogFPChar, Warning, TEXT("%s"), ANSI_TO_TCHAR("Bank already loaded."));
            break;

        default:
            UE_LOG(LogFPChar, Warning, TEXT("Wwise Load error: %d"), (int32)res);
            break;
    }
}

Firing the event was simple enough:

void AWwiseTestCharacter::OnFire()
{

    FAkAudioDevice* AudioDevice = FAkAudioDevice::Get();

    if (AudioDevice)
        uint32 WwiseID = AudioDevice->PostEvent(TEXT("FIRE_TRIGGER"), this, 0, NULL, NULL, false);

}

Now I'm trying to use the Audio Input Plug-in.

The first thing I did was to add a new sound SFX in the Wwise project, in my default work unit, added "Wwise audio input" as source, named it "MyVoice". (I don't know if renaming the "Wwise Audio Input" text has any significance but I also changed it to "MyVoice").

Then I created an event called "Voice_Trigger" and attached "MyVoice" onto it.  I tested it with my microphone and it works.

I generated the sound bank.

Now where do I go from here ?  I don't know how to get a handler to the plugin from the FAkAudioDevice object so I can add the necessary callbacks.  And any post event on my voice data returns a Event ID not found.

Is the process described accurate and what to I need to get it a step further ?  If the SFX a good choice or is it better to use a "Sound Voice".

Regards.

 

General Discussion Marc S. (120 포인트) 로 부터
수정 Marc S. 로 부터
Well any event attached to a sound to be generated by a plugin (audio input, Mp3, Sine wave) doesn't generate the event.  I made a Wwise_IDs.h output of my generated bank and none of those events are present.  All the ones from normal *.wav files are there, though.  Any hint ?

Please sign-in or register to answer this question.

...