- 26 Aug, 2008 40 commits
-
-
Max Kellermann authored
cmd has already been checked before, it cannot have changed meanwhile because it is a local variable.
-
Max Kellermann authored
Preparing for simplifying and thus speeding up the dithering code: moved dithering to a separate function which contains a trivial loop. With this patch, only one sample is dithered at a time, but the following patches will allow us to dither a whole block at a time, without complicated buffer length checks.
-
Max Kellermann authored
Performance improvement by moving stuff out of a loop: skip part of the first frame before entering the loop.
-
Max Kellermann authored
-
Max Kellermann authored
Copy some code from aac_decode() to aac_stream_decode() and apply necessary changes to allow streaming audio data. Both functions might be merged later.
-
Max Kellermann authored
initAacBuffer() should really only initialize the buffer; currently, it also reads data from the input stream and parses the header. All of the AAC buffer code should probably be moved to a separate library anyway.
-
Max Kellermann authored
The AAC plugin sometimes does not check the length of available data when checking for magic prefixes. Add length checks.
-
Max Kellermann authored
Eliminate some duplicated code by using fillAacBuffer().
-
Max Kellermann authored
Find AAC frames in the input and skip invalid data. This prepares AAC streaming.
-
Max Kellermann authored
adts_check_frame() checks whether the buffer head is an AAC frame, and returns the frame length.
-
Max Kellermann authored
Shifting from the buffer queue is a common operation, and should be provided as a separate function. Move code to aac_buffer_shift() and add a bunch of assertions.
-
Max Kellermann authored
When checking for EOF, we should not check whether the read request has been fully satisified. The InputStream API does not guarantee that readFromInputStream() always fills the whole buffer, if EOF is not reached. Since there is the function inputStreamAtEOF() dedicated for this purpose, we should use it for EOF checking after readFromInputStream()==0.
-
Max Kellermann authored
Fill the AacBuffer even when nothing has been consumed yet. The function should not check for consumed data, but for free space at the end of the buffer.
-
Max Kellermann authored
Return instead of putting all the code into a if-closure. That saves one level of indentation.
-
Max Kellermann authored
adtsParse() always returns 1, and its caller does not use the return value.
-
Max Kellermann authored
-
Max Kellermann authored
Since we eliminated the parameters retFileread and retTagsize in all callers, we can now safely remove it from the function prototype.
-
Max Kellermann authored
-
Max Kellermann authored
The flag "ready" indicates whether the input stream is ready and it has parsed all meta data. Previously, it was impossible for decodeStart() to see the content type of HTTP input streams, because at that time, the HTTP response wasn't parsed yet.
-
Max Kellermann authored
With the functions decoder_plugin_register() and decoder_plugin_unregister(), decoder plugins can register a "secondary" plugin, like the flac input plugin does this for "oggflac".
-
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
Don't use CPP macros when you can use C enum... this also allows better type checking.
-
Max Kellermann authored
InputPlugin to decoder_plugin, and no camelCase.
-
Max Kellermann authored
-
Max Kellermann authored
Continuing the effort to rename InputPlugin to decoder_plugin...
-
Max Kellermann authored
Since inputPlugin.c manages the list of registered decoders, we should rename the source file.
-
Max Kellermann authored
The decoder_plugin instances are only used inputPlugin.c, so move them from the header file.
-
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
The function player_command() inherited the busy-waiting algorithm from the old code; throw in a wait_main_task() to do idle waiting.
-
Max Kellermann authored
Don't write CPP when you can express the same in C... macros vs enum is a good example for that.
-
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
(Ab)use the decoder_command enumeration, which has nearly the same values and the same meaning.
-
Max Kellermann authored
The wavpack decoder plugin implements a hack, and it needs the song URL for that. This API (and the hack) should be revised later, but add that function for now.
-
Max Kellermann authored
dc->seekable is already set by decodeStart().
-
Max Kellermann authored
Since we want to hide mpd internals from the decoder plugins, the plugins should not check dc->state whether they have already called decoder_initialized(). Use a local variable to track that.
-
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.
-