Max Kellermann
d628eb3e8b
player_control: added player_control.thread
...
player_control.thread contains the handle of the player thread, or
NULL if the player thread isn't running.
2009-01-25 13:44:33 +01:00
Max Kellermann
9d0579996c
pcm_utils: moved code to pcm_volume.c
...
Moved the software volume code to a separate library.
2009-01-07 18:05:38 +01:00
Max Kellermann
fed719197c
song: allocate the result of song_get_url()
2009-01-04 19:09:34 +01:00
Max Kellermann
272ee5f7d2
event_pipe: replaced PIPE_EVENT_SIGNAL with main_notify
...
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.
2009-01-02 11:20:41 +01:00
Max Kellermann
22bb5a5856
event_pipe: renamed functions from main_notify_* to event_pipe_*
...
Continuing the previous patch.
2009-01-01 18:12:14 +01:00
Max Kellermann
9f5934d95b
main_notify: renamed source to event_pipe.c
...
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.
2009-01-01 18:12:00 +01:00
Max Kellermann
95b3430f52
removed os_compat.h
...
Only include headers which are really needed. os_compat.h aimed to
make MPD easily portable, but was never actually made portable.
2008-12-29 17:28:32 +01:00
Max Kellermann
5d56b6ced8
player_control: check if errored_song is set
...
getPlayerErrorStr() assumes that pc.errored_song is set when an error
occured. Since the song may have been deleted meanwhile, add a NULL
check.
2008-12-17 16:46:12 +01:00
Max Kellermann
13192546a8
playlist: clear pc.errored_song on delete
...
When a (remote) song is deleted from the playlist, there may still be
a reference to it in pc.errored_song. Clear this reference.
2008-12-17 16:45:49 +01:00
Max Kellermann
edcd45df94
pcm_volume: added constant PCM_VOLUME_1
...
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.
2008-11-11 16:32:32 +01:00
Max Kellermann
fdf0d46e3d
player: converted PLAYER_ERROR_* to enum
2008-11-03 21:49:40 +01:00
Max Kellermann
862bbc21a1
player: no CamelCase
...
Renamed variables and internal functions. Most of the
player_control.h API remains in CamelCase for now.
2008-11-03 21:49:29 +01:00
Max Kellermann
a3e3d2c950
command: added command "idle"
...
"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.
2008-10-14 22:38:14 +02:00
Max Kellermann
35a939e3e7
player: added commands QUEUE and CANCEL
...
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.
2008-10-12 00:07:54 +02:00
Max Kellermann
2fcbabf4d1
player: removed set_current_song()
...
set_current_song() is an internal function and consists of only one
assignment. Eliminate it.
2008-10-11 12:52:57 +02:00
Max Kellermann
42409a35e2
player: removed player_control.fileTime
...
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.
2008-10-11 12:52:51 +02:00
Max Kellermann
5de7521900
player: added player_get_audio_format()
...
player_get_audio_format() replaces getPlayerSampleRate(),
getPlayerBits(), getPlayerChannels().
2008-10-10 14:51:22 +02:00
Max Kellermann
0b4dfae22e
player: added player_control.audio_format
...
This replaces the attributes bits, channels, sampleRate.
2008-10-10 14:47:58 +02:00
Max Kellermann
5e7b18f874
song: removed CamelCase
...
CamelCase is ugly... rename all functions.
2008-10-08 11:05:34 +02:00
Max Kellermann
d562ba5fbb
song: converted typedef Song to struct song
...
Again, a data type which can be forward-declared.
2008-10-08 10:49:11 +02:00
Max Kellermann
a0272c2d61
notify: added notify_deinit()
...
Destroy the mutex when it is not used anymore.
2008-09-24 07:14:11 +02:00
Max Kellermann
a34e1d2b84
include cleanup
...
As usual, include only headers which are really needed.
2008-09-06 20:28:31 +02:00
Max Kellermann
f34f694ec3
moved player_command_finished() to player_thread.c
2008-08-26 08:45:15 +02:00
Max Kellermann
e2c8b960de
moved code to pc_init(), dc_init()
2008-08-26 08:45:14 +02:00
Max Kellermann
5e51fa020d
renamed player.c to player_control.c
...
Give player.c a better name, meaning that the code is used to control
the player thread.
2008-08-26 08:44:38 +02:00
Max Kellermann
4255bba0f7
moved global variable "pc" to player.h
...
This is the last of the three variables. Now we don't need
playerData.h anymore in most sources.
2008-08-26 08:41:05 +02:00