aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* player_control: reset pc.error if pc.errored_song is clearedMax Kellermann2009-01-291-1/+3
| | | | | | When the playlist is cleared, pc.errored_song is also cleared. This causes pc_errored_song_uri() to crash, because it assumes that pc.errored_song is set. Reset pc.error to fix that assumption.
* player_control: added player_control.threadMax Kellermann2009-01-251-0/+4
| | | | | player_control.thread contains the handle of the player thread, or NULL if the player thread isn't running.
* pcm_utils: moved code to pcm_volume.cMax Kellermann2009-01-071-1/+1
| | | | Moved the software volume code to a separate library.
* song: allocate the result of song_get_url()Max Kellermann2009-01-041-13/+19
|
* event_pipe: replaced PIPE_EVENT_SIGNAL with main_notifyMax Kellermann2009-01-021-2/+2
| | | | | | There is only one location using PIPE_EVENT_SIGNAL: to synchronize player_command() with player_command_finished(). Use the "notify" library instead of the event_pipe here.
* event_pipe: renamed functions from main_notify_* to event_pipe_*Max Kellermann2009-01-011-1/+1
| | | | Continuing the previous patch.
* main_notify: renamed source to event_pipe.cMax Kellermann2009-01-011-1/+1
| | | | | | We are going to migrate away from the concept of notifying the main thread. There should be events sent to it instead. This patch starts a series to implement that.
* removed os_compat.hMax Kellermann2008-12-291-1/+3
| | | | | Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
* player_control: check if errored_song is setMax Kellermann2008-12-171-4/+14
| | | | | | getPlayerErrorStr() assumes that pc.errored_song is set when an error occured. Since the song may have been deleted meanwhile, add a NULL check.
* playlist: clear pc.errored_song on deleteMax Kellermann2008-12-171-0/+7
| | | | | When a (remote) song is deleted from the playlist, there may still be a reference to it in pc.errored_song. Clear this reference.
* pcm_volume: added constant PCM_VOLUME_1Max Kellermann2008-11-111-2/+7
| | | | | | | It may be desirable to change the range of integer volume levels (e.g. to 1024, which may utilize shifts instead of expensive integer divisions). Introduce the constant PCM_VOLUME_1 which describes the integer value for "100% volume". This is currently 1000.
* player: converted PLAYER_ERROR_* to enumMax Kellermann2008-11-031-1/+4
|
* player: no CamelCaseMax Kellermann2008-11-031-10/+10
| | | | | Renamed variables and internal functions. Most of the player_control.h API remains in CamelCase for now.
* command: added command "idle"Max Kellermann2008-10-141-1/+14
| | | | | | "idle" waits until something noteworthy happens on the server, e.g. song change, playlist modified, database updated. This allows clients to keep up to date without polling.
* player: added commands QUEUE and CANCELMax Kellermann2008-10-121-39/+7
| | | | | | QUEUE adds a new song to the player's queue. CANCEL clears the queue. These two commands replace the old and complex queueState and queueLockState code.
* player: removed set_current_song()Max Kellermann2008-10-111-13/+5
| | | | | set_current_song() is an internal function and consists of only one assignment. Eliminate it.
* player: removed player_control.fileTimeMax Kellermann2008-10-111-1/+0
| | | | | | | This variable is superfluous, it is only used to copy its value to player_control.totalTime. Since the original source of this value (song->tag->time) will still be available at this point, we can safely remove fileTime.
* player: added player_get_audio_format()Max Kellermann2008-10-101-15/+0
| | | | | player_get_audio_format() replaces getPlayerSampleRate(), getPlayerBits(), getPlayerChannels().
* player: added player_control.audio_formatMax Kellermann2008-10-101-5/+5
| | | | This replaces the attributes bits, channels, sampleRate.
* song: removed CamelCaseMax Kellermann2008-10-081-3/+3
| | | | CamelCase is ugly... rename all functions.
* song: converted typedef Song to struct songMax Kellermann2008-10-081-5/+11
| | | | Again, a data type which can be forward-declared.
* notify: added notify_deinit()Max Kellermann2008-09-241-0/+5
| | | | Destroy the mutex when it is not used anymore.
* include cleanupMax Kellermann2008-09-061-1/+1
| | | | As usual, include only headers which are really needed.
* moved player_command_finished() to player_thread.cMax Kellermann2008-08-261-8/+0
|
* moved code to pc_init(), dc_init()Max Kellermann2008-08-261-0/+13
|
* renamed player.c to player_control.cMax Kellermann2008-08-261-1/+241
| | | | | Give player.c a better name, meaning that the code is used to control the player thread.
* moved global variable "pc" to player.hMax Kellermann2008-08-261-0/+21
This is the last of the three variables. Now we don't need playerData.h anymore in most sources.