- 10 Oct, 2008 2 commits
-
-
Max Kellermann authored
This replaces the attributes bits, channels, sampleRate.
-
Max Kellermann authored
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
-
- 08 Oct, 2008 3 commits
-
-
Max Kellermann authored
CamelCase is ugly... rename all functions.
-
Max Kellermann authored
"bool" should be used in C99 programs for boolean values.
-
Max Kellermann authored
Again, a data type which can be forward-declared.
-
- 29 Sep, 2008 1 commit
-
-
Max Kellermann authored
pause() puts the audio output into pause mode: if supported, it may perform a special action, which keeps the device open, but does not play anything. Output plugins like "shout" might want to play silence during pause, so their clients won't be disconnected. Plugins which do not support pausing will simply be closed, and have to be reopened when unpaused. This pach includes an implementation for the shout plugin, which sends silence chunks.
-
- 26 Sep, 2008 1 commit
-
-
Max Kellermann authored
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.
-
- 07 Sep, 2008 1 commit
-
-
Max Kellermann authored
Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
-
- 26 Aug, 2008 32 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
Give player.c a better name, meaning that the code is used to control the player thread.
-
Max Kellermann authored
-
Max Kellermann authored
This is the last of the three variables. Now we don't need playerData.h anymore in most sources.
-
Max Kellermann authored
Now that "dc" is available here, we don't have to pass it to decoder_is_idle() and decoder_is_starting() anymore.
-
Max Kellermann authored
decode() is a trivial wrapper for decodeParent(). Merge both and rename them to do_play().
-
Max Kellermann authored
Unfortunately, we have to pass the DecoderControl pointer to these inline functions, because the global variable "dc" may not be available here. This will be fixed later.
-
Max Kellermann authored
When dc->error!=NOERROR, we do not need to check state!=START. Simplify the checks by moving the error check to the top.
-
Max Kellermann authored
The decoder thread is responsible for resetting dc->command after a command was executed. As a consequence, we can assume that dc->command is already NONE after decoder_stop().
-
Max Kellermann authored
The source "decoder_control.c" provides an API for controlling the decoder. This replaces various direct accesses to the DecoderControl struct.
-
Max Kellermann authored
-
Max Kellermann authored
playerKill() was marked as deprecated, but it seems like a good idea to do proper cleanup in all threads (e.g. for usable valgrind results). Introduce the command "EXIT" which makes the player thread exit cleanly.
-
Max Kellermann authored
playerWait() stops the player thread (twice!) and closes the output device. It should be well enough to just send CLOSE_AUDIO, without STOP. This requires a tiny change to the player thread code: make it break when CLOSE_AUDIO is sent.
-
Max Kellermann authored
-
Max Kellermann authored
To make the code more consistent, call quitDecode() only at the end of decodeParent().
-
Max Kellermann authored
Move code which runs in the player thread to player_thread.c. Having a lot of player thread code in decode.c isn't easy to understand.
-
Max Kellermann authored
decode.c should be a lot smaller; start by moving all code which handles cross-fading to crossfade.c. Also includes camelCase conversion.
-
Max Kellermann authored
Make the code more readable by hiding big formulas in an inline function with a nice name.
-
Max Kellermann authored
Make calculateCrossFadeChunks() more generic and portable by eliminating global variable access.
-
Max Kellermann authored
InputPlugin to decoder_plugin, and no camelCase.
-
Max Kellermann authored
-
Max Kellermann authored
"decoder plugin" is a better name than "input plugin", since the plugin does not actually do the input - InputStream does. Also don't use typedef, so we can forward-declare it if required.
-
Max Kellermann authored
PlayerControl.command replaces the old attributes play, stop, pause, closeAudio, lockQueue, unlockQueue, seek. The main thread waits for each command synchronously, so there can only be one command enabled at a time anyway.
-
Max Kellermann authored
Some decoder commands are implemented in the decoder plugins, thus they need to have an API call to signal that their current command has been finished. Let them use the new decoder_command_finished() instead of the internal dc_command_finished().
-
Max Kellermann authored
We want to expose the AudioFormat structure to plugins; remove some clutter by moving its declaration to a separate header file.
-
Max Kellermann authored
After the decoder has been initialized and the audio device has been opened, don't sleep. The decoder plugin won't do anything special nor will it care to wake us up for some reason.
-
Max Kellermann authored
The decoder struct should later be made opaque to the decoder plugin, because maintaining a stable struct ABI is quite difficult. The ABI should only consist of a small number of stable functions.
-
Max Kellermann authored
Don't use wrappers like player_wakeup_decoder_nb(). These have been wrappers calling notify.c functions, for compatibility with the existing code when we migrated to notify.c.
-
Max Kellermann authored
The "if" block breaked out of the loop. That means we can move the code out of the "else" block.
-
Max Kellermann authored
dc_command_finished() is invoked by the decoder thread when it has finished a command (sent by the player thread). It resets dc.command and wakes up the player thread. This combination was used at a lot of places, and by introducing this function, the code will be more readable.
-
Max Kellermann authored
Busy wait loops are a bad thing, especially when the response time can be very long - busy waits eat a lot of CPU, and thus slow down the other thread. Since the other thread will notify us when it's ready, we can use notify_wait() instead.
-