// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Subsystems/GameInstanceSubsystem.h"
#include "AudioManager.generated.h"
class USoundBase;
class UAudioComponent;
/**
* Game-wide audio manager — BGM playlist + volume control.
*
* Access from anywhere:
* UGameInstance* GI = GetGameInstance(); // or GetWorld()->GetGameInstance()
* UAudioManager* AM = GI->GetSubsystem<UAudioManager>();
*
* BGM asset note:
* USoundBase assets used as BGM tracks must have looping DISABLED so that
* OnAudioFinished fires when the track ends and the playlist advances.
*/
UCLASS()
class UE573PETIT25CL_API UAudioManager : public UGameInstanceSubsystem
{
GENERATED_BODY()
public:
// -------------------------------------------------------
// Playlist
// -------------------------------------------------------
/** BGM tracks to play in order (or randomly when bRandomPlayback is true) */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="BGM")
TArray<TObjectPtr<USoundBase>> BGMPlaylist;
/**
* If true, tracks are played in a random order.
* A full cycle (every track plays once) is guaranteed before any track repeats.
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="BGM")
bool bRandomPlayback = false;
// -------------------------------------------------------
// Volume (0.0 – 1.0)
// -------------------------------------------------------
/** Overall volume multiplier applied to all audio */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Volume", meta=(ClampMin=0, ClampMax=1))
float MasterVolume = 1.0f;
/** Volume multiplier applied to BGM on top of MasterVolume */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Volume", meta=(ClampMin=0, ClampMax=1))
float BGMVolume = 1.0f;
/** Volume multiplier applied to SE on top of MasterVolume */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Volume", meta=(ClampMin=0, ClampMax=1))
float SEVolume = 1.0f;
public:
// -------------------------------------------------------
// BGM API
// -------------------------------------------------------
/**
* Starts BGM playlist playback.
* @param TrackIndex 0-based index of the first track to play.
* Ignored in random mode — a fresh shuffle is always started.
*/
UFUNCTION(BlueprintCallable, Category="Audio|BGM")
void PlayBGM(int32 TrackIndex = 0);
/** Stops BGM playback and destroys the internal audio component */
UFUNCTION(BlueprintCallable, Category="Audio|BGM")
void StopBGM();
/** Pauses BGM playback */
UFUNCTION(BlueprintCallable, Category="Audio|BGM")
void PauseBGM();
/** Resumes a paused BGM */
UFUNCTION(BlueprintCallable, Category="Audio|BGM")
void ResumeBGM();
/** Skips to the next track immediately */
UFUNCTION(BlueprintCallable, Category="Audio|BGM")
void SkipTrack();
// -------------------------------------------------------
// Volume API
// -------------------------------------------------------
/** Sets the master volume and immediately applies it to the playing BGM */
UFUNCTION(BlueprintCallable, Category="Audio|Volume")
void SetMasterVolume(float Volume);
/** Sets the BGM volume and immediately applies it to the playing BGM */
UFUNCTION(BlueprintCallable, Category="Audio|Volume")
void SetBGMVolume(float Volume);
/** Sets the SE volume (applied to subsequent PlaySE calls) */
UFUNCTION(BlueprintCallable, Category="Audio|Volume")
void SetSEVolume(float Volume);
// -------------------------------------------------------
// SE API
// -------------------------------------------------------
/** Plays a non-spatialized sound effect at MasterVolume * SEVolume */
UFUNCTION(BlueprintCallable, Category="Audio|SE")
void PlaySE2D(USoundBase* Sound);
/** Plays a spatialized sound effect at the given world location at MasterVolume * SEVolume */
UFUNCTION(BlueprintCallable, Category="Audio|SE", meta=(WorldContext="WorldContextObject"))
void PlaySE3D(USoundBase* Sound, const FVector& Location, UObject* WorldContextObject);
private:
/** Currently active BGM audio component */
UPROPERTY()
TObjectPtr<UAudioComponent> BGMComponent;
/** Index of the track that is currently playing */
int32 CurrentTrackIndex = 0;
/** Remaining track indices for random mode; rebuilt when the list is exhausted */
TArray<int32> ShuffledIndices;
/** Plays the track at the given playlist index */
void PlayTrackAtIndex(int32 Index);
/** Called when the current BGM track finishes — advances to the next track */
UFUNCTION()
void OnBGMFinished();
/** Returns the index of the next track to play */
int32 PickNextTrackIndex();
/** Applies the current MasterVolume * BGMVolume to the active audio component */
void RefreshBGMVolume();
/** Fills ShuffledIndices with a fresh Fisher-Yates permutation of all track indices */
void RebuildShuffledIndices();
};
AudioManager.cpp
// Copyright Epic Games, Inc. All Rights Reserved.
#include "AudioManager.h"
#include "Components/AudioComponent.h"
#include "Kismet/GameplayStatics.h"
#include "Sound/SoundBase.h"
// -------------------------------------------------------
// BGM API
// -------------------------------------------------------
void UAudioManager::PlayBGM(int32 TrackIndex)
{
if (BGMPlaylist.IsEmpty())
{
return;
}
// Stop any currently playing track before starting the playlist
StopBGM();
if (bRandomPlayback)
{
// Start a fresh shuffle so every track plays before any repeats
RebuildShuffledIndices();
PlayTrackAtIndex(ShuffledIndices.Pop(EAllowShrinking::No));
}
else
{
PlayTrackAtIndex(FMath::Clamp(TrackIndex, 0, BGMPlaylist.Num() - 1));
}
}
void UAudioManager::StopBGM()
{
if (BGMComponent)
{
// Remove delegate first so Stop() does not accidentally trigger OnBGMFinished
BGMComponent->OnAudioFinished.RemoveDynamic(this, &UAudioManager::OnBGMFinished);
BGMComponent->Stop();
BGMComponent->DestroyComponent();
BGMComponent = nullptr;
}
}
void UAudioManager::PauseBGM()
{
if (BGMComponent)
{
BGMComponent->SetPaused(true);
}
}
void UAudioManager::ResumeBGM()
{
if (BGMComponent)
{
BGMComponent->SetPaused(false);
}
}
void UAudioManager::SkipTrack()
{
if (BGMPlaylist.IsEmpty())
{
return;
}
PlayTrackAtIndex(PickNextTrackIndex());
}
// -------------------------------------------------------
// Volume API
// -------------------------------------------------------
void UAudioManager::SetMasterVolume(float Volume)
{
MasterVolume = FMath::Clamp(Volume, 0.0f, 1.0f);
RefreshBGMVolume();
}
void UAudioManager::SetBGMVolume(float Volume)
{
BGMVolume = FMath::Clamp(Volume, 0.0f, 1.0f);
RefreshBGMVolume();
}
void UAudioManager::SetSEVolume(float Volume)
{
SEVolume = FMath::Clamp(Volume, 0.0f, 1.0f);
}
// -------------------------------------------------------
// SE API
// -------------------------------------------------------
void UAudioManager::PlaySE2D(USoundBase* Sound)
{
if (!Sound)
{
return;
}
UGameplayStatics::SpawnSound2D(GetGameInstance(), Sound, MasterVolume * SEVolume);
}
void UAudioManager::PlaySE3D(USoundBase* Sound, const FVector& Location, UObject* WorldContextObject)
{
if (!Sound || !WorldContextObject)
{
return;
}
UGameplayStatics::SpawnSoundAtLocation(WorldContextObject, Sound, Location,
FRotator::ZeroRotator, MasterVolume * SEVolume);
}
// -------------------------------------------------------
// Private helpers
// -------------------------------------------------------
void UAudioManager::PlayTrackAtIndex(int32 Index)
{
if (!BGMPlaylist.IsValidIndex(Index) || !BGMPlaylist[Index])
{
return;
}
CurrentTrackIndex = Index;
// Tear down previous component and unsubscribe before spawning a new one
if (BGMComponent)
{
BGMComponent->OnAudioFinished.RemoveDynamic(this, &UAudioManager::OnBGMFinished);
BGMComponent->Stop();
BGMComponent->DestroyComponent();
BGMComponent = nullptr;
}
// Spawn a 2D audio component:
// bPersistAcrossLevelTransition = true — BGM survives level loads
// bAutoDestroy = false — we control the lifetime manually
BGMComponent = UGameplayStatics::SpawnSound2D(
GetGameInstance(),
BGMPlaylist[Index],
MasterVolume * BGMVolume,
1.0f, // PitchMultiplier
0.0f, // StartTime
nullptr,// ConcurrencySettings
true, // bPersistAcrossLevelTransition
false // bAutoDestroy
);
if (BGMComponent)
{
BGMComponent->OnAudioFinished.AddDynamic(this, &UAudioManager::OnBGMFinished);
}
}
void UAudioManager::OnBGMFinished()
{
if (BGMPlaylist.IsEmpty())
{
return;
}
PlayTrackAtIndex(PickNextTrackIndex());
}
int32 UAudioManager::PickNextTrackIndex()
{
if (bRandomPlayback)
{
// Rebuild the shuffle pool when every track has been played once
if (ShuffledIndices.IsEmpty())
{
RebuildShuffledIndices();
}
return ShuffledIndices.Pop(EAllowShrinking::No);
}
// Sequential: wrap around to the beginning after the last track
return (CurrentTrackIndex + 1) % BGMPlaylist.Num();
}
void UAudioManager::RefreshBGMVolume()
{
if (BGMComponent)
{
BGMComponent->SetVolumeMultiplier(MasterVolume * BGMVolume);
}
}
void UAudioManager::RebuildShuffledIndices()
{
const int32 Count = BGMPlaylist.Num();
ShuffledIndices.Reset(Count);
for (int32 i = 0; i < Count; ++i)
{
ShuffledIndices.Add(i);
}
// Fisher-Yates shuffle
for (int32 i = Count - 1; i > 0; --i)
{
const int32 j = FMath::RandRange(0, i);
ShuffledIndices.Swap(i, j);
}
}
// Some copyright should be here...
using UnrealBuildTool;
public class furcraHomeAIServerChat2 : ModuleRules
{
public furcraHomeAIServerChat2(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicIncludePaths.AddRange(
new string[] {
// ... add public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string[] {
// ... add other private include paths required here ...
}
);
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core", "CoreUObject", "Engine", "UMG","HTTP", "Json", "JsonUtilities"
// ... add other public dependencies that you statically link with here ...
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"Slate",
"SlateCore",
"DeveloperSettings",
// ... add private dependencies that you statically link with here ...
}
);
DynamicallyLoadedModuleNames.AddRange(
new string[]
{
// ... add any modules that your module loads dynamically here ...
}
);
}
}
// Fill out your copyright notice in the Description page of Project Settings.
#include "AiChatTypes.h"
AiChatTypes::AiChatTypes()
{
}
AiChatTypes::~AiChatTypes()
{
}
AiLinkAsyncChat.h
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintAsyncActionBase.h"
#include "AiChatTypes.h"
#include "AiLinkAsyncChat.generated.h"
// Forward declarations for HTTP interfaces to avoid including HTTP headers in this public header
class IHttpRequest;
class IHttpResponse;
using FHttpRequestPtr = TSharedPtr<IHttpRequest, ESPMode::ThreadSafe>;
using FHttpResponsePtr = TSharedPtr<IHttpResponse, ESPMode::ThreadSafe>;
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FAiChatSuccess, const FString&, AssistantText);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FAiChatError, const FString&, Error);
UCLASS()
class FURCRAHOMEAISERVERCHAT2_API UAiLinkAsyncChat : public UBlueprintAsyncActionBase
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintAssignable) FAiChatSuccess OnSuccess;
UPROPERTY(BlueprintAssignable) FAiChatError OnError;
// Messagesは「system + 履歴 + 今回のuser」を含めて渡す
UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"))
static UAiLinkAsyncChat* SendChat(const TArray<FAiChatMessage>& Messages);
virtual void Activate() override;
private:
TArray<FAiChatMessage> MessagesInternal;
void HandleResponse(FHttpRequestPtr Req, FHttpResponsePtr Resp, bool bOk);
};
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
/**
*
*/
class FURCRAHOMEAISERVERCHAT2_API AiLinkRequestTypes
{
public:
AiLinkRequestTypes();
~AiLinkRequestTypes();
};
//#pragma once
//#include "CoreMinimal.h"
#include "AiLinkRequestTypes.generated.h"
USTRUCT()
struct FOllamaGenerateRequest
{
GENERATED_BODY()
UPROPERTY() FString model;
UPROPERTY() FString prompt;
UPROPERTY() bool stream = false;
};
USTRUCT()
struct FOllamaGenerateResponse
{
GENERATED_BODY()
UPROPERTY() FString response;
UPROPERTY() bool done = false;
};
AiLinkRequestTypes.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "AiLinkRequestTypes.h"
AiLinkRequestTypes::AiLinkRequestTypes()
{
}
AiLinkRequestTypes::~AiLinkRequestTypes()
{
}
UAiLinkSettings.h
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Engine/DeveloperSettings.h"
#include "UAiLinkSettings.generated.h"
UCLASS(Config = Game, DefaultConfig, meta = (DisplayName = "Home AI Chat"))
class FURCRAHOMEAISERVERCHAT2_API UAiLinkSettings : public UDeveloperSettings
{
GENERATED_BODY()
public:
UPROPERTY(Config, EditAnywhere, Category = "AI")
FString BaseUrl = TEXT("http://192.168.1.23:11434");
UPROPERTY(Config, EditAnywhere, Category = "AI")
//FString Model = TEXT("llama3.1");
//FString Model = TEXT("deepseek-r1:32b");llama3.1:8b
//FString Model = TEXT("llama3.1:70b");//llama3.1:8b
FString Model = TEXT("llama3.1:8b");//
UPROPERTY(Config, EditAnywhere, Category = "AI")
float TimeoutSeconds = 120.0f;
// 例: "You are NPC assistant in my game..."
UPROPERTY(Config, EditAnywhere, Category = "AI")
FString SystemPrompt = TEXT("You are a helpful in-game NPC. Keep replies concise.");
};
UAiLinkSettings.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "UAiLinkSettings.h"
1>D:\Sandbox\gameprogcpp_code\code-master\Chapter10\AudioSystem.cpp(11,10): error C1083: Cannot open include file: ‘fmod_studio.hpp’: No such file or directory
なので3つの設定をやってしまった。
ーーーーーーーーーーーーーーーーーーーーーー
Visual Studioの場合: Gameプロジェクトを右クリックし、[プロパティ]を選択。 [C/C++] → [追加のインクルードディレクトリ] を選び、FMODのインクルードフォルダのパス (例: D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\inc D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\inc )を追加。 変更後、プロジェクトを再ビルドしてみてください。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
1>LINK : fatal error LNK1104: cannot open file ‘fmodL_vc.lib’ 1>LINK : fatal error LNK1104: cannot open file ‘fmodstudioL_vc.lib’ [リンカー] → [追加の依存ファイル]にFMODのライブラリを追加します。 D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x86 D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x86
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
Build EventのPostを
xcopy "$(ProjectDir)\..\external\SDL\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "$(ProjectDir)\..\external\GLEW\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x86\*.dll" "$(OutDir)" /i /s /y
1>D:\Sandbox\gameprogcpp_code\code-master\Chapter10\AudioSystem.cpp(11,10): error C1083: Cannot open include file: ‘fmod_studio.hpp’: No such file or directory
なので3つの設定をやってしまった。
ーーーーーーーーーーーーーーーーーーーーーー
Visual Studioの場合: Gameプロジェクトを右クリックし、[プロパティ]を選択。 [C/C++] → [追加のインクルードディレクトリ] を選び、FMODのインクルードフォルダのパス (例: D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\inc D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\inc )を追加。 変更後、プロジェクトを再ビルドしてみてください。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
1>LINK : fatal error LNK1104: cannot open file ‘fmodL_vc.lib’ 1>LINK : fatal error LNK1104: cannot open file ‘fmodstudioL_vc.lib’ [リンカー] → [追加の依存ファイル]にFMODのライブラリを追加します。 D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x86 D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x86
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
Build EventのPostを
xcopy "$(ProjectDir)\..\external\SDL\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "$(ProjectDir)\..\external\GLEW\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x86\*.dll" "$(OutDir)" /i /s /y
1>D:\Sandbox\gameprogcpp_code\code-master\Chapter10\AudioSystem.cpp(11,10): error C1083: Cannot open include file: ‘fmod_studio.hpp’: No such file or directory
なので3つの設定をやってしまった。
ーーーーーーーーーーーーーーーーーーーーーー
Visual Studioの場合: Gameプロジェクトを右クリックし、[プロパティ]を選択。 [C/C++] → [追加のインクルードディレクトリ] を選び、FMODのインクルードフォルダのパス (例: D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\inc D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\inc )を追加。 変更後、プロジェクトを再ビルドしてみてください。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
1>LINK : fatal error LNK1104: cannot open file ‘fmodL_vc.lib’ 1>LINK : fatal error LNK1104: cannot open file ‘fmodstudioL_vc.lib’ [リンカー] → [追加の依存ファイル]にFMODのライブラリを追加します。 D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x86 D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x86
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
Build EventのPostを
xcopy "$(ProjectDir)\..\external\SDL\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "$(ProjectDir)\..\external\GLEW\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x86\*.dll" "$(OutDir)" /i /s /y
1>D:\Sandbox\gameprogcpp_code\code-master\Chapter10\AudioSystem.cpp(11,10): error C1083: Cannot open include file: ‘fmod_studio.hpp’: No such file or directory
なので3つの設定をやってしまった。
ーーーーーーーーーーーーーーーーーーーーーー
Visual Studioの場合: Gameプロジェクトを右クリックし、[プロパティ]を選択。 [C/C++] → [追加のインクルードディレクトリ] を選び、FMODのインクルードフォルダのパス (例: D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\inc D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\inc )を追加。 変更後、プロジェクトを再ビルドしてみてください。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
1>LINK : fatal error LNK1104: cannot open file ‘fmodL_vc.lib’ 1>LINK : fatal error LNK1104: cannot open file ‘fmodstudioL_vc.lib’ [リンカー] → [追加の依存ファイル]にFMODのライブラリを追加します。 D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x86 D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x86
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
Build EventのPostを
xcopy "$(ProjectDir)\..\external\SDL\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "$(ProjectDir)\..\external\GLEW\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x86\*.dll" "$(OutDir)" /i /s /y
1>D:\Sandbox\gameprogcpp_code\code-master\Chapter10\AudioSystem.cpp(11,10): error C1083: Cannot open include file: ‘fmod_studio.hpp’: No such file or directory
なので3つの設定をやってしまった。
ーーーーーーーーーーーーーーーーーーーーーー
Visual Studioの場合: Gameプロジェクトを右クリックし、[プロパティ]を選択。 [C/C++] → [追加のインクルードディレクトリ] を選び、FMODのインクルードフォルダのパス (例: D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\inc D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\inc )を追加。 変更後、プロジェクトを再ビルドしてみてください。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
1>LINK : fatal error LNK1104: cannot open file ‘fmodL_vc.lib’ 1>LINK : fatal error LNK1104: cannot open file ‘fmodstudioL_vc.lib’ [リンカー] → [追加の依存ファイル]にFMODのライブラリを追加します。 D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x86 D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x86
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
Build EventのPreを
xcopy "$(ProjectDir)\..\external\SDL\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "$(ProjectDir)\..\external\GLEW\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "D:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x86\*.dll" "$(OutDir)" /i /s /y
あとはコメント化して無効化の修正
1>D:\Sandbox\gameprogcpp_code\code-master\Chapter10\AudioSystem.cpp(59,11): error C2039: ‘getLowLevelSystem’: is not a member of ‘FMOD::Studio::System’ //mSystem->getLowLevelSystem(&mLowLevelSystem);にコメントして無効化
1>D:\Sandbox\gameprogcpp_code\code-master\Chapter10\SoundEvent.cpp(83,10): error C2039: ‘setParameterValue’: is not a member of ‘FMOD::Studio::EventInstance’ //event->setParameterValue(name.c_str(), value);にコメントして無効化
1>D:\Sandbox\gameprogcpp_code\code-master\Chapter10\SoundEvent.cpp(126,10): error C2039: ‘getParameterValue’: is not a member of ‘FMOD::Studio::EventInstance’ //event->getParameterValue(name.c_str(), &retVal);にコメントして無効化