Max Kellermann
5c19776f2f
input_stream: use "bool" instead of "int"
...
For boolean values and success flags, use bool instead of integer (1/0
for true/false, 0/-1 for success/failure).
2008-10-26 20:56:46 +01:00
Max Kellermann
dbc7e9ba2f
input_stream: no CamelCase
...
Renamed all functions and variables.
2008-10-26 20:34:47 +01:00
Max Kellermann
1d385190a0
path: removed pathcpy_trunc()
...
There was only one user of pathcpy_trunc(), which can be eliminated.
2008-10-20 22:18:42 +02:00
Max Kellermann
b73ecbb073
input: declare struct input_stream
...
Provide a struct type which can be forward-declared. The typedef
InputStream is deprecated now.
2008-10-17 17:53:48 +02:00
Max Kellermann
bae98f777b
decoder: notify player after entering decodeStart()
...
Wake up the player as soon as the decoder thread has entered its loop.
This fixes a dead lock when the input is blocking.
2008-10-17 17:53:44 +02:00
Max Kellermann
5b71d5f6f7
mapper: new song-to-filesystem mapper library
...
The mapper library maps directory and song objects to file system
paths. With this central library, the code mixture in path.c should
be cleaned up, and we will be able to add neat features like aliasing.
2008-10-14 11:10:49 +02:00
Max Kellermann
e1a4474ad4
song: don't allow calling song_get_url(NULL)
...
The runtime check suggests that the author has somehow thought
song_get_url(NULL) might be valid. It should not be. Replace it with
an assertion.
2008-10-08 11:06:37 +02:00
Max Kellermann
5e7b18f874
song: removed CamelCase
...
CamelCase is ugly... rename all functions.
2008-10-08 11:05:34 +02:00
Max Kellermann
b084bc28ed
use the "bool" data type instead of "int"
...
"bool" should be used in C99 programs for boolean values.
2008-10-08 11:03:39 +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
21d3d300fd
decoder: renamed plugin methods
...
Why have a "_func" prefix on all method names? Also don't typedef the
methods, there is no advantage in that.
2008-09-29 15:54:27 +02:00
Max Kellermann
58554e14f9
notify: protect notify->pending with the mutex
...
There was a known deadlocking bug in the notify library: when the
other thread set notify->pending after the according check in
notify_wait(), the latter thread was deadlocked. Resolve this by
synchronizing all accesses to notify->pending with the notify object's
mutex. Since notify_signal_sync() was never used, we can remove it.
As a consequence, we don't need notify_enter() and notify_leave()
anymore; eliminate them, too.
2008-09-26 09:57:11 +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
a2b24462e8
renamed decoderInit() to decoder_thread_start()
2008-08-26 08:44:29 +02:00
Max Kellermann
56cdce6946
renamed decode.h to decoder_control.h
2008-08-26 08:44:19 +02:00
Max Kellermann
dff8c6450b
renamed decode.c to decoder_thread.c
...
It should be obvious in which thread or context a function is being
executed at runtime. The code which was left in decode.c is for the
decoder thread itself; give the file a better name.
2008-08-26 08:44:12 +02:00