From c08a8581eed767564d1afe359fdcf6ccbdb4d744 Mon Sep 17 00:00:00 2001 From: bitkeeper Date: Tue, 9 Mar 2021 18:33:05 +0100 Subject: [PATCH 1/3] Added cross-origin header to http headers of the http output. The current http output doesn't provide a header for cross-origin support. This prevents to use the mpd http stream directly from an other webapplication due the origin from the webpage differs from then the audio stream. The fix is to add the following header to the http response: Access-Control-Allow-Origin: * --- NEWS | 1 + src/output/plugins/httpd/HttpdClient.cxx | 1 + src/output/plugins/httpd/IcyMetaDataServer.cxx | 1 + 3 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index a95f44537..1c0a4b69c 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ ver 0.22.7 (not yet released) * storage - curl: don't use glibc extension * output + - httpd: send header "Access-Control-Allow-Origin: *" - wasapi: add algorithm for finding usable audio format - wasapi: use default device only if none was configured - wasapi: add DoP support diff --git a/src/output/plugins/httpd/HttpdClient.cxx b/src/output/plugins/httpd/HttpdClient.cxx index 8a88b131d..dbe8f63fa 100644 --- a/src/output/plugins/httpd/HttpdClient.cxx +++ b/src/output/plugins/httpd/HttpdClient.cxx @@ -162,6 +162,7 @@ HttpdClient::SendResponse() noexcept "Connection: close\r\n" "Pragma: no-cache\r\n" "Cache-Control: no-cache, no-store\r\n" + "Access-Control-Allow-Origin: *\r\n" "\r\n", httpd.content_type); response = buffer; diff --git a/src/output/plugins/httpd/IcyMetaDataServer.cxx b/src/output/plugins/httpd/IcyMetaDataServer.cxx index d746d0a0a..1323b486f 100644 --- a/src/output/plugins/httpd/IcyMetaDataServer.cxx +++ b/src/output/plugins/httpd/IcyMetaDataServer.cxx @@ -45,6 +45,7 @@ icy_server_metadata_header(const char *name, "Connection: close\r\n" "Pragma: no-cache\r\n" "Cache-Control: no-cache, no-store\r\n" + "Access-Control-Allow-Origin: *\r\n" "\r\n", name, genre, From 4bcdcca7f503064812a0da804d938af7c97d5b6c Mon Sep 17 00:00:00 2001 From: Shen-Ta Hsieh Date: Sat, 13 Mar 2021 14:13:27 +0800 Subject: [PATCH 2/3] output/wasapi: use calculated new buffer instead old one --- src/output/plugins/wasapi/WasapiOutputPlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx index fed16fbee..97b66a998 100644 --- a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx +++ b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx @@ -724,7 +724,7 @@ WasapiOutput::Play(const void *chunk, size_t size) return size; do { - const size_t consumed_size = thread->Push({chunk, size}); + const size_t consumed_size = thread->Push({input.data, input.size}); if (consumed_size == 0) { thread->Wait(); From 6dfebf7df9596fc8f1a3f07d2270bc646e08c7b2 Mon Sep 17 00:00:00 2001 From: John Regan Date: Fri, 12 Mar 2021 18:42:45 -0500 Subject: [PATCH 3/3] gme: add support for rsn files Upcoming release of game-music-emu will support it, details here: https://bitbucket.org/mpyne/game-music-emu/pull-requests/23/rsn-support --- NEWS | 1 + src/decoder/plugins/GmeDecoderPlugin.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 1c0a4b69c..738904249 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.22.7 (not yet released) - don't use glibc extension to parse time stamps * decoder - ffmpeg: fix build problem with FFmpeg 3.4 + - gme: support RSN files * storage - curl: don't use glibc extension * output diff --git a/src/decoder/plugins/GmeDecoderPlugin.cxx b/src/decoder/plugins/GmeDecoderPlugin.cxx index 86efd7288..f279d95b0 100644 --- a/src/decoder/plugins/GmeDecoderPlugin.cxx +++ b/src/decoder/plugins/GmeDecoderPlugin.cxx @@ -344,7 +344,7 @@ gme_container_scan(Path path_fs) static const char *const gme_suffixes[] = { "ay", "gbs", "gym", "hes", "kss", "nsf", - "nsfe", "sap", "spc", "vgm", "vgz", + "nsfe", "rsn", "sap", "spc", "vgm", "vgz", nullptr };