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

@ -36,7 +36,6 @@
#include "log.h"
#define BUF_SIZE (1024*10)
#define PA_TYPEID_SOUND_FILE PA_TYPEID_MAKE('S', 'N', 'D', 'F')
struct userdata {
SNDFILE *sndfile;
@ -116,15 +115,12 @@ static void sink_input_drop(pa_sink_input *i, const pa_memchunk*chunk, size_t le
}
}
int pa_play_file(pa_sink *sink, const char *fname, pa_volume_t volume) {
int pa_play_file(pa_sink *sink, const char *fname, const pa_cvolume *volume) {
struct userdata *u = NULL;
SF_INFO sfinfo;
pa_sample_spec ss;
assert(sink && fname);
if (volume <= 0)
goto fail;
u = pa_xmalloc(sizeof(struct userdata));
u->sink_input = NULL;
u->memchunk.memblock = NULL;
@ -161,10 +157,11 @@ int pa_play_file(pa_sink *sink, const char *fname, pa_volume_t volume) {
goto fail;
}
if (!(u->sink_input = pa_sink_input_new(sink, PA_TYPEID_SOUND_FILE, fname, &ss, 0, -1)))
if (!(u->sink_input = pa_sink_input_new(sink, __FILE__, fname, &ss, NULL, 0, -1)))
goto fail;
u->sink_input->volume = volume;
if (volume)
u->sink_input->volume = *volume;
u->sink_input->peek = sink_input_peek;
u->sink_input->drop = sink_input_drop;
u->sink_input->kill = sink_input_kill;