Setting up SDL_mixer 3.0.0 in Visual Studio 2022 using CMake
        
            - Install SDL 3.1.10 using this guide: How to install SDL 3.1.10 using CMake and Visual Studio 2022 for Desktop
 
            - Install SDL_mixer 3.0.0 using this guide: How to install SDL_mixer 3.0.0 using CMake and Visual Studio 2022 for Desktop
 
            - Run Visual Studio
 
            - Click on the "Create a new project" button:
 
            
            - Click on the "CMake Project" and click on the "Next" button:
 
            
            - Type a project name, set a project location, check the "Place solution and project in the same directory" checkbox, and click on the "Create" button:
 
            
            - Wait a few seconds for configuration
 
            - Run the project by click on the empty green triangle (or Ctrl+F5):
 
            
            - The program prints "Hello CMake" to the console:
 
            
            - Double click on the "CMakePresets.json" file:
 
            
            - Add the "SDL3_DIR" and "SDL3_mixer_DIR" variables with the following "value" and "type" for "Debug":
 
        {
            "name": "x64-debug",
            "displayName": "x64 Debug",
            "inherits": "windows-base",
            "architecture": {
                "value": "x64",
                "strategy": "external"
            },
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Debug",
                "SDL3_DIR": {
                    "value": "E:/libs/sdl-3.1.10-msvc/win/debug/cmake",
                    "type": "PATH"
                },
                "SDL3_mixer_DIR": {
                    "value": "E:/libs/sdl3_mixer-3.0.0-msvc/win/debug/cmake",
                    "type": "PATH"
                }
            }
        },
            Make the same for "Release":
        {
            "name": "x64-release",
            "displayName": "x64 Release",
            "inherits": "x64-debug",
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Release",
                "SDL3_DIR": {
                    "value": "E:/libs/sdl-3.1.10-msvc/win/release/cmake",
                    "type": "PATH"
                },
                "SDL3_mixer_DIR": {
                    "value": "E:/libs/sdl3_mixer-3.0.0-msvc/win/release/cmake",
                    "type": "PATH"
                }
            }
        },
            Double click on the "CMakeLists.txt" file:
            
            Add this code to the "CMakeLists.txt" file
# Copy the assets folder to the dist folder
add_custom_command(TARGET hello-sdl3-mixer POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_directory
    ${CMAKE_SOURCE_DIR}/assets $<TARGET_FILE_DIR:hello-sdl3-mixer>/assets)
find_package(SDL3)
find_package(SDL3_mixer)
target_link_libraries(hello-sdl3-mixer PRIVATE SDL3_mixer::SDL3_mixer SDL3::SDL3)
            
            Download the "picked-coin-echo-2.wav" here and place it to the "assets/audio" folder
            Replace the "hello-sdl3-mixer.cpp" file content with this one:
#define SDL_MAIN_USE_CALLBACKS 1  // Use the callbacks instead of main()
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3_mixer/SDL_mixer.h>
// We will use this renderer to draw into this window every frame
static SDL_Window *window = NULL;
static SDL_Renderer *renderer = NULL;
static Mix_Chunk *g_wave = NULL;
// This function runs once at startup
SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
{
    if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO)) {
        SDL_Log("Couldn't initialize SDL: %s", SDL_GetError());
        return SDL_APP_FAILURE;
    }
    if (!SDL_CreateWindowAndRenderer("Play audio by click in C++ and SDL3",
        500, 500, 0, &window, &renderer)) //
    {
        SDL_Log("Couldn't create window/renderer: %s", SDL_GetError());
        return SDL_APP_FAILURE;
    }
    SDL_AudioSpec spec;
    spec.freq = MIX_DEFAULT_FREQUENCY;
    spec.format = MIX_DEFAULT_FORMAT;
    spec.channels = MIX_DEFAULT_CHANNELS;
    // Open the audio device
    if (!Mix_OpenAudio(0, &spec)) {
        SDL_Log("Couldn't open audio: %s", SDL_GetError());
        return SDL_APP_FAILURE;
    }
    // Load the WAV file
    const char *soundFilePath = "assets/audio/picked-coin-echo-2.wav";
    g_wave = Mix_LoadWAV(soundFilePath);
    if (g_wave == NULL) {
        SDL_Log("Couldn't load WAV file %s: %s", soundFilePath, SDL_GetError());
        return SDL_APP_FAILURE;
    }
    return SDL_APP_CONTINUE; // Carry on with the program
}
// This function runs when a new event (mouse input, keypresses, etc) occurs
SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event)
{
    if (event->type == SDL_EVENT_QUIT) {
        return SDL_APP_SUCCESS;  // End the program, reporting success to the OS
    } else if (event->type == SDL_EVENT_MOUSE_BUTTON_DOWN) {
        // Play the sound effect
        Mix_PlayChannel(-1, g_wave, 0);
    }
    return SDL_APP_CONTINUE; // Carry on with the program
}
// This function runs once per frame, and is the heart of the program
SDL_AppResult SDL_AppIterate(void *appstate)
{
    // Clear the screen
    SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
    SDL_RenderClear(renderer);
    // Update the screen
    SDL_RenderPresent(renderer);
    return SDL_APP_CONTINUE; // Carry on with the program
}
// This function runs once at shutdown
void SDL_AppQuit(void *appstate, SDL_AppResult result)
{
    // SDL will clean up the window/renderer for us
    if (g_wave) {
        Mix_FreeChunk(g_wave);
        g_wave = NULL;
    }
    SDL_Quit();
}
            
            Press Ctrl+F5 to run the application
            You should click inside of the window to hear a sound