Andre Noll [Fri, 1 Jun 2007 09:53:11 +0000 (11:53 +0200)]
dccp_send.c: Fix type of "header_len" on x86_64
vss_get_header wants an unsigned, not a size_t. Fixes
dccp_send.c:170: warning: passing arg 1 of `vss_get_header' from incompatible pointer type
Andre Noll [Fri, 1 Jun 2007 09:50:02 +0000 (11:50 +0200)]
Trivial %d -> %zu format string fix
It fixes
command.c:879: warning: int format, different type arg (arg 4)
Andre Noll [Sat, 26 May 2007 21:02:18 +0000 (23:02 +0200)]
fade: cosmetic cleanups
always return negative values on errors, some other trivial changes.
Andre Noll [Sat, 26 May 2007 20:47:48 +0000 (22:47 +0200)]
fade.c: simplify open_mixer()
open() returns -1 on errors anyway.
Andre Noll [Sat, 26 May 2007 20:43:15 +0000 (22:43 +0200)]
fade.c: replace args_info by conf
to be consistent with the other paraslash applications that also use
conf for the gengetopt args_info struct.
Andre Noll [Sat, 26 May 2007 20:39:23 +0000 (22:39 +0200)]
fade.c: Fix some signed issues
Don't sleep at all if the sleep time passed via comamnd line args
are negative.
Andre Noll [Sat, 26 May 2007 20:25:44 +0000 (22:25 +0200)]
fix some signed warnings in aac and mp3 decoders
Only trivial stuff.
Andre Noll [Sat, 26 May 2007 19:38:36 +0000 (21:38 +0200)]
be more carful wrt. signed vs. unsigned argument passing
Andre Noll [Mon, 21 May 2007 20:53:23 +0000 (22:53 +0200)]
error.h: move E_BAD_USER from audiod_command to command error list
Dooh. This caused a segfault in the server's child if an unkown user
connected. Fortunately, this happened right before the process exited
anyway, so it's not a security issue.
Andre Noll [Sat, 19 May 2007 11:19:27 +0000 (13:19 +0200)]
add -Wbad-function-cast to +CPPFLAGS and fix two compiler warnings
Andre Noll [Sat, 19 May 2007 09:34:16 +0000 (11:34 +0200)]
aac: fix some signedness warnings
Andre Noll [Sat, 12 May 2007 15:17:45 +0000 (17:17 +0200)]
alsa_write.ggo: use "default" instead of "plughw:0,0" as the default device
This is what aplay also uses as the default. This change fixes playback of 48
kHz wav files if software mixing is used.
Andre Noll [Thu, 5 Apr 2007 14:37:33 +0000 (16:37 +0200)]
new codename, reset version to git
Andre Noll [Thu, 5 Apr 2007 14:33:31 +0000 (16:33 +0200)]
the paraslash-0.2.16 release tarball
Andre Noll [Thu, 5 Apr 2007 14:32:17 +0000 (16:32 +0200)]
paraslash 0.2.16
Andre Noll [Wed, 4 Apr 2007 08:33:00 +0000 (10:33 +0200)]
fix some compiler warnings on Mac OS
add two casts to make gcc stfu.
Andre Noll [Wed, 4 Apr 2007 08:31:57 +0000 (10:31 +0200)]
Makefile.in: target "install" depends on target "man"
Andre Noll [Wed, 4 Apr 2007 08:24:29 +0000 (10:24 +0200)]
compress.c: fix serious typo
We always compute the peak using the _adjusted_ sample value.
Andre Noll [Wed, 4 Apr 2007 08:22:10 +0000 (10:22 +0200)]
fix compress filter for big endian systems
This time for real. It's almost the same patch as the one just
reverted, but this one is tested on both ppc and x86.
Andre Noll [Mon, 2 Apr 2007 15:16:54 +0000 (17:16 +0200)]
Revert "fix compress filter for big endian machines"
This reverts commit
85225bb1292d1885e0261fb5109d18ecd584c267.
because it broke little endian (x86) machines. The issue needs
further investigation...
Andre Noll [Fri, 30 Mar 2007 15:14:04 +0000 (17:14 +0200)]
fix compress filter for big endian machines
This was broken since day one as it depended on little-endianness. Fix
it by checking the byte sex in configure and let the decoders
produce host endian 16 bit audio output by using the new
write_int16_host_endian() inline function in filter.h
This allows to omit the ugly byte-swapping in osx_write we've had
before.
Andre Noll [Mon, 26 Mar 2007 12:51:03 +0000 (14:51 +0200)]
Merge /fml/ag-raetsch/home/maan/scm/paraslash_meins/paraslash
Conflicts:
mp3_afh.c
Fix the conflict and add more detailed error message to para_mmap().
Andre Noll [Sun, 25 Mar 2007 14:34:20 +0000 (16:34 +0200)]
do not copy the audio file header
It's present in the memory map anyway. So instead of making a
copy, store the position of the header (always zero for now) in
mmd->audio_format_info.
Andre Noll [Sat, 24 Mar 2007 21:24:36 +0000 (22:24 +0100)]
kill some more unneeded includes
Andre Noll [Sat, 24 Mar 2007 21:22:57 +0000 (22:22 +0100)]
aac_afh.c: Get rid of some superfluous includes
Andre Noll [Sat, 24 Mar 2007 21:22:31 +0000 (22:22 +0100)]
mp3_afh.c: set bitrate, frequency and channels of struct audio_file_info
Also, get rid of some superflous includes.
Andre Noll [Sat, 24 Mar 2007 21:20:29 +0000 (22:20 +0100)]
ogg_afh.c: store bitrate, frequency and channels in struct audio_file info
This patch also contains some other improvements:
- make sure that we never write beyond the end of the chunk table
- get rid of some unneeded includes
- kill pointless raw_total variable
- get rid of time_total, vi_sampling_rate and vi_bitrate and use
the corresponding members of struct audio_file_info directly
Andre Noll [Sat, 24 Mar 2007 17:25:08 +0000 (18:25 +0100)]
Merge /home/maan/scm/paraslash_fml/paraslash
Andre Noll [Sat, 24 Mar 2007 17:16:17 +0000 (18:16 +0100)]
aac_afh.c: compute bitrate and store it in the new fields of struct audio format
Also, add this info in afi->info_string
Andre Noll [Sat, 24 Mar 2007 17:14:57 +0000 (18:14 +0100)]
afh: add additional fields channels, frequency, and bitrate to struct audio_format
The idea is that these quantieties are computed by each audio format handler
anyway. So create a common place for them to store that info. This way it
may be used by vss and by afs.
Andre Noll [Fri, 23 Mar 2007 17:44:08 +0000 (18:44 +0100)]
server.h: kill unneccessary openssl/pem.h include
Andre Noll [Fri, 23 Mar 2007 17:42:45 +0000 (18:42 +0100)]
mp3_afh.c: Fix header_bitrate() for invalid headers
This was broken literally since day 1: If the layer or the bitrate
parameter of an (invalid) header is zero, the old code might cause
a segfault.
Andre Noll [Thu, 22 Mar 2007 19:53:47 +0000 (20:53 +0100)]
audiod.c: Fix typo in log message
Andre Noll [Thu, 22 Mar 2007 16:49:34 +0000 (17:49 +0100)]
NEWS update
Andre Noll [Thu, 22 Mar 2007 15:24:39 +0000 (16:24 +0100)]
Makefile.in: Remove some unused variables
Andre Noll [Thu, 22 Mar 2007 15:15:42 +0000 (16:15 +0100)]
vss.c: Don't try to mmap empty files
as this causes mmap() to return MAP_FAILED, i.e. para_mmap() calls
exit() so para_server dies, which clearly is inapproriate. Instead,
skip the audio file and try the next one if size == 0.
Andre Noll [Thu, 22 Mar 2007 15:09:07 +0000 (16:09 +0100)]
mp3_afh.c: Fix off by one bug
may cause a segfault due to accessing one byte past the memory
mapped file.
Andre Noll [Thu, 15 Mar 2007 18:42:39 +0000 (19:42 +0100)]
mysql_selector.c: refresh selector info on com_us and com_snp
Andre Noll [Thu, 15 Mar 2007 17:53:47 +0000 (18:53 +0100)]
Change year in GPL header to 2007
Andre Noll [Thu, 15 Mar 2007 17:53:15 +0000 (18:53 +0100)]
NEWS: Update
Andre Noll [Wed, 14 Mar 2007 18:22:11 +0000 (19:22 +0100)]
fd.c: Kill para_fread() and para_fseek()
as they've become unused due to the switch to memory mapped audio files.
Andre Noll [Wed, 14 Mar 2007 17:48:21 +0000 (18:48 +0100)]
Merge /home/maan/scm/paraslash_fml/paraslash into mmap
Andre Noll [Tue, 13 Mar 2007 23:53:40 +0000 (00:53 +0100)]
mp3_afh.c: More documentation updates
Andre Noll [Tue, 13 Mar 2007 23:28:15 +0000 (00:28 +0100)]
mp3_afh.c: Documentation update
Andre Noll [Tue, 13 Mar 2007 23:05:21 +0000 (00:05 +0100)]
vss.c: simplify vss_eof()
the function was never called with af == NULL, so kill the check.
This check was the only real use of this parameter, so kill the
parameter as well.
Andre Noll [Tue, 13 Mar 2007 22:57:04 +0000 (23:57 +0100)]
vss.c: Switch from fopen() to open()
Andre Noll [Tue, 13 Mar 2007 22:20:10 +0000 (23:20 +0100)]
kill file parameter from get_file_info of struct audio format handler
Now that all audio format handlers use mmap(), this parameter is unused.
Andre Noll [Tue, 13 Mar 2007 22:15:57 +0000 (23:15 +0100)]
mp3_afh.c: Switch to memory mapped input file
Andre Noll [Mon, 12 Mar 2007 21:33:34 +0000 (22:33 +0100)]
aac_afh: use the file mapping rather than read()
This simplifies this audio format handler quite a bit.
Also fix a bug in error.h: E_AAC_OVERRUN is an error of the aac decoder,
so move the corresponding define to where it belongs.
Andre Noll [Mon, 12 Mar 2007 20:19:37 +0000 (21:19 +0100)]
vss.c: Use the file mapping instead of fseek()/read()
Andre Noll [Mon, 12 Mar 2007 19:38:43 +0000 (20:38 +0100)]
first draft of the mmap patch series
The purpose of these changes to para_server is to not call
read()/fseek() in the audio format handlers and in vss.c but to use
mmap() instead which should result in less code and should also be
faster and less error-prone.
This first patch implements the basic infrastructure for mmap but
keeps the file pointer so that changes may be merged step by step and
changes the ogg vorbis audio format handler to use the new mapping
of the audio file.
Subsequent patches will change the other audio format handlers and
the virtual streaming system to also use mmap instead of read()/fseek().
Andre Noll [Mon, 12 Mar 2007 15:18:16 +0000 (16:18 +0100)]
dccp.c was modified in 2007, so change header to reflect this
Andre Noll [Mon, 12 Mar 2007 15:17:33 +0000 (16:17 +0100)]
NEWS: cosmetic menu item fix
Andre Noll [Mon, 12 Mar 2007 15:10:05 +0000 (16:10 +0100)]
Merge ../paraslash_meins/paraslash
Andre Noll [Sun, 11 Mar 2007 19:22:45 +0000 (20:22 +0100)]
vss.c: rename get_song() to vss_get_audio_file()
Andre Noll [Sun, 11 Mar 2007 19:14:18 +0000 (20:14 +0100)]
comment out some noisy debug messages
Andre Noll [Sun, 11 Mar 2007 18:19:09 +0000 (19:19 +0100)]
small documentation cleanup
Andre Noll [Sun, 11 Mar 2007 18:18:30 +0000 (19:18 +0100)]
command.c kill unused declaration of user_list
Andre Noll [Sun, 11 Mar 2007 18:17:30 +0000 (19:17 +0100)]
ogg_afh.c: make two functions static
Andre Noll [Sun, 11 Mar 2007 17:59:07 +0000 (18:59 +0100)]
fix doxygen comment of the init functions of all audio format handlers.
Andre Noll [Sun, 11 Mar 2007 17:56:01 +0000 (18:56 +0100)]
mp3_afh.c: Kill global variable num_chunks and seconds.
num_chunks has the same meaning as chunks_total in struct audio format.
Similarly, mp3.seconds has the same meaning as afi->seconds. So use these.
Andre Noll [Sun, 11 Mar 2007 17:40:08 +0000 (18:40 +0100)]
kill close_audio_file handler from struct audio format.
All audio format handlers just did fclose(), so do this from vss.c
and kill the handler. This also allows to get rid of the global
infile variable in all audio format handlers.
Andre Noll [Sun, 11 Mar 2007 17:23:24 +0000 (18:23 +0100)]
kill global variable af from all audio format handlers
Also rename the argument of the init function from "p" to "afh".
Andre Noll [Sun, 11 Mar 2007 17:19:36 +0000 (18:19 +0100)]
aac_afh.c: kill global variables inbuf and inbuf_len
Pass them to read_chunk_table() instead.
Andre Noll [Sun, 11 Mar 2007 17:11:37 +0000 (18:11 +0100)]
aac_afh.c: free the inbuffer already in aac_get_file_info()
No need to wait for this until the audio file gets closed. This
patch also fixes two occurences of a bug where the length of the
input buffer was not set correctly.
Andre Noll [Sun, 11 Mar 2007 16:52:59 +0000 (17:52 +0100)]
aac_afh.c: Kill global variable af
It's only used in aac_afh_init.
Andre Noll [Sun, 11 Mar 2007 16:50:23 +0000 (17:50 +0100)]
aac_afh.c: Kill global variable num_chunks
It's already stored in afi->chunks_total
Andre Noll [Sun, 11 Mar 2007 16:44:14 +0000 (17:44 +0100)]
aac_afh.c: Kill global variable inbuf_size
it's constant and equals AAC_INBUF_SIZE.
Andre Noll [Sun, 11 Mar 2007 16:34:00 +0000 (17:34 +0100)]
introduce struct audio_format_info
This further simplifies the audio format handlers. The chunk_table
and the header info is now contained in that struct which allows
to move the cleanup on eof from the audio format handlers to the
virtual streaming system.
Andre Noll [Sat, 10 Mar 2007 19:35:34 +0000 (20:35 +0100)]
ogg_afh.c: Kill tunetable()
A rather crappy piece of code that is (1) broken and (2) unneccessary.
Andre Noll [Sat, 10 Mar 2007 19:31:00 +0000 (20:31 +0100)]
ogg_afh.c: Switch to ogg vorbis callbacks
This allows to call ov_clear() already during ogg_get_file_info() which
in turn simplifies ogg_close_audio_file().
This is a preparation for moving the close function of the audio
format handlers to the virtual streaming system as they all do
essentially the same now.
Andre Noll [Sat, 10 Mar 2007 09:38:50 +0000 (10:38 +0100)]
READMY.mysql: replace --enable-mysql-headers by --with-mysql-headers
The configure option was changed some time ago, but the README file
still uses the old syntax.
Andre Noll [Fri, 9 Mar 2007 12:41:43 +0000 (13:41 +0100)]
simplify dccp_set_socket() (Gerrit Renker)
This patch kills two unneccessary setsocketopt calls
and cleans up the resulting fallout.
Andre Noll [Mon, 5 Mar 2007 22:41:09 +0000 (23:41 +0100)]
audiod: avoid busy loop on startup
The restart barrier of the status task must be also set in case
client_open() failed. This avoids spamming the log file.
Andre Noll [Mon, 5 Mar 2007 22:39:48 +0000 (23:39 +0100)]
ogg_afh.c: Fix format string compiler warning
Andre Noll [Mon, 5 Mar 2007 19:47:42 +0000 (20:47 +0100)]
mysql_selector.c: mark mysql_macro_list[] const
Andre Noll [Mon, 5 Mar 2007 19:40:52 +0000 (20:40 +0100)]
mysql.c: fix -Wshadow warnings
Andre Noll [Mon, 5 Mar 2007 19:36:31 +0000 (20:36 +0100)]
Makefile.in: use CPPFLAGS also for target mysql.o
Andre Noll [Sun, 4 Mar 2007 23:45:21 +0000 (00:45 +0100)]
aac_afh.c: Make "handle" a local variable
Also, clean up the definition of static variables.
Andre Noll [Sun, 4 Mar 2007 23:36:14 +0000 (00:36 +0100)]
mp3_afh.c: Mark frequencies, bitrate and frame_size_index arrays const
Andre Noll [Sun, 4 Mar 2007 23:21:27 +0000 (00:21 +0100)]
mp3_afh.c: Kill unused mp3.filename
Andre Noll [Sun, 4 Mar 2007 23:18:36 +0000 (00:18 +0100)]
ogg_afh.c: Kill unneccessary inclusion of fd.h
Andre Noll [Sun, 4 Mar 2007 23:15:38 +0000 (00:15 +0100)]
ogg_afh.c: Kill global variable num_chunks
The code is more readable if this is returned by ogg_compute_chunk_table()
and passed where neccessary.
Andre Noll [Sun, 4 Mar 2007 23:00:31 +0000 (00:00 +0100)]
ogg_afh.c: make vi_sampling_rate, vi_bitrate local
Andre Noll [Sun, 4 Mar 2007 22:57:26 +0000 (23:57 +0100)]
ogg_afh.c: Kill unused vi_bitrate_nominal
Andre Noll [Sun, 4 Mar 2007 22:56:21 +0000 (23:56 +0100)]
ogg_afh.c: get rid of global variable max_chunk_len
It's only used in ogg_compute_chunk_table(). So make it a local variable.
Andre Noll [Sun, 4 Mar 2007 22:54:17 +0000 (23:54 +0100)]
simplify ogg_compute_chunk_table()
it rewinds the input file on entry and on exit. Do this in the caller instead
which allows to get rid of the file parameter in ogg_compute_chunk_table().
Andre Noll [Sun, 4 Mar 2007 22:48:29 +0000 (23:48 +0100)]
ogg_afh.c: Kill global variable infile
Pass it where neccessary instead.
Andre Noll [Sun, 4 Mar 2007 22:39:13 +0000 (23:39 +0100)]
ogg_afh.c: Kill superflous vi_channels
Andre Noll [Sun, 4 Mar 2007 22:37:16 +0000 (23:37 +0100)]
ogg_afh.c: Kill unused inbuf and inbuf_size
Andre Noll [Sun, 4 Mar 2007 22:34:45 +0000 (23:34 +0100)]
mp3_afh.c: Kill unused inbuf and inbuf_size;
Andre Noll [Sun, 4 Mar 2007 22:22:43 +0000 (23:22 +0100)]
simplify vss_read_chunk()
All its parameters are known globally within vss.c, so omit them.
Also, return an int instead of the pointer to the inbuffer which is
also known to the caller.
This patch also introduces para_fseek() in fd.c which is used by
mp3.c and vss.c and changes the mp3 audio format handler so that it
uses the new function and always check the return value.
Andre Noll [Sun, 4 Mar 2007 21:31:52 +0000 (22:31 +0100)]
kill the read_chunk handler of struct audio_format handler
chunks are now read by vss_read_chunk(), i.e. the same function is
used for all audio formats.
Andre Noll [Sun, 4 Mar 2007 21:08:04 +0000 (22:08 +0100)]
make get_file_info() return the chunk table
This is a preparation for the moving the read_chunk handler to
the vss layer.
Andre Noll [Sun, 4 Mar 2007 20:54:36 +0000 (21:54 +0100)]
vss.c: Kill check for get_file_info == NULL
This can never happen.
Andre Noll [Sun, 4 Mar 2007 20:35:44 +0000 (21:35 +0100)]
kill the reposition handler in struct audio_format_handler
All three audio format handlers provided only a dummy function. Kill
these as well.
Andre Noll [Sun, 4 Mar 2007 20:07:33 +0000 (21:07 +0100)]
unify all audio format handlers
This changes the ogg vorbis audio format handler such that its read_chunk and
reposition_stream functions coincide with those of the other audio format
handlers.
Andre Noll [Sun, 4 Mar 2007 19:26:52 +0000 (20:26 +0100)]
ogg_afh.c: Rename oggbuf_len to inbuf_size
so that it matches the naming of the other audio format handlers
Andre Noll [Sun, 4 Mar 2007 19:24:02 +0000 (20:24 +0100)]
ogg_afh.c: Rename oggbuf to inbuf
To make naming consistent with the aac and mp3 audio format handler.
Andre Noll [Sun, 4 Mar 2007 19:18:34 +0000 (20:18 +0100)]
unify aac and mp3 audio format handlers
This makes the mp3 audio format handler use a chunk table just like
m4a and ogg vorbis already do. Moreover, the aac and mp3 audio format
handlers now have identical read_chunk and reposition_stream handlers.
Next step is to tweak the ogg vorbis audio format handler so that
it also fits into this scheme. In the end, this allows to move
read_chunk() and reposition_stream() from the audio format handlers
one layer up to the virtual streaming system and to kill the function
pointers in struct audio_format.
The advantage of this change that it avoids duplicated/similar code, and
that new audio format handlers can added easier.