aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-11-12aac: make the input buffer staticMax Kellermann1-9/+4
Allocate the input buffer within the AacBuffer struct.
2008-11-12aac: reject SEEK commandsMax Kellermann1-1/+3
The aac plugin does not support seeking. Reject SEEK requests by calling decoder_seek_error(). Quit the plugin's main loop only when STOP is received.
2008-11-12aac: get decoder command from decoder_data()Max Kellermann1-4/+5
Removed a superfluous decoder_get_command() call.
2008-11-12aac: convert audio_format to temporary variableMax Kellermann1-5/+6
The audio_format variable is only used and initialized for decoder_initialized(). Move it into that block to save some bytes on the stack.
2008-11-12aac: removed method file_decode()Max Kellermann1-124/+1
aac_stream_decode() was basically copy+pasted from aac_decode(). Since stream_decode() can also decode files, eliminate aac_decode().
2008-11-12aac: check the buffer length in the ADIF parserMax Kellermann1-0/+6
Check whether enough data has been read yet.
2008-11-12aac: use unsigned integers and size_t where appropriateMax Kellermann1-5/+6
2008-11-12aac: check if the stream is seekable before length checkMax Kellermann1-1/+2
If the stream is not seekable, don't try to decode all frames to find out the total song time.
2008-11-12aac: removed attribute "atEof"Max Kellermann1-14/+7
Use input_stream_eof() instead.
2008-11-12mpc: assume the result fo of mpc_decoder_decode() is unsignedMax Kellermann1-2/+2
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.
2008-11-12mpc: don't assume the stream is stereoMax Kellermann1-2/+1
Don't hard-code the factor "2".
2008-11-12mpc: get decoder command from decoder_data()Max Kellermann1-12/+9
Removed 3 superfluous decoder_get_command() invocations.
2008-11-12mpc: moved code to mpc_to_mpd_buffer()Max Kellermann1-14/+12
mpc_to_mpd_buffer() converts a whole chunk at a time. This eliminates 3 local variables in mpc_decode().
2008-11-12mpc: make the buffer large enough for one mpc frameMax Kellermann1-28/+11
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.
2008-11-12mpc: use GLib instead of utils.h/log.hMax Kellermann1-9/+6
Don't use deprecated MPD libraries.
2008-11-12mpc: declare buffer as int32_t[]Max Kellermann1-4/+4
The buffer is always casted to int32_t* anyway; declare it as int32_t array, and remove the cast.
2008-11-11mpc: eliminated the local variable "eof"Max Kellermann1-8/+3
Since each "eof=true" is followed by "break", the variable is superfluous.
2008-11-11ogg: removed stray "}"Max Kellermann1-1/+0
Due to an unnoticed merge error, there was a superfluous "}". Remove it.
2008-11-11ogg: use ogg_fopen() instead of ogg_open()Max Kellermann1-8/+6
Move the reponsibility for freeing the file handle to libvorbis.
2008-11-11ogg: use GLib instead of utils.h/log.hMax Kellermann1-6/+8
2008-11-11decoder: fixed typo in assertionMax Kellermann1-1/+1
decoder_file_decode() should check for plugin->file_decode, not plugin->stream_decode().
2008-11-11ogg: get decoder command from decoder_data()Max Kellermann1-9/+8
Eliminate two decoder_get_command() invocations from the main loop.
2008-11-11ogg: flush buffer after every ov_read() callMax Kellermann1-25/+10
Don't let the buffer grow until it is full, flush it whenever there is data available.
2008-11-11mp3: support stream tagsMax Kellermann1-1/+8
Parse ID3 tags, even when they are in the middle of the stream. Very few streams provide embedded ID3 tags. Most of them send only Shoutcast "icy" tags, which limits the practical usefulness of this patch.
2008-11-11mp3: eliminated duplicate command checkMax Kellermann1-18/+20
When a command is received, decode_next_frame_header() and decodeNextFrame() return DECODE_BREAK. This is already checked by both callers, which means that we can eliminate lots of decoder_get_command() checks.
2008-11-11player: fix race condition during tag updateMax Kellermann1-2/+4
When a tag is updated, the old tag was freed before the new one was created. Reverse the order to be sure that other threads always see a valid pointer. This still leaves a possible race condition, but it will be addressed later.
2008-11-11playlist: track song metadata changesMax Kellermann2-12/+14
When the tag of the current song changes (e.g. a new tag was sent in the stream), update the playlist, so clients pick up the new tag.
2008-11-11oggflac: removed the obsolete try_decode() methodMax Kellermann1-6/+3
2008-11-11decoder: return void from decode() methodsMax Kellermann13-113/+56
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.
2008-11-11replay_gain: don't include os_compat.hMax Kellermann1-1/+3
os_compat.h is deprecated and should be replaced with well-defined standard headers.
2008-11-11replay_gain: use GLib instead of utils.h/log.hMax Kellermann1-14/+11
Eliminated deprecated libraries.
2008-11-11replay_gain: use pcm_volume() to apply replay gainMax Kellermann1-37/+2
The currently replay_gain_apply() implementation duplicates code from pcm_volume(), except that it uses a floating point scale. Eliminate all duplicated code from and make it utilize the pcm_volume() library function. This introduces replay gain support for 24 bit audio.
2008-11-11pcm_utils: allow volume levels greater than 100% in pcm_volume()Max Kellermann1-1/+1
Allow pcm_volume() to increase volume.
2008-11-11pcm_volume: added constant PCM_VOLUME_1Max Kellermann4-14/+27
It may be desirable to change the range of integer volume levels (e.g. to 1024, which may utilize shifts instead of expensive integer divisions). Introduce the constant PCM_VOLUME_1 which describes the integer value for "100% volume". This is currently 1000.
2008-11-11pcm_utils: added inline function pcm_float_to_volume()Max Kellermann2-2/+13
2008-11-11replay_gain: converted struct replay_gain_info elements to an arrayMax Kellermann7-45/+47
Having an array instead of individual variables allows the use of the replay_gain_mode enum as an array index.
2008-11-11wavpack: added wavpack_tag_float()Max Kellermann1-41/+25
The function simplifies wavpack_replaygain(), because it already contains the float parser, and it works with a fixed buffer instead of doing expensive heap allocations.
2008-11-11wavpack: make the "key" argument to wavpack_tag() constMax Kellermann1-9/+5
This allows us to remove the "static char[]" hack.
2008-11-11ogg: ogg_getReplayGainInfo() returns replay_gain_info pointerMax Kellermann1-13/+20
Some code simplification. Avoid pointers to pointers.
2008-11-11replay_gain: converted replay_gain_mode to an enumMax Kellermann2-5/+7
Prefer C enums over CPP macros.
2008-11-11replay_gain: removed superfluous author name commentMax Kellermann1-1/+0
The author's name is already mentioned in the copyright declaration.
2008-11-11replay_gain: no CamelCaseMax Kellermann13-111/+119
Renamed functions and variables.
2008-11-11replay_gain: renamed sources to replay_gain.c, replay_gain.hMax Kellermann5-5/+5
No CamelCase file names.
2008-11-11decoder: fixed assertion failure for decoder==NULL in decoder_read()Max Kellermann1-1/+2
The assertion on dc.state in decoder_read() was too strict: when a decoder tried to call decoder_read() from tag_dup(), the decoder state was NONE. Allow this special case.
2008-11-10decoder: removed plugin method try_decode()Max Kellermann5-51/+14
Instead of having a seprate try_decode() method, let the stream_decode() and file_decode() methods decide whether they are able to decode the song.
2008-11-10decoder: fall back to next pluginMax Kellermann1-4/+16
When a plugin is unable to decode a song, try the other plugins.
2008-11-10decoder: wrapper functions for methods stream_decode() and file_decode()Max Kellermann1-5/+66
Added lots of assertions to the wrapper functions.
2008-11-10decoder: added more assertionsMax Kellermann1-0/+10
Added a lot of assertions checking the state of the decoder plugin.
2008-11-10flac: call flac_process_metadata() for ogg filesMax Kellermann1-4/+5
The flac plugin wasn't initialized properly when an OGG file was being decoded. For some reason, flac_process_metadata() was explicitly not called for OGG files. Since that seems to fix the issue, make it always call flac_process_metadata().
2008-11-10flac: enable the oggflac plugin with older libflac versionsMax Kellermann1-3/+14
Since decoder_list.c does not include the libflac headers, it cannot know whether to add the oggflac plugin to the decoder list. Solve this by always enabling the oggflac sub-plugin, even with older libflac versions. When the libflac API cannot support oggflac, disable the plugin at runtime by returning "false" from its init() method.