Revision: 45750
http://sourceforge.net/p/vice-emu/code/45750
Author: gpz
Date: 2025-09-05 11:32:40 +0000 (Fri, 05 Sep 2025)
Log Message:
-----------
call missing shutdown function, some log cosmetics
Modified Paths:
--------------
trunk/vice/src/arch/sdl/archdep.c
trunk/vice/src/arch/shared/sounddrv/soundsdl.c
Modified: trunk/vice/src/arch/sdl/archdep.c
===================================================================
--- trunk/vice/src/arch/sdl/archdep.c 2025-09-05 11:19:27 UTC (rev 45749)
+++ trunk/vice/src/arch/sdl/archdep.c 2025-09-05 11:32:40 UTC (rev 45750)
@@ -121,7 +121,6 @@
return archdep_init_extra(argc, argv);
}
-
void archdep_shutdown(void)
{
/* free memory used by the exec path */
@@ -136,6 +135,8 @@
archdep_user_cache_path_free();
/* free memory used by the config files path */
archdep_user_config_path_free();
+ /* free memory used by the state files path */
+ archdep_user_state_path_free();
/* free memory used by the sysfile pathlist */
archdep_default_sysfile_pathlist_free();
Modified: trunk/vice/src/arch/shared/sounddrv/soundsdl.c
===================================================================
--- trunk/vice/src/arch/shared/sounddrv/soundsdl.c 2025-09-05 11:19:27 UTC (rev 45749)
+++ trunk/vice/src/arch/shared/sounddrv/soundsdl.c 2025-09-05 11:32:40 UTC (rev 45750)
@@ -41,6 +41,8 @@
#include "log.h"
#include "sound.h"
+static log_t sdlaudio_log = LOG_DEFAULT;
+
static int16_t *sdl_buf = NULL;
static SDL_AudioSpec sdl_spec;
static volatile int sdl_inptr = 0;
@@ -80,6 +82,19 @@
}
}
+#ifdef USE_SDL2UI
+static void printdrivers(void)
+{
+ int i;
+ char names[256] = { 0 };
+ for (i = 0; i < SDL_GetNumAudioDrivers(); i++) {
+ strcat(names, SDL_GetAudioDriver(i));
+ strcat(names, " ");
+ }
+ log_message(sdlaudio_log, "Available drivers: %s", names);
+}
+#endif
+
static int sdl_init(const char *param, int *speed,
int *fragsize, int *fragnr, int *channels)
{
@@ -86,13 +101,10 @@
SDL_AudioSpec spec;
int nr;
+ sdlaudio_log = log_open("SDLAudio");
+
#ifdef USE_SDL2UI
- int i;
-
- log_message(LOG_DEFAULT, "SDLAudio: list of drivers:");
- for (i = 0; i < SDL_GetNumAudioDrivers(); i++) {
- log_message(LOG_DEFAULT, "SDLAudio: %d: %s", i, SDL_GetAudioDriver(i));
- }
+ printdrivers();
#endif
memset(&spec, 0, sizeof(spec));
@@ -118,7 +130,7 @@
* to get an idea of the whole mess
*/
if (SDL_OpenAudio(&spec, NULL)) {
- log_message(LOG_DEFAULT, "SDLAudio: SDL_OpenAudio() failed: %s",
+ log_message(sdlaudio_log, "SDLAudio: SDL_OpenAudio() failed: %s",
SDL_GetError());
return 1;
}
@@ -131,7 +143,7 @@
* $ SDL_AUDIODRIVER="directsound" x64sc.exe
*/
#ifdef USE_SDL2UI
- log_message(LOG_DEFAULT, "SDLAudio: current driver: %s",
+ log_message(sdlaudio_log, "SDLAudio: current driver: %s",
SDL_GetCurrentAudioDriver());
#endif
@@ -138,10 +150,10 @@
if ((sdl_spec.format != AUDIO_S16 && sdl_spec.format != AUDIO_S16MSB)
|| sdl_spec.channels != *channels) {
SDL_CloseAudio();
- log_message(LOG_DEFAULT, "SDLAudio: got invalid audio spec.");
+ log_warning(sdlaudio_log, "SDLAudio: got invalid audio spec.");
return 1;
}
- log_message(LOG_DEFAULT, "SDLAudio: got proper audio spec.");
+ log_verbose(sdlaudio_log, "SDLAudio: got proper audio spec.");
/* recalculate the number of fragments since the frag size might
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|