]> git.tue.mpg.de Git - paraslash.git/log
paraslash.git
15 years agoAdd -Wmissing-noreturn to compiler flags.
Andre Noll [Sat, 29 Nov 2008 21:45:45 +0000 (22:45 +0100)]
Add -Wmissing-noreturn to compiler flags.

And mark all exit functions of gui.c with __noreturn.

15 years agoFix -Wdeclaration-after-statement warnings.
Andre Noll [Sat, 29 Nov 2008 21:20:47 +0000 (22:20 +0100)]
Fix -Wdeclaration-after-statement warnings.

This option is new in gcc-4, so do not activate it by default.

15 years agoImplement aac meta info support.
Andre Noll [Sat, 29 Nov 2008 20:26:53 +0000 (21:26 +0100)]
Implement aac meta info support.

15 years agoAvoid "no connection to para_server" message is server is stopped.
Andre Noll [Sat, 29 Nov 2008 13:34:22 +0000 (14:34 +0100)]
Avoid "no connection to para_server" message is server is stopped.

15 years agofilter: Call the convert function even if the input buffer is empty.
Andre Noll [Fri, 28 Nov 2008 23:58:03 +0000 (00:58 +0100)]
filter: Call the convert function even if the input buffer is empty.

At least the ogg vorbis decoder might still produce output in this
case.

15 years agoerror.h cleanups.
Andre Noll [Fri, 28 Nov 2008 23:05:29 +0000 (00:05 +0100)]
error.h cleanups.

15 years agoMerge commit 'fml/master'
Andre Noll [Fri, 28 Nov 2008 21:29:43 +0000 (22:29 +0100)]
Merge commit 'fml/master'

15 years agoafh_common.c: Add missing source code documentation.
Andre Noll [Fri, 28 Nov 2008 21:29:14 +0000 (22:29 +0100)]
afh_common.c: Add missing source code documentation.

Document afh_get_chunk() and make_taginfo().

15 years agowrite.h: Cosmetics.
Andre Noll [Fri, 28 Nov 2008 21:04:54 +0000 (22:04 +0100)]
write.h: Cosmetics.

15 years agooggdec: Keep decoding on imput EOF.
Andre Noll [Fri, 28 Nov 2008 20:56:29 +0000 (21:56 +0100)]
oggdec: Keep decoding on imput EOF.

This bug causes the last chunk of the input not written out under
certain circumstances.

15 years agoafh.c: Skip emtpy chunks.
Andre Noll [Fri, 28 Nov 2008 20:02:26 +0000 (21:02 +0100)]
afh.c: Skip emtpy chunks.

15 years agoFix a gcc warning in alsa_open() on x86_64.
Andre Noll [Fri, 28 Nov 2008 12:38:13 +0000 (13:38 +0100)]
Fix a gcc warning in alsa_open() on x86_64.

alsa_write.c:136: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

15 years agoGet rid of a gcc warning on recent Ubuntu systems.
Andre Noll [Fri, 28 Nov 2008 12:07:08 +0000 (13:07 +0100)]
Get rid of a gcc warning on recent Ubuntu systems.

fchdir() is marked with warn_unused_result which produces a
warning in the error path of para_opendir(). However, we really
want to ignore the return value in this particular case, so introduce
a rather ugly fix to avoid the warning.

15 years agoCheck return value of write() in generic_signal_handler().
Andre Noll [Fri, 28 Nov 2008 12:04:30 +0000 (13:04 +0100)]
Check return value of write() in generic_signal_handler().

Abort if we could not write the signal number to the pipe (which
should never happen).

15 years agopara_write: Fix --bufsize.
Andre Noll [Tue, 25 Nov 2008 23:33:55 +0000 (00:33 +0100)]
para_write: Fix --bufsize.

The given value means kilobytes, rather than bytes. Add checks
for invalid values of the buffer size.

15 years agoalsa: Log info about the number of bytes per frame.
Andre Noll [Tue, 25 Nov 2008 23:28:45 +0000 (00:28 +0100)]
alsa: Log info about the number of bytes per frame.

15 years agoalsa: Improve chunk timings.
Andre Noll [Tue, 25 Nov 2008 23:27:55 +0000 (00:27 +0100)]
alsa: Improve chunk timings.

And get rid of magic constants.

15 years agopara_write: Fix --initial-delay.
Andre Noll [Tue, 25 Nov 2008 20:34:57 +0000 (21:34 +0100)]
para_write: Fix --initial-delay.

15 years agoREQUIREMENTS: Fix dead link to faad lib.
Andre Noll [Tue, 25 Nov 2008 17:22:03 +0000 (18:22 +0100)]
REQUIREMENTS: Fix dead link to faad lib.

15 years agoREADME.afs: Minor improvments and clarifications.
Andre Noll [Sat, 22 Nov 2008 22:24:38 +0000 (23:24 +0100)]
README.afs: Minor improvments and clarifications.

15 years agowrite_common.h: Kill an unused function declaration.
Andre Noll [Sat, 22 Nov 2008 21:36:48 +0000 (22:36 +0100)]
write_common.h: Kill an unused function declaration.

15 years agoMinor documentation improvements.
Andre Noll [Sat, 22 Nov 2008 21:36:22 +0000 (22:36 +0100)]
Minor documentation improvements.

15 years agoBetter error diagnostics for the mp3 decoder.
Andre Noll [Sat, 22 Nov 2008 20:37:34 +0000 (21:37 +0100)]
Better error diagnostics for the mp3 decoder.

15 years agohttp_recv: Fix reading of the HTTP OK message pattern.
Andre Noll [Sat, 22 Nov 2008 16:49:39 +0000 (17:49 +0100)]
http_recv: Fix reading of the HTTP OK message pattern.

This bug leads to sound artefacts at the beginning of the
stream caused by calling recv_pattern() with a buffer size
larger than the HTTP OK message.

It may thus happen that the buffer used by recv_pattern() contains
not only the HTTP OK message but also the beginning of the stream.
Since that buffer is discarded by recv_pattern(), the first few
bytes of the stream are lost if this happens.

Fix it by passing the exact length of the HTTP OK message to
recv_pattern().

15 years agoFix an off-by-one bug in recv_pattern().
Andre Noll [Sat, 22 Nov 2008 16:38:16 +0000 (17:38 +0100)]
Fix an off-by-one bug in recv_pattern().

The current code in recv_pattern() allocates a buffer of size
bufsize + 1 and calls recv_buffer() with bufsize as the size
parameter. However, recv_buffer() reserves the last byte of the
buffer for storing the terminating NULL byte, so that at most
bufsize - 1 characters are read.

Fix it by passing bufsize + 1 (the real size of the buffer)
to recv_buffer().

15 years agogui: Add the amplification value to output.
Andre Noll [Sun, 16 Nov 2008 19:20:56 +0000 (20:20 +0100)]
gui: Add the amplification value to output.

15 years agoNo need to check the return value of para_strdup().
Andre Noll [Sun, 16 Nov 2008 00:22:45 +0000 (01:22 +0100)]
No need to check the return value of para_strdup().

15 years agoREQUIREMENTS: Add the name of the debian package for faad.
Andre Noll [Sat, 15 Nov 2008 22:38:45 +0000 (23:38 +0100)]
REQUIREMENTS: Add the name of the debian package for faad.

15 years agoREQUIREMENTS: Mention that libid3tag0-dev should be installed for id3v2.
Andre Noll [Sat, 15 Nov 2008 22:37:54 +0000 (23:37 +0100)]
REQUIREMENTS: Mention that libid3tag0-dev should  be installed for id3v2.

It's not enought to install only libid3tag0 as we need the header files
too.

15 years agoFix a use-without init buf in recv.c.
Andre Noll [Sat, 15 Nov 2008 22:35:36 +0000 (23:35 +0100)]
Fix a use-without init buf in recv.c.

We need to init not only the receiver task but also the stdout task structure.

15 years agoFix the osx writer on little endian machines.
Andre Noll [Sat, 15 Nov 2008 19:26:06 +0000 (20:26 +0100)]
Fix the osx writer on little endian machines.

We have to use kLinearPCMFormatFlagIsBigEndian only of we're on a little endian
(intel) system.

15 years agocall_callback(): Fix a shm leak in afs.c.
Andre Noll [Thu, 13 Nov 2008 19:55:51 +0000 (20:55 +0100)]
call_callback(): Fix a shm leak in afs.c.

We forgot to detach the shm area passed from the child which results in
"no space left" messages if many audio files are added and the number
of shared memory areas exceeds 4096.

15 years agoadd_one_audio_file(): Fix an fd leak.
Andre Noll [Thu, 13 Nov 2008 19:14:56 +0000 (20:14 +0100)]
add_one_audio_file(): Fix an fd leak.

This bug bites if one tries to add more than 1024 new files with a single add
command.

15 years agoguess_audio_format(): Return proper error code.
Andre Noll [Thu, 13 Nov 2008 18:38:50 +0000 (19:38 +0100)]
guess_audio_format(): Return proper error code.

This could cause para_server to return bogus messages back to
the client, including messages containing the string "(null)".

16 years agoINSTALL: Add comment that /var/paraslash should be writable.
Andre Noll [Tue, 28 Oct 2008 10:19:22 +0000 (11:19 +0100)]
INSTALL: Add comment that /var/paraslash should be writable.

Thanks to Johannes Wörner for pointing this out.

16 years agoexec.c: Open /dev/null r/w.
Andre Noll [Wed, 22 Oct 2008 09:28:15 +0000 (11:28 +0200)]
exec.c: Open /dev/null r/w.

Just to prevent external programs from getting confused when they write
to fd 1 or 2.

16 years agomp3_afh.c: Fix compilation on Mac OS 10.5.
Andre Noll [Sun, 12 Oct 2008 22:03:46 +0000 (00:03 +0200)]
mp3_afh.c: Fix compilation on Mac OS 10.5.

uint is not defined on newer Mac OS X.

16 years agostdin: Abort if the consumer terminates.
Andre Noll [Sun, 12 Oct 2008 22:02:35 +0000 (00:02 +0200)]
stdin: Abort if the consumer terminates.

The bug in the wav filter which was fixed in the previous patch
could cause para_filter to hang because the stdin task would not
care whether the filter task has terminated.

Fix it by introducing an output_error pointer.

16 years agoFix the wav filter for Mac OS 10.5.
Andre Noll [Sun, 12 Oct 2008 21:56:25 +0000 (23:56 +0200)]
Fix the wav filter for Mac OS 10.5.

We have to initialize fn->loaded.

16 years agoREQUIREMENTS update.
Andre Noll [Fri, 10 Oct 2008 16:47:47 +0000 (18:47 +0200)]
REQUIREMENTS update.

Mention that the libmad development package is called libmad0-dev and
reformat the section on id3 tags so that grutatext indents it nicely.

16 years agoImplement better error diagnostics for para_client.
Andre Noll [Tue, 30 Sep 2008 20:23:18 +0000 (22:23 +0200)]
Implement better error diagnostics for para_client.

In case the config file contains errors, the old code caused
para_client to exit without printing an error message.

We need print_errors == 0 in client_open() because this function
is also used by para_audiod which might not have a controlling
terminal. So use gengetopt's --no-handle-error option that instructs
the command line parser not to exit on errors. This wy we can use
PARA_ERROR_LOG() to log an appropriate error message.

16 years agoamp_filter.c: Fix filename in doxygen comment.
Andre Noll [Tue, 30 Sep 2008 18:58:23 +0000 (20:58 +0200)]
amp_filter.c: Fix filename in doxygen comment.

16 years agoMakefile.in: Do not use depricated git-archive.
Andre Noll [Tue, 30 Sep 2008 18:57:46 +0000 (20:57 +0200)]
Makefile.in: Do not use depricated git-archive.

16 years agoMerge commit 'meins/master'
Andre Noll [Mon, 29 Sep 2008 09:14:42 +0000 (11:14 +0200)]
Merge commit 'meins/master'

16 years agoFix com_init.
Andre Noll [Mon, 29 Sep 2008 09:09:59 +0000 (11:09 +0200)]
Fix com_init.

Dooh. The init command always produces output, so we have to pass a pointer
to send_result() as the result handler and the fd to send data to.

Thanks to Johannes Wörner for pointing out this rather embarrassing bug.

16 years agoaft.c: Clear more status items in stop mode.
Andre Noll [Sun, 28 Sep 2008 10:51:41 +0000 (12:51 +0200)]
aft.c: Clear more status items in stop mode.

16 years agovss: Fix com_jmp() and com_ff().
Andre Noll [Sun, 28 Sep 2008 10:50:48 +0000 (12:50 +0200)]
vss: Fix com_jmp() and com_ff().

We must not clear the VSS_REPOS flag in vss_send_chunk() as this
might cause the reposition request being ignored.

16 years agoClear all fields in stop mode where it makes sense.
Andre Noll [Fri, 25 Jul 2008 16:31:12 +0000 (18:31 +0200)]
Clear all fields in stop mode where it makes sense.

16 years agoMerge commit 'meins/master'
Andre Noll [Sat, 19 Jul 2008 15:24:52 +0000 (17:24 +0200)]
Merge commit 'meins/master'

16 years agoNEWS update.
Andre Noll [Sat, 12 Jul 2008 10:53:39 +0000 (12:53 +0200)]
NEWS update.

16 years agoFix a bug in para_write.
Andre Noll [Sat, 12 Jul 2008 10:40:36 +0000 (12:40 +0200)]
Fix a bug in para_write.

With the old code, the command "para_write < /dev/null" would
segfault because the wng_close() is called although the writer
node group was never opened. Fix this bug by introducing a new
field in struct writer_node_group that tracks whether wng_open()
was called.

16 years agoAdd the new amp filter.
Andre Noll [Sat, 12 Jul 2008 10:22:54 +0000 (12:22 +0200)]
Add the new amp filter.

Move the amplification code from compress.c to amp_filter.c

16 years agoMerge commit 'meins/master'
Andre Noll [Fri, 11 Jul 2008 15:08:51 +0000 (17:08 +0200)]
Merge commit 'meins/master'

16 years agofade: Fix default modes.
Andre Noll [Thu, 10 Jul 2008 07:19:14 +0000 (09:19 +0200)]
fade: Fix default modes.

16 years agoMerge commit 'meins/master'
Andre Noll [Mon, 7 Jul 2008 08:53:31 +0000 (10:53 +0200)]
Merge commit 'meins/master'

16 years agoscore_update(): Don't return an error if file is not admissible.
Andre Noll [Sun, 6 Jul 2008 22:23:36 +0000 (00:23 +0200)]
score_update(): Don't return an error if file is not admissible.

This function is called whenever the afs_info struct changed,
for example if the user executed a touch command. Simply
ignore the request to update the score in case the file is not
contained in the score table.

16 years agoPrint more info in case an afs event handler failed.
Andre Noll [Sun, 6 Jul 2008 22:19:40 +0000 (00:19 +0200)]
Print more info in case an afs event handler failed.

16 years agoFix another bug in com_touch().
Andre Noll [Sun, 6 Jul 2008 21:45:26 +0000 (23:45 +0200)]
Fix another bug in com_touch().

Only set the amp value if the -a option was given.

16 years agocompress filter: Fix parsing of the amplification string.
Andre Noll [Sun, 6 Jul 2008 18:52:13 +0000 (20:52 +0200)]
compress filter: Fix parsing of the amplification string.

We need to consider the prefix as well.

16 years agoFix com_touch.
Andre Noll [Sun, 6 Jul 2008 18:51:04 +0000 (20:51 +0200)]
Fix com_touch.

The check whether no options were given was busted.

16 years agoNEWS update.
Andre Noll [Sun, 6 Jul 2008 18:26:45 +0000 (20:26 +0200)]
NEWS update.

16 years agoAdd more documentation about the amplification value.
Andre Noll [Sun, 6 Jul 2008 18:26:30 +0000 (20:26 +0200)]
Add more documentation about the amplification value.

16 years agocompress.c: Activate pre-amplification.
Andre Noll [Sun, 6 Jul 2008 18:26:12 +0000 (20:26 +0200)]
compress.c: Activate pre-amplification.

Use the amplification value announced by para_server to
pre-amplify the stream.

16 years agoInitialize stat_item_values[].
Andre Noll [Sun, 6 Jul 2008 18:24:52 +0000 (20:24 +0200)]
Initialize stat_item_values[].

Just to be sure..

16 years agoaudiod: Make stat_task static.
Andre Noll [Sun, 6 Jul 2008 17:34:08 +0000 (19:34 +0200)]
audiod: Make stat_task static.

The only reason it wasn't static was that audiod_command.c
could use it. However, audiod_command.c only needs
stat_item_values[] and several other fields that were only
used in get_time_string().

So move stat_item_values[] out of struct status task so that
audiod_command.c can use it, and move get_time_string() from
audio_command.c to audiod.c.

16 years agoTeach the touch command about amplification.
Andre Noll [Sun, 6 Jul 2008 17:27:31 +0000 (19:27 +0200)]
Teach the touch command about amplification.

16 years agoTeach the ls command to print the amplification value.
Andre Noll [Sun, 6 Jul 2008 17:26:50 +0000 (19:26 +0200)]
Teach the ls command to print the amplification value.

16 years agoUse an unused byte in struct afs_info to store the amplification value.
Andre Noll [Sun, 6 Jul 2008 17:25:40 +0000 (19:25 +0200)]
Use an unused byte in struct afs_info to store the amplification value.

16 years agoIntroduce new status item: amplify.
Andre Noll [Sun, 6 Jul 2008 17:23:27 +0000 (19:23 +0200)]
Introduce new status item: amplify.

16 years agoMerge commit 'meins/master'
Andre Noll [Mon, 30 Jun 2008 08:16:04 +0000 (10:16 +0200)]
Merge commit 'meins/master'

16 years agoconfigure.ac: Print whether libid3tag was found.
Andre Noll [Sun, 29 Jun 2008 20:35:29 +0000 (22:35 +0200)]
configure.ac: Print whether libid3tag was found.

16 years agoREQUIREMENTS: Add a note about libid3tag.
Andre Noll [Sun, 29 Jun 2008 20:34:57 +0000 (22:34 +0200)]
REQUIREMENTS: Add a note about libid3tag.

16 years agoImplement ogg vorbis comment parsing.
Andre Noll [Sun, 29 Jun 2008 19:03:27 +0000 (21:03 +0200)]
Implement ogg vorbis comment parsing.

16 years agoMove make_taginfo() from mp3_afh.c to afh_common.c.
Andre Noll [Sun, 29 Jun 2008 19:02:36 +0000 (21:02 +0200)]
Move make_taginfo() from mp3_afh.c to afh_common.c.

This way, also the ogg vorbis code can use it.

16 years agomp3: Add support for id3 version 2 tags.
Andre Noll [Sun, 29 Jun 2008 16:04:15 +0000 (18:04 +0200)]
mp3: Add support for id3 version 2 tags.

16 years agoKeep the audio file open when mmapping.
Andre Noll [Sun, 29 Jun 2008 13:06:48 +0000 (15:06 +0200)]
Keep the audio file open when mmapping.

libid3tag needs an open fd. So call () with a
non-NULL pointer which results in the file still being open
after mmap_full_file() returns. Pass the file descriptor
to compute_afhi() and to get_file_info() so that libid3tag
can use it.

16 years agoLink para_server and para_afh against libid3tag if available.
Andre Noll [Sun, 29 Jun 2008 12:58:12 +0000 (14:58 +0200)]
Link para_server and para_afh against libid3tag if available.

16 years agoMake mp3_get_file_info() static.
Andre Noll [Sun, 29 Jun 2008 12:39:00 +0000 (14:39 +0200)]
Make mp3_get_file_info() static.

16 years agoReorder functions in mp3_afh.c.
Andre Noll [Sun, 29 Jun 2008 12:38:02 +0000 (14:38 +0200)]
Reorder functions in mp3_afh.c.

16 years agoGet rid of struct id3tag and struct mp3info.
Andre Noll [Sun, 29 Jun 2008 12:35:59 +0000 (14:35 +0200)]
Get rid of struct id3tag and struct mp3info.

As a preparation for dealing with id3v2 tags.

16 years agomp3_read_info(): Kill fl_avg.
Andre Noll [Sat, 28 Jun 2008 16:43:22 +0000 (18:43 +0200)]
mp3_read_info(): Kill fl_avg.

The average frame length is computed but not used anywhere.

16 years agoKill struct mp3info->header.
Andre Noll [Sat, 28 Jun 2008 16:32:46 +0000 (18:32 +0200)]
Kill struct mp3info->header.

16 years agoMake mp3_seek_next_header() more readable.
Andre Noll [Sat, 28 Jun 2008 16:25:07 +0000 (18:25 +0200)]
Make mp3_seek_next_header() more readable.

It fills in a mp3header structure. So use a function parameter
instead of a global variable.

16 years agoSimplify mp3_seek_next_header().
Andre Noll [Sat, 28 Jun 2008 16:18:53 +0000 (18:18 +0200)]
Simplify mp3_seek_next_header().

16 years agoAllocate afh_info->info_string dynamically.
Andre Noll [Sat, 28 Jun 2008 11:35:20 +0000 (13:35 +0200)]
Allocate afh_info->info_string dynamically.

16 years agoMerge commit 'meins/master'
Andre Noll [Wed, 25 Jun 2008 16:39:37 +0000 (18:39 +0200)]
Merge commit 'meins/master'

16 years agomp3_afh.c: Simplify mp3_get_id3().
Andre Noll [Sun, 22 Jun 2008 01:53:00 +0000 (03:53 +0200)]
mp3_afh.c: Simplify mp3_get_id3().

No need to pass the fpos pointer here.

16 years agoosl.c: Do not include list.h.
Andre Noll [Fri, 6 Jun 2008 12:48:22 +0000 (14:48 +0200)]
osl.c: Do not include list.h.

16 years ago[NET]: Bug-fix for getaddrinfo()
Gerrit Renker [Wed, 14 May 2008 11:16:33 +0000 (13:16 +0200)]
[NET]: Bug-fix for getaddrinfo()

Something changed in the getaddrinfo() mechanism, causing AF_UNSPEC
in combination with ai_socktype=0 to return IPv4 addresses first
(instead of starting with IPv6 addresses). As a consequence, IPv6
servers are restricted to only IPv4 connections - IPv6 clients will
receive an ICMPv6 error message, which gets translated into an annoying
"protocol error" locally.

The fix is to pretend to be UDP instead of DCCP (pretending to be TCP
also works). This allows getaddrinfo to look up the address without
side effects and has been found to work.

16 years agorecv.h: Cosmetics.
Andre Noll [Fri, 9 May 2008 18:01:41 +0000 (20:01 +0200)]
recv.h: Cosmetics.

16 years agofade.c: Stop playing if no sleep mode was given.
Andre Noll [Thu, 24 Apr 2008 17:06:02 +0000 (19:06 +0200)]
fade.c: Stop playing if no sleep mode was given.

16 years agostat.c: Comment out noisy debug messages.
Andre Noll [Thu, 24 Apr 2008 17:05:33 +0000 (19:05 +0200)]
stat.c: Comment out noisy debug messages.

16 years agofilter_chain.c: Cosmetics.
Andre Noll [Tue, 22 Apr 2008 19:00:02 +0000 (21:00 +0200)]
filter_chain.c: Cosmetics.

16 years agoUpdate documentation of filter_pre_select().
Andre Noll [Sun, 20 Apr 2008 19:24:11 +0000 (21:24 +0200)]
Update documentation of filter_pre_select().

16 years agoRemove unused WAV_FILTER_NUM.
Andre Noll [Sun, 20 Apr 2008 19:06:21 +0000 (21:06 +0200)]
Remove unused WAV_FILTER_NUM.

16 years agofilter.c: Cosmetics.
Andre Noll [Sun, 20 Apr 2008 18:58:40 +0000 (20:58 +0200)]
filter.c: Cosmetics.

16 years agofilter.c: Handle filter errors gracefully.
Andre Noll [Sun, 20 Apr 2008 18:55:15 +0000 (20:55 +0200)]
filter.c: Handle filter errors gracefully.

Free the filter chain struct on errors and do not try to
close filters that haven't been opened.

16 years agoaudiod.c: Use correct size for filter node array.
Andre Noll [Sun, 20 Apr 2008 18:01:22 +0000 (20:01 +0200)]
audiod.c: Use correct size for filter node array.

The previous code worked only by accident because struct
filter_chain is larger than struct filter_node.

16 years agoMake hover on the gitweb page work as on the other web pages.
Andre Noll [Tue, 15 Apr 2008 05:47:47 +0000 (07:47 +0200)]
Make hover on the gitweb page work as on the other web pages.

16 years agoaudiod: Do not restart the receiver too early.
Andre Noll [Tue, 15 Apr 2008 05:24:44 +0000 (07:24 +0200)]
audiod: Do not restart the receiver too early.

Wait at least until the receiver node has been closed.