Mega patch:

* implement inner loops using liboil
* drop "typeid" stuff
* add support for channel maps
* add support for seperate volumes per channel
* add support for hardware mixer settings (only module-oss implements this for now)
* fix a lot of types for _t suffix


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@463 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-01-27 16:25:31 +00:00
parent 759721cbbc
commit dd10c98241
114 changed files with 2584 additions and 1329 deletions

View file

@ -61,7 +61,7 @@ struct userdata {
static int lirc_in_use = 0;
static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GCC_UNUSED int fd, pa_io_event_flags events, void*userdata) {
static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GCC_UNUSED int fd, pa_io_event_flags_t events, void*userdata) {
struct userdata *u = userdata;
char *name = NULL, *code = NULL;
assert(io);
@ -109,26 +109,45 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC
if (!(s = pa_namereg_get(u->module->core, u->sink_name, PA_NAMEREG_SINK, 1)))
pa_log(__FILE__": failed to get sink '%s'\n", u->sink_name);
else {
double v = pa_volume_to_user(s->volume);
pa_volume_t v = pa_cvolume_avg(pa_sink_get_volume(s, PA_MIXER_HARDWARE));
pa_cvolume cv;
#define DELTA (PA_VOLUME_NORM/20)
switch (volchange) {
case UP: v += .05; break;
case DOWN: v -= .05; break;
case MUTE: v = 0; break;
case RESET: v = 1; break;
case UP:
v += PA_VOLUME_NORM/20;
break;
case DOWN:
if (v > DELTA)
v -= DELTA;
else
v = PA_VOLUME_MUTED;
break;
case MUTE:
v = PA_VOLUME_MUTED;
break;
case RESET:
v = PA_VOLUME_NORM;
break;
case MUTE_TOGGLE: {
if (v > 0) {
u->mute_toggle_save = v;
v = 0;
v = PA_VOLUME_MUTED;
} else
v = u->mute_toggle_save;
}
default:
;
}
pa_sink_set_volume(s, pa_volume_from_user(v));
pa_cvolume_set(&cv, PA_CHANNELS_MAX, v);
pa_sink_set_volume(s, PA_MIXER_HARDWARE, &cv);
}
}
}