Skip to content

Commit 5a7e8a3

Browse files
committed
COMMON: fix audio regression
1 parent eee5e3f commit 5a7e8a3

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

src/common/extlib.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ int slib_get_module_id(const char *name, const char *alias) {
219219
}
220220

221221
void slib_import_routines(slib_t *lib, int comp) {
222+
int total = 0;
222223
char buf[SB_KEYWORD_SIZE];
223224

224225
lib->sblib_func_exec = slib_getoptptr(lib, "sblib_func_exec");
@@ -228,6 +229,7 @@ void slib_import_routines(slib_t *lib, int comp) {
228229

229230
if (fcount && fgetname) {
230231
int count = fcount();
232+
total += count;
231233
for (int i = 0; i < count; i++) {
232234
if (fgetname(i, buf)) {
233235
strupper(buf);
@@ -250,6 +252,7 @@ void slib_import_routines(slib_t *lib, int comp) {
250252

251253
if (fcount && fgetname) {
252254
int count = fcount();
255+
total += count;
253256
for (int i = 0; i < count; i++) {
254257
if (fgetname(i, buf)) {
255258
strupper(buf);
@@ -266,6 +269,10 @@ void slib_import_routines(slib_t *lib, int comp) {
266269
}
267270
}
268271
}
272+
273+
if (!total) {
274+
log_printf("LIB: module has no exports...\n");
275+
}
269276
}
270277

271278
/**

src/lib/miniaudio

src/platform/console/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ bool process_options(int argc, char *argv[], char **runFile, bool *tmpFile) {
346346
int main(int argc, char *argv[]) {
347347
opt_autolocal = 0;
348348
opt_command[0] = '\0';
349+
opt_modpath[0] = '\0';
349350
opt_file_permitted = 1;
350351
opt_ide = 0;
351352
opt_loadmod = 0;
@@ -358,7 +359,6 @@ int main(int argc, char *argv[]) {
358359
os_graphics = 1;
359360
os_color_depth = 16;
360361

361-
strcpy(opt_modpath, ".");
362362
console_init();
363363

364364
char *file = NULL;

src/ui/audio.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "config.h"
1313
#include <stdio.h>
14+
#include <stdint.h>
1415
#include <unistd.h>
1516
#include "include/osd.h"
1617
#include "ui/strlib.h"
@@ -131,7 +132,7 @@ static void setup_format(ma_format format, ma_uint32 channels, ma_uint32 sampleR
131132
}
132133

133134
static void device_start() {
134-
if (ma_device__get_state(&device) != MA_STATE_STARTED) {
135+
if (ma_device_get_state(&device) != MA_STATE_STARTED) {
135136
ma_result result = ma_device_start(&device);
136137
if (result != MA_SUCCESS) {
137138
err_throw("Failed to start audio [%d]", result);

src/ui/system.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ bool System::execute(const char *bas) {
148148
// reset program controlled options
149149
opt_antialias = 1;
150150
opt_show_page = 0;
151-
opt_quiet = 1;
151+
152152
opt_pref_width = _output->getWidth();
153153
opt_pref_height = _output->getHeight();
154154
opt_base = 0;

0 commit comments

Comments
 (0)