diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-09 21:51:36 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-09 21:51:36 +0300 |
commit | a1101ec38cb29f701457215e35f75904326120cb (patch) | |
tree | e0b40731f65b9711d64353a78fd51ffa795b1b67 /src/gmrequest.c | |
parent | 4bf163ecfac27c3dd86dff96df6f4647f9afe021 (diff) |
Support Ogg Vorbis audio
Playback starts as soon as possible, so one can listen while streaming.
stb_vorbis.c needed a tiny tweak to not die on a file without (Ogg? Vorbis?) comments.
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r-- | src/gmrequest.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c index 161c654c..dd2c2720 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c | |||
@@ -457,6 +457,9 @@ void submit_GmRequest(iGmRequest *d) { | |||
457 | else if (endsWithCase_String(path, ".wav")) { | 457 | else if (endsWithCase_String(path, ".wav")) { |
458 | setCStr_String(&d->resp.meta, "audio/wave"); | 458 | setCStr_String(&d->resp.meta, "audio/wave"); |
459 | } | 459 | } |
460 | else if (endsWithCase_String(path, ".ogg")) { | ||
461 | setCStr_String(&d->resp.meta, "audio/ogg"); | ||
462 | } | ||
460 | else { | 463 | else { |
461 | setCStr_String(&d->resp.meta, "application/octet-stream"); | 464 | setCStr_String(&d->resp.meta, "application/octet-stream"); |
462 | } | 465 | } |