aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/_flac_common.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* audio_format: renamed sampleRate to sample_rateMax Kellermann2008-10-101-1/+1
| | | | | The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
* switch to C99 types, part IIMax Kellermann2008-09-291-2/+2
| | | | | Do full C99 integer type conversion in all modules which were not touched by Eric's merged patch.
* flac: removed FlacData.chunk_lengthMax Kellermann2008-09-231-7/+2
| | | | | chunk_length can be converted to a local variable, because it is always reset to 0 after it was used.
* flac: merged flacSendChunk() into flac_common_write()Max Kellermann2008-09-231-17/+16
| | | | | | | Since flacSendChunk() is a trivial function and is only used in one location, move the code there. The advantage is that calling decoder_data() directly returns the decoder_command value, so we can eliminate one decoder_get_command() call.
* flac: removed generic sample size supportMax Kellermann2008-09-231-32/+26
| | | | | | | | Support for bit rates except 16 bits (and 8 bits on little endian) has always been broken. Since we added optimized functions for 8, 16, 24/32 bits, we can remove the generic flac_convert() function. Instead of removing it, convert it to a wrapper function for flac_convert_*().
* flac: added special functions for 8 and 32 bitMax Kellermann2008-09-231-0/+37
| | | | | Same optimization for 8 and 32 bit files, like the previous patch for 16 bit. Along the way, this patch adds 24 bit FLAC support!
* flac: added optimized converter for 16 bitMax Kellermann2008-09-231-0/+17
| | | | | | flac_convert_16() runs a lot faster than the generic (and quite buggy) function flac_convert(). flac_convert_16() is only used for non-stereo files, since there is already flac_convert_stereo16().
* flac: use signed integers in flac_convert_stereo16()Max Kellermann2008-09-231-6/+4
| | | | | | By mistake, I casted the sample value to uint16_t, which is wrong. This patch simplifies the code by using a int16_t pointer instead of casting to int16_t* every time.
* flac: moved code from flacWrite() to _flac_common.cMax Kellermann2008-09-231-0/+91
| | | | | | | There is still a lot of duplicated code in flac_plugin.c and oggflac_plugin.c. Move code from flac_plugin.c to _flac_common.c, and use the new function flac_common_write() also in oggflac_plugin.c, porting lots of optimizations over to it.
* tag: renamed functions, no CamelCaseMax Kellermann2008-08-291-3/+3
|
* tag: renamed MpdTag and MpdTagItem to struct tag, struct mpd_tag_itemMax Kellermann2008-08-291-3/+3
| | | | | Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
* added decoder_get_command()Max Kellermann2008-08-261-1/+1
| | | | | | Another big patch which hides internal mpd APIs from decoder plugins: decoder plugins regularly poll dc->command; expose it with a decoder_api.h function.
* moved InputPlugin to decoder_api.hMax Kellermann2008-08-261-1/+1
| | | | | | InputPlugin is the API which is implemented by a decoder plugin. This belongs to the public API/ABI, so move it to decoder_api.h. It will later be renamed to something like "decoder_plugin".
* added parameter total_time to decoder_initialized()Max Kellermann2008-08-261-1/+1
| | | | | Similar to the previous patch: pass total_time instead of manipulating dc->totalTime directly.
* added audio_format parameter to decoder_initialized()Max Kellermann2008-08-261-4/+3
| | | | | | dc->audioFormat is set once by the decoder plugins before invoking decoder_initialized(); hide dc->audioFormat and let the decoder pass an AudioFormat pointer to decoder_initialized().
* added struct decoderMax Kellermann2008-08-261-1/+3
| | | | | | 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.
* merged start, stop, seek into DecoderControl.commandMax Kellermann2008-08-261-1/+1
| | | | | | | Much of the existing code queries all three variables sequentially. Since only one of them can be set at a time, this can be optimized and unified by merging all of them into one enum variable. Later, the "command" checks can be expressed in a "switch" statement.
* clean up CPP includesMax Kellermann2008-08-261-6/+0
| | | | | Include only headers which are really required. This speeds up compilation and helps detect cross-layer accesses.
* enable -Wpointer-arith, -Wstrict-prototypesMax Kellermann2008-08-261-1/+1
| | | | | | Also enable -Wunused-parameter - this forces us to add the gcc "unused" attribute to a lot of parameters (mostly library callback functions), but it's worth it during code refactorizations.
* Make the OutputBuffer API more consistentEric Wong2008-04-131-1/+1
| | | | | | | | | | We had functions names varied between outputBufferFoo, fooOutputBuffer, and output_buffer_foo That was too confusing for my little brain to handle. And the global variable was somehow named 'cb' instead of the more obvious 'ob'... git-svn-id: https://svn.musicpd.org/mpd/trunk@7355 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Stop passing our single OutputBuffer object everywhereEric Wong2008-04-131-4/+2
| | | | | | | All of our main singleton data structures are implicitly shared, so there's no reason to keep passing them around and around in the stack and making our internal API harder to deal with. git-svn-id: https://svn.musicpd.org/mpd/trunk@7354 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Stop passing our single DecoderControl object everywhereEric Wong2008-04-131-10/+7
| | | | | | | This at least makes the argument list to a lot of our plugin functions shorter and removes a good amount of line nois^W^Wcode, hopefully making things easier to read and follow. git-svn-id: https://svn.musicpd.org/mpd/trunk@7353 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* explicitly downcastMax Kellermann2008-03-261-3/+3
| | | | | | | | Tools like "sparse" check for missing downcasts, since implicit cast may be dangerous. Although that does not change the compiler result, it may make the code more readable (IMHO), because you always see when there may be data cut off. git-svn-id: https://svn.musicpd.org/mpd/trunk@7196 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fixed -Wshadow warningsMax Kellermann2008-01-261-6/+6
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7143 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Cleanup #includes of standard system headers and put them in one placeEric Wong2008-01-031-3/+1
| | | | | | | | | | | | | This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* The massive copyright updateAvuton Olrich2007-04-051-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix Replay Gain reading for FLAC and OggFLACEric Wong2006-08-221-6/+6
| | | | | | | | | | | This bug was NOT introduced in my OggFLAC additions, honest! As far as I can see, it was introduced way back in r2482, but nobody ever noticed until the post here: http://www.musicpd.org/forum/index.php?topic=1152.0 While we're at it, clean up some of the variable typing. git-svn-id: https://svn.musicpd.org/mpd/trunk@4664 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add mpd-indent.shAvuton Olrich2006-07-201-1/+1
| | | | | | Add a few new options for indent to try to make things a bit cleaner git-svn-id: https://svn.musicpd.org/mpd/trunk@4411 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add mpd-indent.shAvuton Olrich2006-07-201-58/+66
| | | | | | Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Change shank's email addressJ. Alexander Treuman2006-07-141-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Huge header update, update the copyright and addAvuton Olrich2006-07-131-1/+1
| | | | | the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* gcc 2.95 compatibility fixesEric Wong2006-06-041-2/+5
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4244 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Added Disc # metadata item based on bug 571 (added id3v2 support)Qball Cow2006-04-301-2/+7
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4131 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* merge with mpd/trunk up to r3925Eric Wong2006-03-161-0/+195
git-svn-id: https://svn.musicpd.org/mpd/trunk@3926 09075e82-0dd4-0310-85a5-a0d7c8717e4f