Skip to content

Commit

Permalink
Merge pull request #46237 from hpvb/dylib_old_inttypes
Browse files Browse the repository at this point in the history
An update to the dylibloader for older inttypes
  • Loading branch information
akien-mga authored Feb 20, 2021
2 parents bb13ec9 + 5233d78 commit 67916b6
Show file tree
Hide file tree
Showing 9 changed files with 8,703 additions and 5,210 deletions.
10,274 changes: 6,422 additions & 3,852 deletions drivers/alsa/asound-so_wrap.c

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions drivers/alsa/asound-so_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
#define DYLIBLOAD_WRAPPER_ASOUND
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by /home/hp/Projects/godot/pulse/generate-wrapper.py 0.2 on 2021-02-18 00:19:14
// generated by /home/hp/Projects/godot/pulse/generate-wrapper.py 0.3 on 2021-02-20 00:08:12
// flags: /home/hp/Projects/godot/pulse/generate-wrapper.py --include /usr/include/alsa/asoundlib.h --sys-include <alsa/asoundlib.h> --soname libasound.so.2 --init-name asound --output-header asound-so_wrap.h --output-implementation asound-so_wrap.c
//
#include <stdint.h>

#define snd_asoundlib_version snd_asoundlib_version_dylibloader_orig_asound
#define snd_dlpath snd_dlpath_dylibloader_orig_asound
#define snd_dlopen snd_dlopen_dylibloader_orig_asound
Expand Down Expand Up @@ -5141,7 +5143,7 @@ extern void (*snd_midi_event_no_status_dylibloader_wrapper_asound)( snd_midi_eve
extern long (*snd_midi_event_encode_dylibloader_wrapper_asound)( snd_midi_event_t*,const unsigned char*, long, snd_seq_event_t*);
extern int (*snd_midi_event_encode_byte_dylibloader_wrapper_asound)( snd_midi_event_t*, int, snd_seq_event_t*);
extern long (*snd_midi_event_decode_dylibloader_wrapper_asound)( snd_midi_event_t*, unsigned char*, long,const snd_seq_event_t*);
int initialize_asound();
int initialize_asound(int verbose);
#ifdef __cplusplus
}
#endif
Expand Down
11 changes: 8 additions & 3 deletions drivers/alsa/audio_driver_alsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#ifdef PULSEAUDIO_ENABLED
extern "C" {
extern int initialize_pulse();
extern int initialize_pulse(int verbose);
}
#endif

Expand Down Expand Up @@ -153,13 +153,18 @@ Error AudioDriverALSA::init_device() {
}

Error AudioDriverALSA::init() {
#ifdef DEBUG_ENABLED
int dylibloader_verbose = 1;
#else
int dylibloader_verbose = 0;
#endif
#ifdef PULSEAUDIO_ENABLED
// On pulse enabled systems Alsa will silently use pulse.
// It doesn't matter if this fails as that likely means there is no pulse
initialize_pulse();
initialize_pulse(dylibloader_verbose);
#endif

if (initialize_asound()) {
if (initialize_asound(dylibloader_verbose)) {
return ERR_CANT_OPEN;
}

Expand Down
7 changes: 6 additions & 1 deletion drivers/pulseaudio/audio_driver_pulseaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,12 @@ Error AudioDriverPulseAudio::init_device() {
}

Error AudioDriverPulseAudio::init() {
if (initialize_pulse()) {
#ifdef DEBUG_ENABLED
int dylibloader_verbose = 1;
#else
int dylibloader_verbose = 0;
#endif
if (initialize_pulse(dylibloader_verbose)) {
return ERR_CANT_OPEN;
}

Expand Down
Loading

0 comments on commit 67916b6

Please sign in to comment.