aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_thread.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* decoder: automatically flush the output buffer after decoder exitsMax Kellermann2008-10-291-0/+3
| | | | | | | A decoder_flush() invocation was missing in the FLAC plugin, resulting in casual assertion failures due to a wrong assumption about the last chunk's audio format. It's much easier to remove that decoder_flush() function and make the decoder thread call ob_flush().
* input_stream: use "bool" instead of "int"Max Kellermann2008-10-261-1/+1
| | | | | For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
* input_stream: no CamelCaseMax Kellermann2008-10-261-5/+5
| | | | Renamed all functions and variables.
* path: removed pathcpy_trunc()Max Kellermann2008-10-201-5/+2
| | | | There was only one user of pathcpy_trunc(), which can be eliminated.
* input: declare struct input_streamMax Kellermann2008-10-171-1/+1
| | | | | Provide a struct type which can be forward-declared. The typedef InputStream is deprecated now.
* decoder: notify player after entering decodeStart()Max Kellermann2008-10-171-0/+1
| | | | | Wake up the player as soon as the decoder thread has entered its loop. This fixes a dead lock when the input is blocking.
* mapper: new song-to-filesystem mapper libraryMax Kellermann2008-10-141-10/+11
| | | | | | 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.
* song: don't allow calling song_get_url(NULL)Max Kellermann2008-10-081-4/+1
| | | | | | 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.
* song: removed CamelCaseMax Kellermann2008-10-081-1/+1
| | | | CamelCase is ugly... rename all functions.
* use the "bool" data type instead of "int"Max Kellermann2008-10-081-3/+3
| | | | "bool" should be used in C99 programs for boolean values.
* song: converted typedef Song to struct songMax Kellermann2008-10-081-0/+1
| | | | Again, a data type which can be forward-declared.
* decoder: renamed plugin methodsMax Kellermann2008-09-291-19/+19
| | | | | Why have a "_func" prefix on all method names? Also don't typedef the methods, there is no advantage in that.
* notify: protect notify->pending with the mutexMax Kellermann2008-09-261-2/+0
| | | | | | | | | | 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.
* renamed player.c to player_control.cMax Kellermann2008-08-261-1/+1
| | | | | Give player.c a better name, meaning that the code is used to control the player thread.
* renamed decoderInit() to decoder_thread_start()Max Kellermann2008-08-261-1/+1
|
* renamed decode.h to decoder_control.hMax Kellermann2008-08-261-1/+1
|
* renamed decode.c to decoder_thread.cMax Kellermann2008-08-261-0/+199
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.