- 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.
-
- 10 Mar, 2009 7 commits
-
-
Max Kellermann authored
After a seek, wait until enough new chunks are decoded before starting playback. If this takes too long, send silence chunks to the audio outputs meanwhile.
-
Max Kellermann authored
When playback is unpaused, pass the audio_format to audio_output_all_open(). Don't assume that output_all.c remembers the previous audio format. Also check if there has been an audio format yet.
-
Max Kellermann authored
-
Max Kellermann authored
When seeking into a new song, and the decoder for the new song fails to start up, MPD forgot to send the "command_finished" signal to the main thread.
-
Max Kellermann authored
When pc.next_song is reset due to a decoder failure, also reset the player.queued flag. player.queued must not be true when there is no pc.next_song.
-
Max Kellermann authored
Reset player.xfade and player.buffering from within player_seek_decoder(), not in the player_process_command() switch statement.
-
Max Kellermann authored
The music_buffer is a global variable, and must not be freed until the player thread exits.
-
- 09 Mar, 2009 5 commits
-
-
Max Kellermann authored
Instead of passing individual buffers to audio_output_all_play(), pass music_chunk objects. Append all those chunks asynchronously to a music_pipe instance. All output threads may then read chunks from this pipe. This reduces MPD's internal latency by an order of magnitude.
-
Max Kellermann authored
When a PAUSE command is received while the decoder starts, don't open the audio device when the decoder becomes ready. It's pointless, because MPD will close if after that.
-
Max Kellermann authored
Moved some more cruft out of do_play().
-
Max Kellermann authored
Moved some cruft out of do_play().
-
Max Kellermann authored
Preparation for the next patch: since the output devices stay open even when the player thread stops playing, we will need a persistent music buffer.
-
- 08 Mar, 2009 1 commit
-
-
Max Kellermann authored
In !NDEBUG, remember which audio_format is stored in every chunk and every pipe. Check the audio_format of every new data block appended to the music_chunk, and the format of every new chunk appended to the music_pipe.
-
- 07 Mar, 2009 1 commit
-
-
Max Kellermann authored
-
- 05 Mar, 2009 1 commit
-
-
Max Kellermann authored
Turn the music_pipe into a simple music_chunk queue. The music_chunk allocation code is moved to music_buffer, and is now managed with a linked list instead of a ring buffer. Two separate music_pipe objects are used by the decoder for the "current" and the "next" song, which greatly simplifies the cross-fading code.
-
- 03 Mar, 2009 1 commit
-
-
Max Kellermann authored
-
- 02 Mar, 2009 1 commit
-
-
Max Kellermann authored
Don't abort MPD when a sample format is not supported by pcm_volume().
-
- 26 Feb, 2009 1 commit
-
-
Max Kellermann authored
The warning message "problems opening audio device while playing ..." does not help at all, and should be removed. At this point, the real error message has already been logged by the output thread.
-
- 17 Feb, 2009 1 commit
-
-
Max Kellermann authored
When a file is not seekable, MPD dropped the audio buffers before even attempting to seek. This caused noticable sound corruption. Fix: first attempt to seek, and only if that succeeds, call audio_output_all_cancel().
-
- 15 Feb, 2009 1 commit
-
-
Max Kellermann authored
Minimize header dependencies, again.
-
- 10 Feb, 2009 5 commits
-
-
Max Kellermann authored
Renamed functions and variables.
-
Max Kellermann authored
Moved code which deals with all audio outputs at once into a separate library.
-
Max Kellermann authored
The crossfading code shouldn't depend on the audio output code. Pass the current audio format to cross_fade_calc() and let it compare directly, instead of using isCurrentAudioFormat().
-
Max Kellermann authored
Assertions on pc.command and pc.next_song.
-
Max Kellermann authored
When we reset pc.next_song if there is no song queued, this might cause a race condition: the next song to be played is cleared, while pc.command was already set. Clear the "next_song" only if there is a song queued for the current do_play() invocation.
-
- 09 Feb, 2009 1 commit
-
-
Max Kellermann authored
After a player command (successful or not), reset pc.next_song, because the queue is supposed to be empty then. Otherwise, playlist.queued and pc.next_song may disagree, which triggers an assertion failure.
-
- 02 Feb, 2009 1 commit
-
-
Max Kellermann authored
When the output device fails to play a chunk, set pc.error to PLAYER_ERROR_AUDIO. This way, the playlist knows that it should not queue the next song.
-
- 25 Jan, 2009 3 commits
-
-
Max Kellermann authored
Start the decoder thread when the player thread starts. The decoder thread is already stopped by the player thread.
-
Max Kellermann authored
player_control.thread contains the handle of the player thread, or NULL if the player thread isn't running.
-
Max Kellermann authored
decoder_control.thread contains the handle of the decoder thread, or NULL if the decoder thread isn't running.
-
- 21 Jan, 2009 3 commits
-
-
Max Kellermann authored
Break from the loop instead of returning the function. This calls player_stop_decoder(), which in turn emits the PLAYLIST event. This allows the playlist to re-start the player.
-
Max Kellermann authored
The function player_seek_decoder() starts the decoder, but does not check the return value of player_wait_for_decoder().
-
Max Kellermann authored
Make player_wait_for_decoder() and play_chunk() return a bool instead of 0/-1.
-