Add support for initing specific device

This commit is contained in:
Cherry 2026-01-12 18:58:05 +03:00
commit 8f33ca4bb9
2 changed files with 107 additions and 15 deletions

View file

@ -27,7 +27,8 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [textures] example - sprite button");
InitAudioDevice(); // Initialize audio device
InitAudioContext();
InitAudioDevice(0); // Initialize audio device
Sound fxButton = LoadSound("resources/buttonfx.wav"); // Load button sound
Texture2D button = LoadTexture("resources/button.png"); // Load button texture

View file

@ -28,7 +28,8 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [textures] example - sprite explosion");
InitAudioDevice();
InitAudioContext();
InitAudioDevice(0);
// Load explosion sound
Sound fxBoom = LoadSound("resources/boom.wav");