Andre Noll [Tue, 23 Oct 2007 21:36:40 +0000 (23:36 +0200)]
Get rid of mmd->filename.
The info is also contained in afd, but this was a pointer to data in
the shared memory area. We must copy into the static mmd buffer anyway,
since com_stat() must be able to see it. So make afd.path a static
array rather than a pointer and use afd->path instead of mmd->filename.
This simplifies save_afd() and load_afd() a bit since now only the
chunk table is of variable length.
Andre Noll [Tue, 23 Oct 2007 18:30:42 +0000 (20:30 +0200)]
Get rid of mmd->audio_format.
The current audio format is also stored in mmd->afd.afsi.audio_format_id,
so use the value stored there. However, most users of mmd->audio_format
used this value only to detect whether an audio file is open ATM. In
vss.c, use the map pointer instead to find out whether an audio file is
open.
Andre Noll [Tue, 23 Oct 2007 16:13:21 +0000 (18:13 +0200)]
Remove para_sdl_gui, para_slider, para_krell.
These were all really crappy, probably not used by anybody,
and they broke due to the rename of the status item text or
the switch to the new afs. So let's get rid of them.
Andre Noll [Mon, 22 Oct 2007 20:23:31 +0000 (22:23 +0200)]
Switch to the new afs.
This obsoletes get_audio_file() of vss.c. It is being replaced
by a call to the afs layer from vss_post_select() which requests
a struct audio_format_data for the next audio file.
The afd struct, the chunk table and the path of the new audio file are
stored in a shared memory area. The id of that area is sent through
the afs-server socket. An open fd for the underlying audio file is
send to the server process as well using usual socket magic.
The vss task of the server process attaches the shared memory area
and mmaps the open fd to start audio streaming.
The code is still quite buggy, but let's do bug fixes and removal of
the old audio file selectors in susequent patches.
Andre Noll [Sun, 21 Oct 2007 13:25:55 +0000 (15:25 +0200)]
Move mmap_full_file from osl.c to fd.c.
To make it independent from osl.c, we must not pass
a pointer to struct osl_data. Replace it by void *, size_t *
pointers. Also add new int *fd_ptr parameter. If it's non-NULL
the file is not closed after mmap, and the open fd is returned
in fd_ptr.
Andre Noll [Sun, 21 Oct 2007 11:43:22 +0000 (13:43 +0200)]
Complete afs event handling.
Add blob event handling. This definitely needs some
more fine-tuning, but that can be changed gradually
thanks to the generic event handling code.
In playlist mode there's nothing to do, as we're
not interested in any blob events. So install only
a dummy handler for the scoring system and decide
whether to reload the score table in mood.c.
Andre Noll [Thu, 11 Oct 2007 12:35:28 +0000 (14:35 +0200)]
Add --gc-sections to LDFLAGS.
This, together with -fdata-sections and -ffunction-sections brought
nice size reductions. Before:
-rwxr-xr-x 1 maan fml 29K Oct 11 14:32 para_audioc*
-rwxr-xr-x 1 maan fml 42K Oct 11 14:32 para_client*
-rwxr-xr-x 1 maan fml 33K Oct 11 14:32 para_fade*
-rwxr-xr-x 1 maan fml 38K Oct 11 14:32 para_filter*
-rwxr-xr-x 1 maan fml 54K Oct 11 14:32 para_fsck*
-rwxr-xr-x 1 maan fml 52K Oct 11 14:32 para_gui*
-rwxr-xr-x 1 maan fml 42K Oct 11 14:32 para_recv*
-rwxr-xr-x 1 maan fml 216K Oct 11 14:32 para_server*
-rwxr-xr-x 1 maan fml 38K Oct 11 14:32 para_write*
After:
-rwxr-xr-x 1 maan fml 21K Oct 11 14:31 para_audioc*
-rwxr-xr-x 1 maan fml 33K Oct 11 14:31 para_client*
-rwxr-xr-x 1 maan fml 29K Oct 11 14:31 para_fade*
-rwxr-xr-x 1 maan fml 29K Oct 11 14:31 para_filter*
-rwxr-xr-x 1 maan fml 45K Oct 11 14:31 para_fsck*
-rwxr-xr-x 1 maan fml 47K Oct 11 14:31 para_gui*
-rwxr-xr-x 1 maan fml 30K Oct 11 14:31 para_recv*
-rwxr-xr-x 1 maan fml 208K Oct 11 14:31 para_server*
-rwxr-xr-x 1 maan fml 29K Oct 11 14:31 para_write*