7 Commits

Author SHA1 Message Date
hans 7a34caf066 - 2026-04-23 11:23:07 +02:00
hans 28854a6a38 - 2026-04-23 11:22:36 +02:00
hans cefbbeb41d - 2026-04-23 11:20:48 +02:00
hans f14089b153 - 2026-04-23 11:16:04 +02:00
hans 348b1d6411 Trying to overcome gapless problems with mpg123 + output to WAV 2026-04-23 11:03:02 +02:00
hans ee7e62890f mpg123 support 2026-04-22 08:50:44 +02:00
hans b02ac26bd5 audio decoding 2026-04-21 22:53:25 +02:00
10 changed files with 15 additions and 3 deletions
+3
View File
@@ -16,4 +16,7 @@
*.mod
*.smod
build
lib/linux-x86_64
+2
View File
@@ -24,3 +24,5 @@ zip: install
clean:
rm -rf build
+9 -2
View File
@@ -351,7 +351,7 @@ static void init_ao()
}
}
void *ao_create_async(int bits, int rate, int channels, int byte_format)
void *ao_create_async(int bits, int rate, int channels, int byte_format, const char *wav_file_output)
{
init_ao();
@@ -364,7 +364,14 @@ void *ao_create_async(int bits, int rate, int channels, int byte_format)
fmt.channels = channels;
fmt.matrix = NULL;
ao_device *dev = ao_open_live(ao_default_driver_id(), &fmt, NULL);
ao_device *dev;
if (wav_file_output != NULL) {
int driver_id = ao_driver_id("wav");
dev = ao_open_file(driver_id, wav_file_output, 1, &fmt, NULL);
} else {
dev = ao_open_live(ao_default_driver_id(), &fmt, NULL);
}
if (dev == NULL) {
fprintf(stderr, "Cannot open ao-device, error code = %d\n", errno);
return NULL;
+1 -1
View File
@@ -29,7 +29,7 @@ typedef struct {
} BufferInfo_t;
AOPLAYASYNC_EXPORT int ao_async_version(void);
AOPLAYASYNC_EXPORT void *ao_create_async(int bits, int rate, int channels, int byte_format);
AOPLAYASYNC_EXPORT void *ao_create_async(int bits, int rate, int channels, int byte_format, const char *wav_file_output);
AOPLAYASYNC_EXPORT void ao_stop_async(void *handle);
AOPLAYASYNC_EXPORT void ao_play_async(void *handle, int music_id, double at_second, double music_duration, int buf_size, void *mem, BufferInfo_t info);
AOPLAYASYNC_EXPORT void ao_clear_async(void *handle);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.