nouveau sur le forum, je me presente vite fait: seb, ingenieur du son ds le spectacle... Ca fait une bonne année que je m interresse au son spatialisé pour la VR... j'ai donc bricolé un petit game ( une belle usine à gaz, ne sachant pas scripter ) histoire de me familiariser avec Unity... afin d'utiliser le spatializer "Resonance Audio" , via Wwise, ah bah non via FMOD pour avoir accès à toutes les fonctions ... et sortir une build IOS ( cardboard, je n'ai que ça sous la main pour le moment). J'ai surmonté un nombre incalculable d'incompatibilités et de prises de tête ... pour arriver au but... presque! une toute dernière étape avant d'acceder au Graal ! pour builder sur IOS je dois "uncomment " un script pour valider la sainte trilogie Resonance/ Fmod/ Unity ... j 'ai cherché sur net, comme d'"hab, mais là en vain.... Et c'est là, Luke, que je need your help. Please.
Ci dessous ce qu'il est demandé d'appliquer:
(https://resonance-audio.github.io/reson ... ntegration)
To deploy on iOS:
After completing the previous steps, modify ($UnityProject)/Assets/Plugins/FMOD/fmodplugins.cpp to uncomment the following declaration at the top of the file:
FMOD_DSP_DESCRIPTION* FMOD_ResonanceAudioListener_GetDSPDescription();
FMOD_DSP_DESCRIPTION* FMOD_ResonanceAudioSoundfield_GetDSPDescription();
FMOD_DSP_DESCRIPTION* FMOD_ResonanceAudioSource_GetDSPDescription();
In the same file, uncomment the following code provided in the FmodUnityNativePluginInit() method:
Code : Tout sélectionner
uint32_t result = 0;
result = FMOD5_System_RegisterDSP(system, FMOD_ResonanceAudioListener_GetDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
result = FMOD5_System_RegisterDSP(system, FMOD_ResonanceAudioSoundfield_GetDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
result = FMOD5_System_RegisterDSP(system, FMOD_ResonanceAudioSource_GetDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
Ci dessous le script :
Code : Tout sélectionner
struct FMOD_SYSTEM;
struct FMOD_DSP_DESCRIPTION;
extern "C" unsigned int FMOD5_System_RegisterDSP(FMOD_SYSTEM *system, const FMOD_DSP_DESCRIPTION *description, void *handle);
extern FMOD_DSP_DESCRIPTION* FMOD_Google_GVRListener_GetDSPDescription();
extern FMOD_DSP_DESCRIPTION* FMOD_Google_GVRSoundfield_GetDSPDescription();
extern FMOD_DSP_DESCRIPTION* FMOD_Google_GVRSource_GetDSPDescription();
extern FMOD_DSP_DESCRIPTION* FMOD_ResonanceAudioListener_GetDSPDescription();
extern FMOD_DSP_DESCRIPTION* FMOD_ResonanceAudioSoundfield_GetDSPDescription();
extern FMOD_DSP_DESCRIPTION* FMOD_ResonanceAudioSource_GetDSPDescription();
extern "C" unsigned int FmodUnityNativePluginInit(FMOD_SYSTEM *system)
{
unsigned int result = 0;
/*
This function is invoked on iOS and tvOS after the system has been
initialized and before any banks are loaded. It can be used to manually
register plugins that have been statically linked into the executable.
Each plugin will require a separate call to FMOD_System_RegisterDSP.
The DSP_DESCRIPTION argument is the same as what is returned by
FMODGetDSPDescription when building a dynamic plugin.
*/
/*
result = FMOD5_System_RegisterDSP(system, GetMyDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
*/
/* Uncomment this next section to use the Resonance Audio plugin on iOS */
/*
result = FMOD5_System_RegisterDSP(system, FMOD_ResonanceAudioListener_GetDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
result = FMOD5_System_RegisterDSP(system, FMOD_ResonanceAudioSoundfield_GetDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
result = FMOD5_System_RegisterDSP(system, FMOD_ResonanceAudioSource_GetDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
*/
return result;
}
Et ci dessous, pour vôtre plaisir, ma version des faits :
Code : Tout sélectionner
struct FMOD_SYSTEM;
struct FMOD_DSP_DESCRIPTION;
extern "C" unsigned int FMOD5_System_RegisterDSP(FMOD_SYSTEM *system, const FMOD_DSP_DESCRIPTION *description, void *handle);
extern FMOD_DSP_DESCRIPTION* FMOD_Google_GVRListener_GetDSPDescription();
extern FMOD_DSP_DESCRIPTION* FMOD_Google_GVRSoundfield_GetDSPDescription();
extern FMOD_DSP_DESCRIPTION* FMOD_Google_GVRSource_GetDSPDescription();
extern void FMOD_ResonanceAudioListener_GetDSPDescription();
extern void FMOD_ResonanceAudioSoundfield_GetDSPDescription();
extern void FMOD_ResonanceAudioSource_GetDSPDescription();
extern "C" unsigned int FmodUnityNativePluginInit(FMOD_SYSTEM *system)
{
unsigned int result = 0;
/*
This function is invoked on iOS and tvOS after the system has been
initialized and before any banks are loaded. It can be used to manually
register plugins that have been statically linked into the executable.
Each plugin will require a separate call to FMOD_System_RegisterDSP.
The DSP_DESCRIPTION argument is the same as what is returned by
FMODGetDSPDescription when building a dynamic plugin.
*/
/*
result = FMOD5_System_RegisterDSP(system, GetMyDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
*/
/* Uncomment this next section to use the Resonance Audio plugin on iOS */
result = FMOD5_System_RegisterDSP(system, FMOD_ResonanceAudioListener_GetDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
result = FMOD5_System_RegisterDSP(system, FMOD_ResonanceAudioSoundfield_GetDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
result = FMOD5_System_RegisterDSP(system, FMOD_ResonanceAudioSource_GetDSPDescription(), nullptr);
if (result != 0)
{
return result;
}
return result;
}
Voilà je vous sollicite grandement afin de pouvoir profiter de mon jouet... et je me dis que pour un "scripteur" uncommenter un script ça doit pas être le plus compliqué... euh enfin je crois...
En espérant vous lire, je vous souhaite une bonne journée