mirror of
https://github.com/love2d/megasource.git
synced 2026-08-17 19:24:09 +02:00
Update SDL2 to the latest commit (85bbf8e)
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
#include "testutils.h"
|
||||
|
||||
static SDL_AudioSpec spec;
|
||||
static Uint8 *sound = NULL; /* Pointer to wave data */
|
||||
static Uint32 soundlen = 0; /* Length of wave data */
|
||||
@@ -180,7 +182,7 @@ main(int argc, char **argv)
|
||||
if (devcount < 1) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Don't see any specific audio devices!\n");
|
||||
} else {
|
||||
const char *file = (argc < 2) ? "sample.wav" : argv[1];
|
||||
char *file = GetResourceFilename(argc > 1 ? argv[1] : NULL, "sample.wav");
|
||||
|
||||
/* Load the wave file into memory */
|
||||
if (SDL_LoadWAV(file, &spec, &sound, &soundlen) == NULL) {
|
||||
@@ -190,6 +192,8 @@ main(int argc, char **argv)
|
||||
test_multi_audio(devcount);
|
||||
SDL_FreeWAV(sound);
|
||||
}
|
||||
|
||||
SDL_free(file);
|
||||
}
|
||||
|
||||
SDL_Quit();
|
||||
|
||||
Reference in New Issue
Block a user