Compare commits

...

7 Commits

Author SHA1 Message Date
Andy Vandijck
0561ef91a4 Fix CoreAudio stall
Fix CoreAudio stall
2025-08-01 09:48:58 +02:00
Rafael Kitover
afc6a1cc3a build: fix build, de translation removed
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-08-01 04:40:38 +00:00
Rafael Kitover
35df9d7647 translations: remove German, not German
Remove the `de` translation as it does not contain a German translation.
Also deleted from Transifex.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-08-01 03:10:01 +00:00
Rafael Kitover
031ae2ebf6 build: fix CMake slowness
Optimize the `find_wx_util` function to try the major and minor version
parsed from the lib file first, avoiding a very slow exhaustive search
of possible version numbers.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-08-01 03:05:55 +00:00
Squall Leonhart
6242679e23 initialise stereo_buffer to 0 to prevent a race condition 2025-08-01 12:12:44 +10:00
Rafael Kitover
537393a0ab translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-31 16:00:20 +00:00
Rafael Kitover
616f7abc4e translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-31 13:00:21 +00:00
8 changed files with 117 additions and 4205 deletions

View File

@@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 3.19)
cmake_policy(VERSION 3.19...3.28.3)
# Use new link library de-duplication behavior.
cmake_policy(SET CMP0156 NEW)
cmake_policy(SET CMP0179 NEW)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
if(WIN32)

View File

@@ -37,8 +37,48 @@ function(check_clean_exit var)
set(${var} ${exit_status} PARENT_SCOPE)
endfunction()
function(try_wx_util var util conf_suffix major_version minor_version)
unset(suffix)
if(conf_suffix)
set(suffix "-${conf_suffix}")
endif()
if(major_version)
set(suffix "${suffix}-${major_version}")
if(NOT minor_version EQUAL -1)
set(suffix "${suffix}.${minor_version}")
endif()
endif()
# find_program caches the result
set(exe NOTFOUND CACHE INTERNAL "" FORCE)
find_program(exe NAMES "${util}${suffix}")
# try infix variant, as on FreeBSD
if(NOT EXISTS "${exe}")
string(REGEX REPLACE "^-" "" suffix "${suffix}")
string(REGEX REPLACE "-" "${suffix}-" try "${util}")
set(exe NOTFOUND CACHE INTERNAL "" FORCE)
find_program(exe NAMES "${try}")
endif()
if(EXISTS "${exe}")
# check that the utility can be executed cleanly
# in case we find e.g. the wrong architecture binary
# when cross-compiling
check_clean_exit(exit_status "${exe}" --help)
if(exit_status EQUAL 0)
set("${var}" "${exe}" PARENT_SCOPE)
return()
endif()
endif()
endfunction()
function(find_wx_util var util)
if(WIN32 OR EXISTS /etc/gentoo-release)
if((WIN32 AND (NOT CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg")) OR EXISTS /etc/gentoo-release)
# On win32, including cross builds we prefer the plain utility
# name first from PATH, with the exception of -static for static
# builds.
@@ -57,48 +97,34 @@ function(find_wx_util var util)
set(major_versions ";")
endif()
list(APPEND conf_suffixes gtk4u gtk4 gtk3u gtk3 gtk2u gtk2 "")
list(APPEND major_versions 4 3 2 "")
list(APPEND conf_suffixes "" gtk3u gtk3 gtk2u gtk2)
list(APPEND major_versions "" 3)
get_target_property(wx_base_lib_prop wx::base LOCATION)
string(STRIP "${wx_base_lib_prop}" wx_base_lib)
if(wx_base_lib MATCHES "wx_baseu?-([0-9]+)\\.([0-9]+)\\.")
set(lib_major "${CMAKE_MATCH_1}")
set(lib_minor "${CMAKE_MATCH_2}")
endif()
foreach(conf_suffix IN LISTS conf_suffixes)
if(lib_major AND lib_minor)
try_wx_util(exe "${util}" "${conf_suffix}" "${lib_major}" "${lib_minor}")
if(exe)
set("${var}" "${exe}" PARENT_SCOPE)
return()
endif()
endif()
foreach(major_version IN LISTS major_versions)
foreach(minor_version RANGE 100 -1 -1)
unset(suffix)
if(conf_suffix)
set(suffix "-${conf_suffix}")
endif()
if(major_version)
set(suffix "${suffix}-${major_version}")
foreach(minor_version RANGE 30 -1 -1)
try_wx_util(exe "${util}" "${conf_suffix}" "${major_version}" "${minor_version}")
if(NOT minor_version EQUAL -1)
set(suffix "${suffix}.${minor_version}")
endif()
endif()
# find_program caches the result
set(exe NOTFOUND CACHE INTERNAL "" FORCE)
find_program(exe NAMES "${util}${suffix}")
# try infix variant, as on FreeBSD
if(NOT EXISTS ${exe})
string(REGEX REPLACE "^-" "" suffix "${suffix}")
string(REGEX REPLACE "-" "${suffix}-" try ${util})
set(exe NOTFOUND CACHE INTERNAL "" FORCE)
find_program(exe NAMES ${try})
endif()
if(EXISTS ${exe})
# check that the utility can be executed cleanly
# in case we find e.g. the wrong architecture binary
# when cross-compiling
check_clean_exit(exit_status ${exe} --help)
if(exit_status EQUAL 0)
set(${var} ${exe} PARENT_SCOPE)
return()
endif()
if(exe)
set("${var}" "${exe}" PARENT_SCOPE)
return()
endif()
# don't iterate over minor versions for empty major version

File diff suppressed because it is too large Load Diff

View File

@@ -1136,7 +1136,7 @@ msgstr "La configuración es leída desde, en orden:"
msgid ""
"Wrote built-in override file to %s\n"
"To override, delete all but changed section. First found section is used from search path:"
msgstr ""
msgstr "Fichero de sobrescritura integrado escrito en %s\nPara sobrescribir, elimine todo salvo la sección de modificados. La primera sección encontrada se usa desde la ruta de búsqueda:"
#: wxvbam.cpp:817
msgid ""
@@ -1274,7 +1274,7 @@ msgstr "Utilizar filtro bilineal con renderizado 3d"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:413
msgid "Full-screen filter to apply"
msgstr ""
msgstr "Filtro de pantalla completa a aplicar"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:414
msgid "Filter plugin library"
@@ -1331,59 +1331,59 @@ msgstr "Aplicar Filtro LCD, si está habilitado."
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:431
msgid "BIOS file to use for Game Boy Color, if enabled"
msgstr ""
msgstr "Fichero BIOS a usar para Game Boy Color, si está habilitado"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:433
msgid ""
"The default palette, as 8 comma-separated 4-digit hex integers (rgb555)."
msgstr ""
msgstr "La paleta por defecto, como 8 enteros hexadecimales de 4 dígitos separados por comas (rgb555)."
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:436
msgid ""
"The first user palette, as 8 comma-separated 4-digit hex integers (rgb555)."
msgstr ""
msgstr "La primera paleta de usuario, como 8 enteros hexadecimales de 4 dígitos separados por comas (rgb555)."
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:439
msgid ""
"The second user palette, as 8 comma-separated 4-digit hex integers (rgb555)."
msgstr ""
msgstr "La segunda paleta de usuario, como 8 enteros hexadecimales de 4 dígitos separados por comas (rgb555)."
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:442
msgid "Automatically gather a full page before printing"
msgstr ""
msgstr "Reunir automáticamente una página completa antes de imprimir"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:444
msgid "Automatically save printouts as screen captures with -print suffix"
msgstr ""
msgstr "Guardar automáticamente impresiones como capturas de pantalla con el sufijo -print"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:446
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:474
msgid "Directory to look for ROM files"
msgstr ""
msgstr "Directorio donde buscar archivos ROM"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:447
msgid "Directory to look for Game Boy Color ROM files"
msgstr ""
msgstr "Directorio donde buscar archivos ROM de Game Boy Color"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:450
msgid "BIOS file to use, if enabled"
msgstr ""
msgstr "Fichero BIOS a usar, si está habilitado"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:460
msgid "Enable link at boot"
msgstr ""
msgstr "Habilitar enlace al arrancar"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:465
msgid "Enable faster network protocol by default"
msgstr ""
msgstr "Habilitar el protocolo de red más rápido por defecto"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:467
msgid "Default network link client host"
msgstr ""
msgstr "Huésped cliente de enlace de red por defecto"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:468
msgid "Default network link server IP to bind"
msgstr ""
msgstr "IP del servidor de enlace de red por defecto a enlazar"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:469
msgid "Default network link port (server and client)"
@@ -1391,15 +1391,15 @@ msgstr ""
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:470
msgid "Default network protocol"
msgstr ""
msgstr "Protocolo de red por defecto"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:471
msgid "Link timeout (ms)"
msgstr ""
msgstr "Tiempo de espera de enlace (ms)"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:472
msgid "Link cable type"
msgstr ""
msgstr "Tipo de cable de enlace"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:477
msgid "Automatically load last saved state"

View File

@@ -34,13 +34,14 @@
# Mateus Santos <sonicheats@gmail.com>, 2017
# Mateus, 2020
# Mauro Sokrates, 2025
# Nelson Kerber Hennemann Filho, 2025
msgid ""
msgstr ""
"Project-Id-Version: VBA-M\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-30 01:00+0000\n"
"PO-Revision-Date: 2011-12-03 19:42+0000\n"
"Last-Translator: Mateus, 2020\n"
"Last-Translator: Nelson Kerber Hennemann Filho, 2025\n"
"Language-Team: Portuguese (Brazil) (http://app.transifex.com/bgk/vba-m/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1723,7 +1724,7 @@ msgstr "Idioma"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:610
msgid "External translations"
msgstr ""
msgstr "Traduções externas"
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:679
#: /home/rkitover/source/repos/vbam-tx-pulls/src/wx/config/internal/option-internal.cpp:699
@@ -3779,7 +3780,7 @@ msgstr "&Sobre..."
#: xrc/MainMenu.xrc:755
msgid "&Languages"
msgstr ""
msgstr "&Idiomas"
#: xrc/MainMenu.xrc:757
msgid "Default Language"
@@ -3927,7 +3928,7 @@ msgstr "Chinês (China)"
#: xrc/MainMenu.xrc:901
msgid "&Use external translations"
msgstr ""
msgstr "&Usar traduções externas"
#: xrc/MapViewer.xrc:4
msgid "Map Viewer"

View File

@@ -16,7 +16,7 @@ extern long soundSampleRate; // current sound quality
gb_effects_config_t gb_effects_config = { false, 0.20f, 0.15f, false };
static gb_effects_config_t gb_effects_config_current;
static Simple_Effects_Buffer* stereo_buffer;
static Simple_Effects_Buffer* stereo_buffer = 0;
static Gb_Apu* gb_apu;
static float soundVolume_ = -1;

View File

@@ -106,12 +106,12 @@ public:
uint16_t current_rate = 0;
int current_buffer = 0;
int filled_buffers = 0;
int soundBufferLen = 0;
AudioTimeStamp starttime;
AudioTimeStamp timestamp;
AudioQueueTimelineRef timeline;
private:
int soundBufferLen = 0;
AudioDeviceID GetCoreAudioDevice(wxString name);
void setBuffer(uint16_t* finalWave, int length);
@@ -120,13 +120,29 @@ private:
static void PlaybackBufferReadyCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer)
{
int curbuf = 0;
CoreAudioAudio *cadevice = (CoreAudioAudio *)inUserData;
(void)inAQ;
for (curbuf = 0; curbuf < OPTION(kSoundBuffers); curbuf++) {
if (cadevice->buffers[curbuf] == inBuffer) {
break;
}
}
if (curbuf >= OPTION(kSoundBuffers))
return;
// buffer is unexpectedly here? We're probably dying, but try to requeue this buffer with silence.
if (inBuffer) {
memset(inBuffer->mAudioData, 0, inBuffer->mAudioDataBytesCapacity);
inBuffer->mAudioDataByteSize = 0;
if (cadevice->buffers[curbuf] != NULL) {
AudioQueueFreeBuffer(inAQ, cadevice->buffers[curbuf]);
cadevice->soundBufferLen = (soundGetSampleRate() / 60) * cadevice->description.mBytesPerPacket;
AudioQueueAllocateBuffer(inAQ, cadevice->soundBufferLen, &cadevice->buffers[curbuf]);
cadevice->buffers[curbuf]->mAudioDataByteSize = 0;
} else {
cadevice->soundBufferLen = (soundGetSampleRate() / 60) * cadevice->description.mBytesPerPacket;
AudioQueueAllocateBuffer(inAQ, cadevice->soundBufferLen, &cadevice->buffers[curbuf]);
cadevice->buffers[curbuf]->mAudioDataByteSize = 0;
}
if (cadevice->filled_buffers > 0) {
@@ -491,8 +507,8 @@ void CoreAudioAudio::write(uint16_t* finalWave, int length) {
current_buffer = 0;
}
while (filled_buffers >= (OPTION(kSoundBuffers) - 1)) {
wxMilliSleep(1);
while (filled_buffers >= OPTION(kSoundBuffers)) {
wxMilliSleep(((soundGetSampleRate() / 60) * 4) / (soundGetSampleRate() >> 7));
}
}
@@ -507,8 +523,8 @@ void CoreAudioAudio::write(uint16_t* finalWave, int length) {
current_buffer = 0;
}
while (filled_buffers >= (OPTION(kSoundBuffers) - 1)) {
wxMilliSleep(1);
while (filled_buffers >= OPTION(kSoundBuffers)) {
wxMilliSleep(((soundGetSampleRate() / 60) * 4) / (soundGetSampleRate() >> 7));
}
}

View File

@@ -1,7 +1,6 @@
wxvbam_bg MOFILE "translations/bg/LC_MESSAGES/wxvbam.mo"
wxvbam_br MOFILE "translations/br/LC_MESSAGES/wxvbam.mo"
wxvbam_cs MOFILE "translations/cs/LC_MESSAGES/wxvbam.mo"
wxvbam_de MOFILE "translations/de/LC_MESSAGES/wxvbam.mo"
wxvbam_el MOFILE "translations/el/LC_MESSAGES/wxvbam.mo"
wxvbam_en_US MOFILE "translations/en_US/LC_MESSAGES/wxvbam.mo"
wxvbam_es MOFILE "translations/es/LC_MESSAGES/wxvbam.mo"