<commit_before>
#include "../common/UnityPluginInterface.h"
#include <OpenGL/OpenGL.h>
#include <OpenAl/al.h>
#include <OpenAl/alc.h>

#include <Effekseer.h>
#include <EffekseerRendererGL.h>
#include <EffekseerSoundAL.h>

static const int RENDER_EVENT_ID	= 0x2040;

static int						g_DeviceType = -1;

Effekseer::Manager*				g_EffekseerManager = NULL;
EffekseerRenderer::Renderer*	g_EffekseerRenderer = NULL;
EffekseerSound::Sound*			g_EffekseerSound = NULL;
static ALCdevice*				g_alcdev = NULL;
static ALCcontext*				g_alcctx = NULL;


static void InitializeOpenAL();
static void FinalizeOpenAL();
static void InitializeEffekseer();
static void FinalizeEffekseer();

static void InitializeOpenAL()
{
	g_alcdev = alcOpenDevice(NULL);
	g_alcctx = alcCreateContext(g_alcdev, NULL);
	alcMakeContextCurrent(g_alcctx);
}

static void FinalizeOpenAL()
{
	if (g_alcctx) {
		alcDestroyContext(g_alcctx);
		g_alcctx = NULL;
	}
	if (g_alcdev) {
		alcCloseDevice(g_alcdev);
		g_alcdev = NULL;
	}
}

static void InitializeEffekseer()
{
	g_EffekseerManager = Effekseer::Manager::Create(MAX_INSTANCES);

	g_EffekseerRenderer = EffekseerRendererGL::Renderer::Create(MAX_SQUARES);
	g_EffekseerManager->SetSpriteRenderer(g_EffekseerRenderer->CreateSpriteRenderer());
	g_EffekseerManager->SetRibbonRenderer(g_EffekseerRenderer->CreateRibbonRenderer());
	g_EffekseerManager->SetRingRenderer(g_EffekseerRenderer->CreateRingRenderer());
	g_EffekseerManager->SetModelRenderer(g_EffekseerRenderer->CreateModelRenderer());

	g_EffekseerManager->SetTextureLoader(g_EffekseerRenderer->CreateTextureLoader());
	g_EffekseerManager->SetModelLoader(g_EffekseerRenderer->CreateModelLoader());

	InitializeOpenAL();
	
	g_EffekseerSound = EffekseerSound::Sound::Create(32);
	g_EffekseerManager->SetSoundPlayer(g_EffekseerSound->CreateSoundPlayer());
	g_EffekseerManager->SetSoundLoader(g_EffekseerSound->CreateSoundLoader());
}

static void FinalizeEffekseer()
{
	if (g_EffekseerManager != NULL) {
		g_EffekseerManager->Destroy();
		g_EffekseerManager = NULL;
	}
	if (g_EffekseerSound != NULL) {
		g_EffekseerSound->Destory();<commit_msg>メソッドの引数と定数が変わったので対応<commit_after>
#include "../common/UnityPluginInterface.h"
#include <OpenGL/OpenGL.h>
#include <OpenAl/al.h>
#include <OpenAl/alc.h>

#include <Effekseer.h>
#include <EffekseerRendererGL.h>
#include <EffekseerSoundAL.h>

static const int RENDER_EVENT_ID	= 0x2040;

static int						g_DeviceType = -1;

Effekseer::Manager*				g_EffekseerManager = NULL;
EffekseerRenderer::Renderer*	g_EffekseerRenderer = NULL;
EffekseerSound::Sound*			g_EffekseerSound = NULL;
static ALCdevice*				g_alcdev = NULL;
static ALCcontext*				g_alcctx = NULL;


static void InitializeOpenAL();
static void FinalizeOpenAL();
static void InitializeEffekseer();
static void FinalizeEffekseer();

static void InitializeOpenAL()
{
	g_alcdev = alcOpenDevice(NULL);
	g_alcctx = alcCreateContext(g_alcdev, NULL);
	alcMakeContextCurrent(g_alcctx);
}

static void FinalizeOpenAL()
{
	if (g_alcctx) {
		alcDestroyContext(g_alcctx);
		g_alcctx = NULL;
	}
	if (g_alcdev) {
		alcCloseDevice(g_alcdev);
		g_alcdev = NULL;
	}
}

static void InitializeEffekseer(int maxInstances, int maxSquares)
{
	g_EffekseerManager = Effekseer::Manager::Create(maxInstances);

	g_EffekseerRenderer = EffekseerRendererGL::Renderer::Create(maxSquares);
	g_EffekseerManager->SetSpriteRenderer(g_EffekseerRenderer->CreateSpriteRenderer());
	g_EffekseerManager->SetRibbonRenderer(g_EffekseerRenderer->CreateRibbonRenderer());
	g_EffekseerManager->SetRingRenderer(g_EffekseerRenderer->CreateRingRenderer());
	g_EffekseerManager->SetModelRenderer(g_EffekseerRenderer->CreateModelRenderer());

	g_EffekseerManager->SetTextureLoader(g_EffekseerRenderer->CreateTextureLoader());
	g_EffekseerManager->SetModelLoader(g_EffekseerRenderer->CreateModelLoader());

	InitializeOpenAL();
	
	g_EffekseerSound = EffekseerSound::Sound::Create(32);
	g_EffekseerManager->SetSoundPlayer(g_EffekseerSound->CreateSoundPlayer());
	g_EffekseerManager->SetSoundLoader(g_EffekseerSound->CreateSoundLoader());
}

static void FinalizeEffekseer()
{
	if (g_EffekseerManager != NULL) {
		g_EffekseerManager->Destroy();
		g_EffekseerManager = NULL;
	}
	if (g_EffekseerSound != NULL) {
		g_EffekseerSound->Destory();
{'fraction_non_alphanumeric': 0.1146421845574388, 'fraction_numerical': 0.003766478342749529, 'mean_word_length': 7.926470588235294, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3826666', 'n_tokens_mistral': 1747, 'n_tokens_neox': 1661, 'n_words': 214}