- 24 Nov, 2008 1 commit
-
-
Max Kellermann authored
SEEK_SET is defined by unistd.h. Explicitly include it.
-
- 21 Nov, 2008 1 commit
-
-
Max Kellermann authored
Refuse to play audio formats which are not supported by MPD.
-
- 12 Nov, 2008 7 commits
-
-
Max Kellermann authored
According to the documentation, mpc_decoder_decode() returns an mpc_uint32_t. Since the special return value (mpc_uint32_t)-1 translates to a very large long integer, this may cause segmentation faults if not interpreted properly.
-
Max Kellermann authored
Don't hard-code the factor "2".
-
Max Kellermann authored
Removed 3 superfluous decoder_get_command() invocations.
-
Max Kellermann authored
mpc_to_mpd_buffer() converts a whole chunk at a time. This eliminates 3 local variables in mpc_decode().
-
Max Kellermann authored
Don't split the buffer conversion loop. When libmpcdec returns a chunk, convert and send the whole chunk at a time. This moves several checks out of the loop, and greatly improves performance.
-
Max Kellermann authored
Don't use deprecated MPD libraries.
-
Max Kellermann authored
The buffer is always casted to int32_t* anyway; declare it as int32_t array, and remove the cast.
-
- 11 Nov, 2008 4 commits
-
-
Max Kellermann authored
Since each "eof=true" is followed by "break", the variable is superfluous.
-
Max Kellermann authored
The stream_decode() and file_decode() methods returned a boolean, indicating whether they were able to decode the song. This is redundant, since we already know that: if decoder_initialized() has been called (and dc.state==DECODE), the plugin succeeded. Change both methods to return void.
-
Max Kellermann authored
Having an array instead of individual variables allows the use of the replay_gain_mode enum as an array index.
-
Max Kellermann authored
Renamed functions and variables.
-
- 04 Nov, 2008 1 commit
-
-
Max Kellermann authored
Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
-
- 02 Nov, 2008 1 commit
-
-
Max Kellermann authored
Don't pass the "seekable" flag with every decoder_data() invocation. Since that flag won't change within the file, it is enough to pass it to decoder_initialized() once per file.
-
- 01 Nov, 2008 2 commits
-
-
Max Kellermann authored
The strings were constant, but the pointers weren't. C syntax is somewhat tricky..
-
Max Kellermann authored
All decoder_plugin structs are initialized at compile time, and must never change.
-
- 31 Oct, 2008 1 commit
-
-
Max Kellermann authored
-
- 30 Oct, 2008 6 commits
-
-
Max Kellermann authored
Similar to libmad, libmpcdec provides samples with higher quality than 16 bit. Send 24 bit samples to MPD, which allows MPD to apply dithering just in case the output devices are only 16 bit capable.
-
Max Kellermann authored
Don't hard-code the "16 bits" or "2 bytes" in multiple locations.
-
Max Kellermann authored
The name "s16" implies 16 bit integers. To make the code more generic, rename it to "dest".
-
Max Kellermann authored
The conversion of integer samples was completely broken, which presumably didn't annoy anybody because libmpcdec provides float samples on most installations.
-
Max Kellermann authored
When input_stream_seek() was converted to return a bool, this wasn't adjusted in the musepack plugin.
-
Max Kellermann authored
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
-
- 29 Oct, 2008 2 commits
-
-
Max Kellermann authored
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().
-
Max Kellermann authored
Call ob_clear() in decoder_command_finished() instead of implementing that call in every decoder plugin.
-
- 26 Oct, 2008 4 commits
-
-
Max Kellermann authored
For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
-
Max Kellermann authored
Renamed all functions and variables.
-
Max Kellermann authored
Everybody should use struct input_stream.
-
Max Kellermann authored
These plugins are not input plugins, they are decoder plugins. No CamelCase in the directory name.
-
- 17 Oct, 2008 1 commit
-
-
Max Kellermann authored
Don't compile the sources of disabled decoder plugins at all, and don't attempt to register these.
-
- 10 Oct, 2008 1 commit
-
-
Max Kellermann authored
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
-
- 29 Sep, 2008 2 commits
-
-
Max Kellermann authored
The old struct initializers are error prone and don't allow moving elements around. Since we are going to overhaul some of the APIs soon, it's easier to have all implementations use C99 initializers.
-
Max Kellermann authored
Do full C99 integer type conversion in all modules which were not touched by Eric's merged patch.
-
- 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.
-
- 29 Aug, 2008 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
-
- 26 Aug, 2008 3 commits
-
-
Max Kellermann authored
On our way to stabilize the decoder API, we will one day remove the input stream functions. The most basic function, read() will be provided by decoder_api.h with this patch. It already contains a loop (still with manual polling), error/eof handling and decoder command checks. This kind of code used to be duplicated in all decoder plugins.
-
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
Provide access to seeking for the decoder plugins; they have to know where to seek, and they need a way to tell us that seeking has failed.
-