/* ==================================== JUCER_BINARY_RESOURCE ====================================

   This is an auto-generated file: Any edits you make may be overwritten!

*/

#include <cstring>

namespace mods
{

//================== AudioBuffer.lua ==================
static const unsigned char temp_binary_data_0[] =
"--- An audio buffer\n"
"-- @classmod el.AudioBuffer\n"
"-- @pragma nostrip\n"
"\n"
"local AudioBuffer32 = require ('el.AudioBuffer32')\n"
"local AudioBuffer64 = require ('el.AudioBuffer64')\n"
"\n"
"local M = {}\n"
"\n"
"function M.new32 (...)\n"
"    return AudioBuffer32.new (...)\n"
"end\n"
"\n"
"function M.new64 (...)\n"
"    return AudioBuffer64.new (...)\n"
"end\n"
"\n"
"M.new = M.new32\n"
"\n"
"return M\n"
"\n"
"-- SPDX-FileCopyrightText: Copyright (C) Kushview, LLC.\n"
"-- SPDX-License-Identifier: GPL-3.0-or-later\n";

const char* AudioBuffer_lua = (const char*) temp_binary_data_0;

}

#include "luamods.hpp"

namespace mods
{

const char* getNamedResource (const char* resourceNameUTF8, int& numBytes);
const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)
{
    unsigned int hash = 0;

    if (resourceNameUTF8 != nullptr)
        while (*resourceNameUTF8 != 0)
            hash = 31 * hash + (unsigned int) *resourceNameUTF8++;

    switch (hash)
    {
        case 0xd5be23cf:  numBytes = 439; return AudioBuffer_lua;
        case 0x7617991c:  numBytes = 225; return color_lua;
        case 0xa8ec1504:  numBytes = 2007; return command_lua;
        case 0x3f9bbef8:  numBytes = 6044; return object_lua;
        case 0xcdd74684:  numBytes = 1072; return script_lua;
        case 0xfeae1acf:  numBytes = 566; return session_lua;
        case 0xa70a64bb:  numBytes = 1996; return strings_lua;
        default: break;
    }

    numBytes = 0;
    return nullptr;
}

const char* namedResourceList[] =
{
    "AudioBuffer_lua",
    "color_lua",
    "command_lua",
    "object_lua",
    "script_lua",
    "session_lua",
    "strings_lua"
};

const char* originalFilenames[] =
{
    "AudioBuffer.lua",
    "color.lua",
    "command.lua",
    "object.lua",
    "script.lua",
    "session.lua",
    "strings.lua"
};

const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);
const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8)
{
    for (unsigned int i = 0; i < (sizeof (namedResourceList) / sizeof (namedResourceList[0])); ++i)
        if (strcmp (namedResourceList[i], resourceNameUTF8) == 0)
            return originalFilenames[i];

    return nullptr;
}

}
