Adding skeleton that at least compiles for audio4.c
This commit is contained in:
@@ -144,6 +144,10 @@ else()
|
||||
option(NEW_DYNAREC "Use the PCem v15 (\"new\") dynamic recompiler" OFF)
|
||||
endif()
|
||||
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "NetBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD"))
|
||||
set(AUDIO4 ON)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(QT ON)
|
||||
option(CPPTHREADS "C++11 threads" OFF)
|
||||
|
||||
@@ -53,7 +53,10 @@ add_library(snd OBJECT
|
||||
snd_opl_esfm.c
|
||||
)
|
||||
|
||||
if(OPENAL)
|
||||
# TODO: Should platform-specific audio driver be here?
|
||||
if(AUDIO4)
|
||||
target_sources(snd PRIVATE audio4.c)
|
||||
elseif(OPENAL)
|
||||
if(VCPKG_TOOLCHAIN)
|
||||
find_package(OpenAL CONFIG REQUIRED)
|
||||
elseif(MINGW)
|
||||
|
||||
51
src/sound/audio4.c
Normal file
51
src/sound/audio4.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Interface to audio(4).
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Nishi
|
||||
*
|
||||
* Copyright 2025 Nishi.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
|
||||
#include <86box/sound.h>
|
||||
|
||||
#define FREQ SOUND_FREQ
|
||||
#define BUFLEN SOUNDBUFLEN
|
||||
|
||||
static int midi_freq = 44100;
|
||||
static int midi_buf_size = 4410;
|
||||
|
||||
void closeal(void){
|
||||
}
|
||||
|
||||
void inital(void){
|
||||
}
|
||||
|
||||
void givealbuffer(const void *buf){
|
||||
}
|
||||
|
||||
void givealbuffer_music(const void *buf){
|
||||
}
|
||||
|
||||
void givealbuffer_wt(const void *buf){
|
||||
}
|
||||
|
||||
void givealbuffer_cd(const void *buf){
|
||||
}
|
||||
|
||||
void givealbuffer_midi(const void *buf, const uint32_t size){
|
||||
}
|
||||
|
||||
void al_set_midi(const int freq, const int buf_size){
|
||||
midi_freq = freq;
|
||||
midi_buf_size = buf_size;
|
||||
}
|
||||
Reference in New Issue
Block a user