summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-10-09 21:51:36 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-10-09 21:51:36 +0300
commita1101ec38cb29f701457215e35f75904326120cb (patch)
treee0b40731f65b9711d64353a78fd51ffa795b1b67 /src/ui/documentwidget.c
parent4bf163ecfac27c3dd86dff96df6f4647f9afe021 (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/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index bbe5ccba..db7d8c8a 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1680,11 +1680,14 @@ static void draw_PlayerUI(iPlayerUI *d, iPaint *p) {
1680 isPaused_Player(d->player) ? dim : bright, 1680 isPaused_Player(d->player) ? dim : bright,
1681 left_Alignment, 1681 left_Alignment,
1682 iRound(playTime)); 1682 iRound(playTime));
1683 int rightWidth = drawSevenSegmentTime_( 1683 int rightWidth = 0;
1684 init_I2(right_Rect(d->scrubberRect) - 2 * gap_UI, yMid - hgt / 2), 1684 if (totalTime > 0) {
1685 dim, 1685 rightWidth =
1686 right_Alignment, 1686 drawSevenSegmentTime_(init_I2(right_Rect(d->scrubberRect) - 2 * gap_UI, yMid - hgt / 2),
1687 iRound(totalTime)); 1687 dim,
1688 right_Alignment,
1689 iRound(totalTime));
1690 }
1688 /* Scrubber. */ 1691 /* Scrubber. */
1689 const int s1 = left_Rect(d->scrubberRect) + leftWidth + 6 * gap_UI; 1692 const int s1 = left_Rect(d->scrubberRect) + leftWidth + 6 * gap_UI;
1690 const int s2 = right_Rect(d->scrubberRect) - rightWidth - 6 * gap_UI; 1693 const int s2 = right_Rect(d->scrubberRect) - rightWidth - 6 * gap_UI;