diff --git a/CMakeLists.txt b/CMakeLists.txt
index a63d7c9026..26a13fcaf6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1087,22 +1087,22 @@ endif()
if(NOT LIBRETRO)
target_sources(${PROJECT_NAME} PRIVATE
- core/oslib/audiobackend_alsa.cpp
- core/oslib/audiobackend_coreaudio.cpp
- core/oslib/audiobackend_directsound.cpp
- core/oslib/audiobackend_libao.cpp
- core/oslib/audiobackend_null.cpp
- core/oslib/audiobackend_oboe.cpp
- core/oslib/audiobackend_omx.cpp
- core/oslib/audiobackend_oss.cpp
- core/oslib/audiobackend_pulseaudio.cpp
- core/oslib/audiobackend_sdl2.cpp
- core/oslib/audiostream.cpp
+ core/audio/audiobackend_alsa.cpp
+ core/audio/audiobackend_coreaudio.cpp
+ core/audio/audiobackend_directsound.cpp
+ core/audio/audiobackend_libao.cpp
+ core/audio/audiobackend_null.cpp
+ core/audio/audiobackend_oboe.cpp
+ core/audio/audiobackend_omx.cpp
+ core/audio/audiobackend_oss.cpp
+ core/audio/audiobackend_pulseaudio.cpp
+ core/audio/audiobackend_sdl2.cpp
+ core/audio/audiostream.cpp
core/oslib/oslib.cpp)
endif()
target_sources(${PROJECT_NAME} PRIVATE
- core/oslib/audiostream.h
+ core/audio/audiostream.h
core/oslib/directory.h
core/oslib/host_context.h
core/oslib/oslib.h
diff --git a/core/oslib/audiobackend_alsa.cpp b/core/audio/audiobackend_alsa.cpp
similarity index 100%
rename from core/oslib/audiobackend_alsa.cpp
rename to core/audio/audiobackend_alsa.cpp
diff --git a/core/oslib/audiobackend_coreaudio.cpp b/core/audio/audiobackend_coreaudio.cpp
similarity index 100%
rename from core/oslib/audiobackend_coreaudio.cpp
rename to core/audio/audiobackend_coreaudio.cpp
diff --git a/core/oslib/audiobackend_directsound.cpp b/core/audio/audiobackend_directsound.cpp
similarity index 100%
rename from core/oslib/audiobackend_directsound.cpp
rename to core/audio/audiobackend_directsound.cpp
diff --git a/core/oslib/audiobackend_libao.cpp b/core/audio/audiobackend_libao.cpp
similarity index 100%
rename from core/oslib/audiobackend_libao.cpp
rename to core/audio/audiobackend_libao.cpp
diff --git a/core/oslib/audiobackend_null.cpp b/core/audio/audiobackend_null.cpp
similarity index 100%
rename from core/oslib/audiobackend_null.cpp
rename to core/audio/audiobackend_null.cpp
diff --git a/core/oslib/audiobackend_oboe.cpp b/core/audio/audiobackend_oboe.cpp
similarity index 100%
rename from core/oslib/audiobackend_oboe.cpp
rename to core/audio/audiobackend_oboe.cpp
diff --git a/core/oslib/audiobackend_omx.cpp b/core/audio/audiobackend_omx.cpp
similarity index 100%
rename from core/oslib/audiobackend_omx.cpp
rename to core/audio/audiobackend_omx.cpp
diff --git a/core/oslib/audiobackend_oss.cpp b/core/audio/audiobackend_oss.cpp
similarity index 100%
rename from core/oslib/audiobackend_oss.cpp
rename to core/audio/audiobackend_oss.cpp
diff --git a/core/oslib/audiobackend_pulseaudio.cpp b/core/audio/audiobackend_pulseaudio.cpp
similarity index 100%
rename from core/oslib/audiobackend_pulseaudio.cpp
rename to core/audio/audiobackend_pulseaudio.cpp
diff --git a/core/oslib/audiobackend_sdl2.cpp b/core/audio/audiobackend_sdl2.cpp
similarity index 100%
rename from core/oslib/audiobackend_sdl2.cpp
rename to core/audio/audiobackend_sdl2.cpp
diff --git a/core/oslib/audiostream.cpp b/core/audio/audiostream.cpp
similarity index 100%
rename from core/oslib/audiostream.cpp
rename to core/audio/audiostream.cpp
diff --git a/core/oslib/audiostream.h b/core/audio/audiostream.h
similarity index 100%
rename from core/oslib/audiostream.h
rename to core/audio/audiostream.h
diff --git a/core/emulator.cpp b/core/emulator.cpp
index 88e38dafd2..81bb4a7702 100644
--- a/core/emulator.cpp
+++ b/core/emulator.cpp
@@ -30,7 +30,7 @@
#include "hw/sh4/sh4_sched.h"
#include "hw/flashrom/nvmem.h"
#include "cheats.h"
-#include "oslib/audiostream.h"
+#include "audio/audiostream.h"
#include "debug/gdb_server.h"
#include "hw/pvr/Renderer_if.h"
#include "hw/arm7/arm7_rec.h"
diff --git a/core/hw/aica/sgc_if.cpp b/core/hw/aica/sgc_if.cpp
index f2f7fe0b48..013cebea47 100755
--- a/core/hw/aica/sgc_if.cpp
+++ b/core/hw/aica/sgc_if.cpp
@@ -15,7 +15,7 @@
along with reicast. If not, see .
Some PLFO and FEG code from Highly_Theoretical lib by Neill Corlett
- (https://github.com/kode54/Highly_Theoretical)
+ (https://gitlab.com/kode54/highly_theoretical)
*/
#include "sgc_if.h"
@@ -23,7 +23,7 @@
#include "aica_if.h"
#include "aica_mem.h"
#include "dsp.h"
-#include "oslib/audiostream.h"
+#include "audio/audiostream.h"
#include "hw/gdrom/gdrom_if.h"
#include "cfg/option.h"
#include "serialize.h"
diff --git a/core/hw/maple/maple_devs.cpp b/core/hw/maple/maple_devs.cpp
index 41a366c723..ddfe7aa3ff 100755
--- a/core/hw/maple/maple_devs.cpp
+++ b/core/hw/maple/maple_devs.cpp
@@ -3,7 +3,7 @@
#include "maple_helper.h"
#include "maple_if.h"
#include "hw/pvr/spg.h"
-#include "oslib/audiostream.h"
+#include "audio/audiostream.h"
#include "oslib/oslib.h"
#include "hw/aica/sgc_if.h"
#include "cfg/option.h"
diff --git a/core/rend/gui.cpp b/core/rend/gui.cpp
index 534ef2e30c..1cf361c8d5 100644
--- a/core/rend/gui.cpp
+++ b/core/rend/gui.cpp
@@ -30,7 +30,7 @@
#include "game_scanner.h"
#include "version.h"
#include "oslib/oslib.h"
-#include "oslib/audiostream.h"
+#include "audio/audiostream.h"
#include "imgread/common.h"
#include "log/LogManager.h"
#include "emulator.h"
diff --git a/shell/android-studio/flycast/src/main/jni/src/Android.cpp b/shell/android-studio/flycast/src/main/jni/src/Android.cpp
index b79afcd172..0692c7c9a7 100644
--- a/shell/android-studio/flycast/src/main/jni/src/Android.cpp
+++ b/shell/android-studio/flycast/src/main/jni/src/Android.cpp
@@ -4,7 +4,7 @@
#include "hw/maple/maple_devs.h"
#include "hw/maple/maple_if.h"
#include "hw/naomi/naomi_cart.h"
-#include "oslib/audiostream.h"
+#include "audio/audiostream.h"
#include "imgread/common.h"
#include "rend/gui.h"
#include "rend/osd.h"
diff --git a/shell/libretro/audiostream.cpp b/shell/libretro/audiostream.cpp
index b27d7e4953..197093b549 100644
--- a/shell/libretro/audiostream.cpp
+++ b/shell/libretro/audiostream.cpp
@@ -16,7 +16,7 @@
*/
#include "types.h"
#include "cfg/option.h"
-#include "oslib/audiostream.h"
+#include "audio/audiostream.h"
#include "emulator.h"
#include