summaryrefslogtreecommitdiff
path: root/src/ui_act.c
AgeCommit message (Collapse)AuthorFilesLines
2018-09-15Implement audio bufferingedward-p1-1/+3
Prevent stuttering on low-power devices like Android phones by moving playback to its own thread and decoupling it from decoding through a reasonably sized buffer. Fixes #665.
2018-08-12Improve QuickMix selection error messageLars-Dominik Braun1-3/+3
See #668.
2018-03-15Properly protect player struct with mutexLars-Dominik Braun1-13/+13
The volatile keyword neither guarantees atomic access nor memory visibility[1]. Although this is usually not a problem on x86, it is incorrect to rely on this. Use mutex locks to protect all shared player variables and enforce memory visibility. [1] https://wiki.sei.cmu.edu/confluence/display/c/CON02-C.+Do+not+use+volatile+as+a+synchronization+primitive
2017-10-02Show station in song listsLars-Dominik Braun1-4/+4
Iff song’s station is not the current station. This is only the case for the song history right now. Closes #638
2017-04-26Fix use-after-free when deleting stationLars-Dominik Braun1-0/+2
Eventcmd uses both, selStation and selSong. Fixes #617.
2016-04-14Fix songfinish event when changing stationsLars-Dominik Braun1-8/+10
The event did not contain any song data (title, artist, …), because the playlist was destroyed by the ui command. Now the actual station switch is deferred by introducing nextStation and letting the main loop handle it. Fixes issue #584.
2015-08-10Move feature test macros to config.hLars-Dominik Braun1-1/+1
I removed most of the *BSD-related stuff, because I can’t test these. If this breaks your build, send me a patch please.
2015-08-10Add feature to change Pandora settingsLars-Dominik Braun1-0/+103
Currently exposed settings: Username, password and explicit content filter. New key for settings is ‘!’, changeable with “act_settings”. Fixes issues #524 and #506.
2015-04-06Switch back to libcurlLars-Dominik Braun1-15/+15
Drops libwaitress. Adds the new dependency libcurl and drops gnutls. I wouldn’t say writing my own HTTP library was a mistake – it was not and the experience gained was worth it. Instead I have to acknowledge that libcurl is just better than my own implementation. Sure, it does a lot more than HTTP – one could call that bloat. Yet if you just want to get the job done™ reusing code is the way to go. See #512 and #513.
2015-03-07Fix upcoming songs assertion failureLars-Dominik Braun1-3/+1
This should not be an assertion, it is expected to happen. Test with `echo -e "s0\nu" > ctl`. Fixes #509.
2014-07-21Refactor audio player, add retry timeoutLars-Dominik Braun1-1/+1
Fixes #442.
2014-03-31Use libav/ffmpeg for audio decodingLars-Dominik Braun1-8/+4
libav 9.12 and ffmpeg 2.2 have been tested. Here’s why: My mp4 “parser” *cough* never was a mp4 parser in the sense that it actually understood the file format. Instead it grepped the input stream for “magic” strings (section identifiers). That alone should be sufficient to throw away the code and rewrite it. Additionally libfaad2 has not been updated for ages. I guess it was abandoned in favor of libav/ffmpeg. With libav/ffmpeg, which we support both as long as the API’s don’t diverge too much, pianobar gains fast and reliable AAC and MP3 decoding without bothering too much about the details. Most users will have it installed already. On my own machine libav consumes about 2/3 CPU time compared to the previous solution when playing AAC. Unfortunately memory usage doubled and my attempts to disable unused protocols/formats/codec failed due to libav’s API limitations. While cleaning up a small detail regarding the eventcmd API has changed too: Song duration and position are measured in seconds instead of milliseconds now. Since libav/ffmpeg keeps track of accurate timing the precision pianobar keeps track of can be reduced, while still being sufficient for most users.
2014-03-13fix warnings now noted due to format string checkingCody P Schafer1-1/+1
2014-01-12Return if station info request failsLars-Dominik Braun1-1/+5
2013-08-07piano: Generic linked listsLars-Dominik Braun1-24/+13
Introduces generic linked list structure and functions (like append, delete, …). Removes a lot of copy&pasted code and improves code readability/reusability. Heads up: This change breaks libpiano’s ABI.
2013-07-07Add keyboard shortcut to reset volumeLars-Dominik Braun1-4/+14
Closes #377.
2013-03-27Add missing events to genre station selectionLars-Dominik Braun1-2/+68
Two new events: stationfetchgenre, stationaddgenre
2013-03-20Fix station name when deleting a stationLars-Dominik Braun1-1/+1
2013-03-20Transform actual station when loving/banning songsLars-Dominik Braun1-2/+16
Loving/banning a song from a shared station while playing quickmix resulted in “call not allowed”, because we tried to transform the quickmix instead of the song’s real station. Fixes #354.
2013-02-26Add play and pause commandsAdam Simpkins1-9/+27
Add commands that always play and always pause, in addition to the current toggle pause command. Closes #342.
2012-07-06Add feature: Create new station from selected songLars-Dominik Braun1-6/+41
New keybinding ‘v’, new setting act_createstationfromsong.
2012-06-26piano: Remove move songLars-Dominik Braun1-37/+0
Doesn’t work with JSON API. See #280.
2012-06-14piano: Remove unused structLars-Dominik Braun1-10/+6
2012-05-26Revert "Remove pause mutex/add pthread cleanup function"Lars-Dominik Braun1-16/+9
This reverts commit 7df9371491e96a99c1e463f7787aede352ac5a37.
2012-05-26Revert "Fix player thread teardown/signals on OS X"Lars-Dominik Braun1-4/+0
This reverts commit f6dffd1822404522b8354ac453a911a0d98bfc61.
2012-05-17Fix player thread teardown/signals on OS XLars-Dominik Braun1-0/+4
1) Realtime signals don’t exist in OS X 2) libao apparently locks a mutex in ao_play, which is locked again in ao_close and causes a deadlock Closes #256, although I’m considering the option of partially reverting 7df9371491e96a99c1e463f7787aede352ac5a37, as this introduces more nasty behavior than it solves.
2012-05-14Remove pause mutex/add pthread cleanup functionLars-Dominik Braun1-9/+16
No more mutex locking/checking for quit condition. Should (slightly) increase responsiveness of the player thread. Closes #250.
2012-05-02Really delete seed suggestionsLars-Dominik Braun1-2/+2
There does not seem to be an API call for that.
2012-05-01piano: Move to JSON API (v5)Lars-Dominik Braun1-4/+2
In random order: Thanks to Chris Eby for his work on pithos, to an anonymous coward for sending me his Android client, to Alex Howard for sending me the webOS client, to ZigZagJoe for providing a temporary fix and thanks to everyone who sent Pandora a message. Although there are a few rough edges here and there this fixes #236.
2012-04-20Don’t unlock mutex that is not lockedLars-Dominik Braun1-1/+3
Strict pthread implementations (like OpenBSD’s rthreads with PTHREAD_MUTEX_TYPE_STRICT_NP set) don’t allow unlocking a mutex that is not locked, resulting in abort() being called. Always aquiring the lock before unlocking it while skipping to the next song fixes this. Thanks to David Coppa.
2012-03-17Auto-select last remaining item of filtered listLars-Dominik Braun1-4/+5
See #231.
2011-12-23Fix warnings found by -WshadowLars-Dominik Braun1-12/+12
2011-11-19Dymanic station management questionLars-Dominik Braun1-4/+46
Enable/disable delete options depending on availability.
2011-11-09piano: Protocol version bump (v33)Lars-Dominik Braun1-4/+2
addFeedback call changed. Input keys changed. Thanks to ZigZagJoe. Closes #171
2011-10-22Support seed stationsLars-Dominik Braun1-6/+21
Fixes #165
2011-09-22piano: Protocol version bump (v32)Lars-Dominik Braun1-3/+3
Keys stay the same. Quickmix and seed suggestion API calls changed. Listener id is not part of the url any more. Bookmark API calls seem to be deprecated.
2011-07-29Fix quickmix station filteringLars-Dominik Braun1-0/+5
Regression introduced by 0728b6a89de607e211bbc075b34f08495ac0d22f
2011-07-25Added toggle to quickmix menuLars-Dominik Braun1-3/+41
Closes #141
2011-06-26Send metadata of song related to event to eventcmdLars-Dominik Braun1-1/+1
...instead of the current song. Closes #131.
2011-05-18Configureable format stringsLars-Dominik Braun1-44/+41
Closes #88
2011-05-05Replace generic "search for artist/title" messageLars-Dominik Braun1-2/+4
Closes #115
2011-04-04Expose songDetailUrl to eventcmd scriptLars-Dominik Braun1-0/+2
See #99.
2011-03-26Filter-/searchable song listLars-Dominik Braun1-1/+1
2011-03-21Need more spaceLars-Dominik Braun1-3/+3
2011-03-21Enable delete seed in station managerLars-Dominik Braun1-2/+16
2011-03-21Enable delete feedback in station managerLars-Dominik Braun1-1/+3
2011-03-21Initial station managerLars-Dominik Braun1-0/+42
Not functional yet.
2011-02-26Always add song to historyLars-Dominik Braun1-3/+7
2011-02-26Rewrite input processingLars-Dominik Braun1-161/+97
2011-02-02BarReadline rewriteLars-Dominik Braun1-14/+16
Doesn't use c streams any more, allows multiplexing of fifo/stdin in all situations.