{"id":19262237,"url":"https://github.com/untodesu/salad","last_synced_at":"2025-04-11T15:52:45.950Z","repository":{"id":111197423,"uuid":"389685285","full_name":"untodesu/salad","owner":"untodesu","description":"An OpenAL loader","archived":false,"fork":false,"pushed_at":"2025-01-03T10:11:11.000Z","size":71,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T12:04:39.963Z","etag":null,"topics":["openal","openal-soft"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/untodesu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-07-26T15:42:09.000Z","updated_at":"2025-01-03T10:11:15.000Z","dependencies_parsed_at":"2023-08-21T09:48:48.568Z","dependency_job_id":null,"html_url":"https://github.com/untodesu/salad","commit_stats":null,"previous_names":["untodesu/salad"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untodesu%2Fsalad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untodesu%2Fsalad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untodesu%2Fsalad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untodesu%2Fsalad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/untodesu","download_url":"https://codeload.github.com/untodesu/salad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248435579,"owners_count":21103059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openal","openal-soft"],"created_at":"2024-11-09T19:30:17.882Z","updated_at":"2025-04-11T15:52:45.924Z","avatar_url":"https://github.com/untodesu.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SALAD\n\u003e _Nice hustle, tons-o-fun! Next time, eat a salad!_\n\nSALAD is an OpenAL loader which is made out of frustration with an obvious lack of permissively-licensed OpenAL loaders in the software/game development world. SALAD and all the headers are licensed under Simplified BSD License (see [LICENSE](LICENSE) for the full license text)  \n\n### Why SALAD?\nBecause it's funny. The library is named as an omage to an existing OpenGL loader [GLAD](https://github.com/Dav1dde/glad); if you compare the two loaders, using both to load their respective API functions is very similar and that's intentional.  \n\n# Usage\n## Prerequisites\n* A working ISO C90 (ANSI C89) compiler  \n* A system installation of OpenAL or an OpenAL DLL module  \n\n## Compiling directly\n* Just copy all the headers and `salad.c` into your project's source tree and include them in the build script; everything should world out of the box;  \n* Make sure to comply with license terms (at least put the license text somewhere, I guess);  \n\n## Using a CMake subdirectory\n\n```cmake\nadd_subdirectory(salad)\ntarget_link_libraries(myproject PRIVATE salad)\n```\n\n## Using default DLL paths\n\n```c\n#include \u003cAL/al.h\u003e\n#include \u003cAL/alc.h\u003e\n#include \u003cAL/salad.h\u003e\n\nint main(void)\n{\n    if(!saladLoadALdefault())\n        return 1;\n\n    ALCdevice *device = alcOpenDevice(NULL);\n\n    /* ... */\n\n    return 0;\n}\n```\n\n## Using a custom DLL loader (Source SDK)\nInitially I created the loader to integrate with Source SDK, so this example might be relevant for those who want to do the same with a better chance of success without burning out:  \n\n```c++\n// In the precompiled header\n#include \"AL/al.h\"\n#include \"AL/alc.h\"\n#include \"AL/salad.h\"\n\n// In the C++ source\n#include \"tier1/interface.h\"\n\nstatic CDllDemandLoader al_dll(\"OpenAL32\");\n\nstatic void *SALAD_LoadFunc(const char *procname, void *arg)\n{\n    return al_dll.GetProcAddress(procname);\n}\n\nbool InitSomething(void)\n{\n    if(!saladLoadALfunc(\u0026SALAD_LoadFunc, NULL)) {\n        // Crash the game?\n        return false;\n    }\n\n    ALCdevice *dev = alcOpenDevice(NULL);\n    // ...\n\n    return true;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtodesu%2Fsalad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funtodesu%2Fsalad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtodesu%2Fsalad/lists"}