aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/_flac_common.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2010-05-08mixramp: Adjust MixRamp threshold to account for ReplayGain.Tim Phipps1-2/+4
2010-03-21Add support for MixRamp tagsTim Phipps1-5/+6
Adds mixrampdb and mixrampdelay commands. Reads MIXRAP_START and MIXRAMP_END tags from FLAC files and overlaps instead of crossfading.
2010-02-17replay_gain_info: allocate the struct staticallyMax Kellermann1-6/+3
Don't allocate each replay_gain_info object on the heap. Those objects who held a pointer now store a full replay_gain_info object. This reduces the number of allocations and heap fragmentation.
2010-01-06decoder/flac: support streams without STREAMINFO blockMax Kellermann1-1/+40
2010-01-06decoder/flac: pass bits_per_sample to flac_sample_format()Max Kellermann1-3/+3
Easier to reuse the function.
2010-01-06decoder/flac: moved decoder initialization to _flac_common.cMax Kellermann1-20/+12
Invoke decoder_initialized() in the libFLAC metadata callback. This merges code from the FLAC and the OggFLAC decoder plugin into the common library.
2010-01-06decoder/flac: remember audio_format, not stream_infoMax Kellermann1-12/+28
2010-01-06decoder/flac: removed CUE sheet supportMax Kellermann1-53/+0
This feature has been moved to the "flac" playlist plugin.
2010-01-04decoder_api: added function decoder_replay_gain()Max Kellermann1-9/+8
This function replaces the replay_gain_info parameter for decoder_data(). This allows the decoder to announce replay gain changes, instead of having to pass the same object over and over.
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-26decoder_api: added function decoder_timestamp()Max Kellermann1-8/+1
Remove the data_time parameter from decoder_data(). This patch eliminates the timestamp counting in most decoder plugins, because the MPD core will do it automatically by default.
2009-12-02audio_format: changed "bits" to "enum sample_format"Max Kellermann1-2/+25
This patch prepares support for floating point samples (and probably other formats). It changes the meaning of the "bits" attribute from a bit count to a symbolic value.
2009-11-19decoder/flac: fixed compiler warningMax Kellermann1-3/+1
Removed the "vtrack" local variable (which triggered a gcc warning because it was after the newly introduced NULL check), and run strtol() on the original parameter.
2009-11-18decoder/flac: fixed NULL pointer dereference in CUE codeMax Kellermann1-0/+2
The function flac_vtrack_tnum() was missing a strrchr()==NULL check.
2009-11-14decoder: use audio_format_init_checked()Max Kellermann1-9/+9
Let the audio_check library verify the audio format in all (relevant, i.e. non-hardcoded) plugins.
2009-11-12include config.h in all sourcesMax Kellermann1-0/+1
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-11-11decoder/flac: moved code to flac_data_get_audio_format()Max Kellermann1-7/+28
Remove the audio_format attribute, add "frame_size" instead. The audio_format initialization and check is moved both to flac_data_get_audio_format().
2009-11-11decoder/flac: use frame header instead of audio_formatMax Kellermann1-3/+3
When calculating the properties of the frame, use sample_rate and other information from the frame header instead of the stored audio_format object.
2009-11-11decoder/flac: calculate time stamp from current frameMax Kellermann1-2/+9
Don't update a float timestamp, this will make imprecisions add up after a while. We already have the number of the current frame, let's just calculate the float timestamp from that for every decoder_data() command. For this, we need to add the attribute "first_frame", for CUE sheet songs.
2009-11-11decoder/flac: calculate bit rate in flac_common_write()Max Kellermann1-3/+10
Removed the "bit_rate" attribute from the flac_data struct. Pass the number of bytes since the last call to flac_common_write(), and let it calculate the bit rate.
2009-11-11decoder/flac: store the whole stream info object, not durationMax Kellermann1-1/+4
We don't want to work with floating point values if possible. Get the integer number of frames from the FLAC__StreamMetadata_StreamInfo object, and convert it into a float duration on demand. This patch adds a check if the STREAMINFO packet has been received yet.
2009-11-11decoder/flac: keep track of current frame numberMax Kellermann1-0/+3
We need this for more exact end-of-subsong detection for CUE files.
2009-11-11decoder/flac: moved code to flac_pcm.cMax Kellermann1-81/+1
2009-11-11decoder/flac: moved code to flac_metadata.cMax Kellermann1-164/+1
2009-11-11decoder/flac: return replay_gain_info object from helper functionMax Kellermann1-28/+24
Make the function more generic by not passing "struct flac_data" to it.
2009-11-11decoder/flac: merged some code into flac_tag_apply_metadata()Max Kellermann1-1/+20
2009-11-10decoder/flac: pass VorbisComment to comments_to_tag()Max Kellermann1-7/+5
2009-11-10decoder/flac: use pcm_buffer instead of fixed bufferMax Kellermann1-37/+27
This is a great simplification for flac_common_write(), because we can convert and submit all of the buffer in one turn. No more partial buffers with complicated formulas.
2009-11-10decoder/flac: added function flac_data_deinit()Max Kellermann1-0/+10
Clean up tag and replay_gain_info there.
2009-11-10decoder/flac: pass void pointer to flac_convert()Max Kellermann1-5/+5
That function diverts into various bit formats; it doesn't need a typed pointer.
2009-11-10decoder/flac: pass audio_format.bits to flac_convert()Max Kellermann1-11/+8
Don't use audio_format_sample_size() for identifying the sample format.
2009-10-13tag: removed the "_ITEM_" suffix from the enum namesMax Kellermann1-3/+3
2009-08-14decoder/flac: don't allocate cuesheet twice (memleak)Max Kellermann1-4/+6
The function flac_cue_track() first calls FLAC__metadata_object_new(), then overwrites this pointer with FLAC__metadata_get_cuesheet(). This allocate two FLAC__StreamMetadata objects, but the first pointer is lost, and never freed.
2009-07-22decoder/flac: fixed indentation of flac_comment_value()Max Kellermann1-19/+21
2009-07-22decoder/flac: parse all replaygain tagsMax Kellermann1-14/+18
The FLAC replaygain parser used the "||" operator. This made the code stop after the first value which was found.
2009-07-22decoder/flac: return early from flac_find_float_comment()Max Kellermann1-21/+22
When one metadata check fails, return quickly. This removes 2 levels of indent.
2009-07-22decoder/flac: removed misplaced authorship commentMax Kellermann1-1/+0
This belongs into "git annotate" or AUTHORS.
2009-07-19Add audio_format_init() functionDavid Woodhouse1-3/+2
It makes no difference right now, but we're about to add an endianness flag and will want to make sure it's correctly initialised every time.
2009-03-17flac/cue: added support for TITLE[n] commentsMario Lenz1-2/+9
On 2009/03/17 Max Kellermann<max@duempel.org> wrote: > There doesn't seem to be an "official" standard. I'd say: search for > TITLE[1] first (the most explicit form), then TITLE1, and finally fall > back to TITLE. This makes sure MPD supports every possible standard, > without breaking. I've also added some additional checks to make sure entry is long enough.
2009-03-16flac: get CUE track titles from additional FLAC commentsMario Lenz1-15/+24
The cue sheet embedded in a flac file doen't contain any information about track titles and similar. There are three possibilities: Use an external cue sheet that includes these information, use a tag CUESHEET with a cue sheet including these information or use tags. I think the latter is the best option and is already used by other projects.
2009-03-13all: Update copyright header.Avuton Olrich1-9/+11
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.
2009-03-09Initial support for embedded cue sheets found in flac filesJochen Keil1-3/+51
So far only seekpoints are supported, so no proper tagging yet except for track number and track length. Tagging should be done by parsing the cue sheet which is often embedded as vorbis comment in flac files. Furthermore the pathname should be configurable like "%A - %t - %T", where %A means Artist, %t track number and %T Title or so.
2009-03-01flac: parse stream tagsMax Kellermann1-0/+4
Parse the vorbis comments in libflac's metadata_callback and pass them as tag struct to the decoder API.
2009-02-27tag: no CamelCaseMax Kellermann1-1/+1
Renamed numOfItems to num_items.
2009-01-15flac: map "Album Artist" to "AlbumArtist"Rasmus Steinke1-1/+3
This patch allows mpd to recognise the albumartist tag in the way foobar2000 and others write it to files.
2009-01-15flac: splitted flac_copy_vorbis_comment()Max Kellermann1-37/+38
Splitted flac_copy_vorbis_comment() into flac_copy_comment() and flac_copy_comment().
2009-01-15flac: moved code to flac_comment_value()Max Kellermann1-5/+26
Simplify flac_copy_vorbis_comment() by moving the comment identification code out.
2009-01-15flac: always allocate tag objectMax Kellermann1-14/+8
Free the tag object when it turns out to be empty. This simplifies several functions and APIs.
2009-01-15flac: use bool instead of intMax Kellermann1-15/+15
2009-01-15flac: no CamelCaseMax Kellermann1-39/+44
Renamed types, functions, variables.