diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-14 22:19:21 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-14 22:19:21 +0300 |
commit | b073e4c6aad0a4c35ea89c4592d5b48a39bb61f5 (patch) | |
tree | 4c35506cd40ba0af0ef3c1d526435b8abd1b9f70 /src/ui/documentwidget.c | |
parent | 625e3046cc636db5b0325b96b4c22610252a5ab4 (diff) |
Use libmpg123 to decode MPEG audio
mpg123 is configured as an optional dependency. Works for full files currently.
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 5adb8bd0..b540a999 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1584,17 +1584,18 @@ static iBool processAudioPlayerEvents_DocumentWidget_(iDocumentWidget *d, const | |||
1584 | if (contains_Rect(rect, mouse)) { | 1584 | if (contains_Rect(rect, mouse)) { |
1585 | iPlayerUI ui; | 1585 | iPlayerUI ui; |
1586 | init_PlayerUI(&ui, plr, rect); | 1586 | init_PlayerUI(&ui, plr, rect); |
1587 | if (ev->type == SDL_MOUSEBUTTONDOWN || ev->type == SDL_MOUSEMOTION) { | 1587 | if (ev->type == SDL_MOUSEBUTTONDOWN && flags_Player(plr) & adjustingVolume_PlayerFlag && |
1588 | if (ev->type == SDL_MOUSEBUTTONDOWN && | 1588 | contains_Rect(adjusted_Rect(ui.volumeAdjustRect, |
1589 | flags_Player(plr) & adjustingVolume_PlayerFlag && | 1589 | zero_I2(), |
1590 | contains_Rect(adjusted_Rect(ui.volumeAdjustRect, | 1590 | init_I2(-height_Rect(ui.volumeAdjustRect), 0)), |
1591 | zero_I2(), | 1591 | mouse)) { |
1592 | init_I2(-height_Rect(ui.volumeAdjustRect), 0)), | 1592 | setGrabbedPlayer_DocumentWidget_(d, run); |
1593 | mouse)) { | 1593 | processEvent_Click(&d->click, ev); |
1594 | setGrabbedPlayer_DocumentWidget_(d, run); | 1594 | /* The rest is done in the DocumentWidget click responder. */ |
1595 | processEvent_Click(&d->click, ev); | 1595 | refresh_Widget(d); |
1596 | /* The rest is done in the DocumentWidget click responder. */ | 1596 | return iTrue; |
1597 | } | 1597 | } |
1598 | else if (ev->type == SDL_MOUSEBUTTONDOWN || ev->type == SDL_MOUSEMOTION) { | ||
1598 | refresh_Widget(d); | 1599 | refresh_Widget(d); |
1599 | return iTrue; | 1600 | return iTrue; |
1600 | } | 1601 | } |