- 09 Nov, 2009 1 commit
-
-
Max Kellermann authored
When there's no queued song, and the current one has finished playing, first make sure that the hardware outputs have really finished playing the last chunk: call the drain() method in all audio outputs. Without this patch, MPD stopped playback shortly before the ALSA sound card had finished playing.
-
- 03 Nov, 2009 10 commits
-
-
Max Kellermann authored
If no song was queued, then player_control.next_song might contain the value for the next QUEUE command. We must not reset that.
-
Max Kellermann authored
When the decoder finishes the "queued" song very quickly (before the "current" song finishes playing), an assertion in do_play() fails because it thinks that it should start decoding the queued song, although that has in fact just finished.
-
Max Kellermann authored
Simplify several expressions.
-
Max Kellermann authored
Don't access attributes without the lock.
-
Max Kellermann authored
Don't access decoder_control attributes directly.
-
Max Kellermann authored
Lock the player_control object when modifying its attributes.
-
Max Kellermann authored
-
Max Kellermann authored
These two variables are redundant, we need only one of them.
-
Max Kellermann authored
It's not used if pc.error==PLAYER_ERROR_AUDIO.
-
Max Kellermann authored
The START command returns without blocking; we don't need the asynchronous decoder start anymore.
-
- 02 Nov, 2009 1 commit
-
-
Max Kellermann authored
While paused, the player thread re-locks its mutex and waits for a signal. This is racy: when the command is set while the thread is waiting for the lock, it may wait forever. This patch adds another command check before player_wait().
-
- 31 Oct, 2009 3 commits
-
-
Max Kellermann authored
Allocate a decoder_control object where needed, and pass it around. This will allow more than one decoder thread one day.
-
Max Kellermann authored
Simply use "return" instead of g_thread_exit().
-
Max Kellermann authored
Use GMutex/GCond instead of the notify library. Manually lock the player_control object before accessing the protected attributes. Use the GCond object to notify the player thread and the main thread.
-
- 30 Oct, 2009 1 commit
-
-
Max Kellermann authored
Right after seeking and song change, the elapsed_time shows old information, because the output thread didn't finish a full chunk yet. This patch re-adds a second elapsed_time variable, and keeps track of a fallback value, in case the output thread can't provide a reliable value.
-
- 29 Oct, 2009 1 commit
-
-
Max Kellermann authored
Don't set the error in play_chunk(); do all the error handling in the caller. The errored_song attribute isn't set anymore; it doesn't make sense for PLAYER_ERROR_AUDIO.
-
- 23 Oct, 2009 1 commit
-
-
Max Kellermann authored
With these methods, an output plugin can allocate some global resources only if it is actually enabled. The method enable() is called after daemonization, which allows for more sophisticated resource allocation during that method.
-
- 15 Oct, 2009 1 commit
-
-
Max Kellermann authored
When the audio output fails to open, MPD pauses playback, but doesn't reset player.play_audio_format. This leads to an assertion failure in audio_output_all_check() on the next REFRESH command, because no audio output is open.
-
- 13 Oct, 2009 1 commit
-
-
Max Kellermann authored
-
- 08 Oct, 2009 3 commits
-
-
Max Kellermann authored
Tracking the "elapsed" time from the chunks which we have sent to the output pipe is very imprecise: since we have implemented the music pipe, we're sending large number of chunks at once, giving the "elapsed" time stamp a resolution of usually more than a second. This patch changes the source of this information to the outputs. If a chunk has been played by all outputs, the "elapsed" time stamp is updated. The new command PLAYER_COMMAND_REFRESH makes the player thread update its status information: it tells the outputs to update the chunk time stamp. After that, player_control.elapsed_time is current.
-
Max Kellermann authored
pc.next_song might be non-NULL even if player.queued==true: when the decoder has started decoding the next song, but the result hasn't been read yet.
-
Max Kellermann authored
Sending PLAYER_COMMAND_STOP followed by PLAYER_COMMAND_QUEUE does the same. PLAYER_COMMAND_PLAY is redundant.
-
- 13 Aug, 2009 1 commit
-
-
Max Kellermann authored
Replace decoder_control.notify with decoder_control.mutex and decoder_control.cond. Lock the mutex on all accesses to decoder_control.command and decoder_control.state.
-
- 23 Jul, 2009 2 commits
-
-
Max Kellermann authored
Calculate the total play time with the audio_format object each time, using audio_format_time_to_size(). The function audioFormatSizeToTime() is not needed anymore, and will be removed with this patch.
-
Max Kellermann authored
-
- 06 Jul, 2009 2 commits
-
-
Sébastien Houzé authored
Very few lines to log a song URI when it has been entirely played. Then mpd logs can be parsed to do statistics.
-
Max Kellermann authored
Do all the software volume stuff inside each output thread, not in the player thread. This allows one software mixer per output device, and also allows the user to configure the mixer type (hardware or software) for each audio output. This moves the global "mixer_type" setting into the "audio_output" section, deprecating the "mixer_enabled" flag.
-
- 02 Jun, 2009 2 commits
-
-
Max Kellermann authored
When the decoder is finished, break out of the player loop only after another player.pipe check. We did check the pipe size a few lines above, but that check was kind of racy.
-
Max Kellermann authored
When a music_chunk only contains a tag but no PCM data, play_chunk() returns true without freeing the chunk. The caller now assumes that the chunk is moved into some music_pipe and does not bother to free it either.
-
- 29 May, 2009 1 commit
-
-
Max Kellermann authored
To check for leaked music_chunk objects, free the music buffer on CLOSE_AUDIO. This invokes an assertion check which ensures that all chunks have been returned to the buffer.
-
- 25 Apr, 2009 2 commits
-
-
Max Kellermann authored
When all audio outputs have been closed due to failures, pause the playback instead of stopping it. This way, the user may resume at the current position after the problem has been dealt with.
-
Max Kellermann authored
When no audio outputs could be opened while seeking, leave MPD seeked at that position and pause playback. The user may continue from this point at any time, as soon as the audio outputs are fixed. The old behaviour triggered an assertion failure: the failure wasn't passed properly to the do_play() function, which attempted to play audio chunks.
-
- 25 Mar, 2009 2 commits
-
-
Max Kellermann authored
When the decoder initialization has not been completed yet, all calls to dc_seek() will fail, because dc.seekable is not initialized yet. Wait for the decoder to complete its initialization, i.e. until it has called decoder_initialized().
-
Max Kellermann authored
Synchronization with the output thread will be implemented in output_all.c, not in player_thread.c. Currently, that's just a simple g_usleep(1ms).
-
- 17 Mar, 2009 1 commit
-
-
Max Kellermann authored
If a music_chunk does not contain any PCM data, then the "times" and "bit_rate" attributes are undefined.
-
- 13 Mar, 2009 1 commit
-
-
Avuton Olrich authored
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
-
- 11 Mar, 2009 3 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
Replaced both player_stop_decoder() invocations with player_dc_stop(), which also cleans up the pipe.
-
Max Kellermann authored
In the "CANCEL" command handler, the decoder is stopped twice: first by player_dc_stop(), then by dc_stop(). Remove the latter.
-