Hello community, here is the log from the commit of package alsa-plugins for openSUSE:Factory checked in at Tue Jun 2 18:41:18 CEST 2009. -------- --- alsa-plugins/alsa-plugins.changes 2009-05-06 18:15:07.000000000 +0200 +++ /mounts/work_src_done/STABLE/alsa-plugins/alsa-plugins.changes 2009-06-02 16:39:41.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Jun 2 16:36:55 CEST 2009 - tiwai@suse.de + +- extend rate plugins to follow the new protocol + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- alsa-plugins-git-fixes.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alsa-plugins.spec ++++++ --- /var/tmp/diff_new_pack.Su6667/_old 2009-06-02 18:40:54.000000000 +0200 +++ /var/tmp/diff_new_pack.Su6667/_new 2009-06-02 18:40:54.000000000 +0200 @@ -38,14 +38,14 @@ Url: http://www.alsa-project.org/ Summary: Extra Plug-Ins for the ALSA Library Version: 1.0.20 -Release: 1 +Release: 2 License: BSD 3-Clause; GPL v2 or later; LGPL v2.1 or later Group: System/Libraries AutoReqProv: on Source: ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-%{package_version}.tar.bz2 Source1: asound-pulse.conf Source2: alsa-pulse.conf -# Patch: alsa-plugins-git-fixes.diff +Patch: alsa-plugins-git-fixes.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -147,7 +147,7 @@ %prep %setup -q -n %{name}-%{package_version} -# %patch -p1 +%patch -p1 %build autoreconf -fi @@ -224,6 +224,8 @@ %endif %changelog +* Tue Jun 02 2009 tiwai@suse.de +- extend rate plugins to follow the new protocol * Wed May 06 2009 tiwai@suse.de - updated to version 1.0.20: * including previous patches ++++++ alsa-plugins-git-fixes.diff ++++++ diff --git a/pph/rate_speexrate.c b/pph/rate_speexrate.c index 38244b6..0a1325c 100644 --- a/pph/rate_speexrate.c +++ b/pph/rate_speexrate.c @@ -116,6 +116,26 @@ static void pcm_src_close(void *obj) free(obj); } +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 +static int get_supported_rates(void *obj, unsigned int *rate_min, + unsigned int *rate_max) +{ + *rate_min = *rate_max = 0; /* both unlimited */ + return 0; +} + +static void dump(void *obj, snd_output_t *out) +{ + snd_output_printf(out, "Converter: libspeex " +#ifdef USE_LIBSPEEX + "(external)" +#else + "(builtin)" +#endif + "\n"); +} +#endif + static snd_pcm_rate_ops_t pcm_src_ops = { .close = pcm_src_close, .init = pcm_src_init, @@ -125,6 +145,11 @@ static snd_pcm_rate_ops_t pcm_src_ops = { .convert_s16 = pcm_src_convert_s16, .input_frames = input_frames, .output_frames = output_frames, +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 + .version = SND_PCM_RATE_PLUGIN_VERSION, + .get_supported_rates = get_supported_rates, + .dump = dump, +#endif }; static int pcm_src_open(unsigned int version, void **objp, @@ -132,18 +157,24 @@ static int pcm_src_open(unsigned int version, void **objp, { struct rate_src *rate; +#if SND_PCM_RATE_PLUGIN_VERSION < 0x010002 if (version != SND_PCM_RATE_PLUGIN_VERSION) { fprintf(stderr, "Invalid rate plugin version %x\n", version); return -EINVAL; } - +#endif rate = calloc(1, sizeof(*rate)); if (! rate) return -ENOMEM; rate->quality = quality; *objp = rate; - *ops = pcm_src_ops; +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 + if (version == 0x010001) + memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t)); + else +#endif + *ops = pcm_src_ops; return 0; } diff --git a/rate-lavc/rate_lavcrate.c b/rate-lavc/rate_lavcrate.c index ea2e2f5..14a2198 100644 --- a/rate-lavc/rate_lavcrate.c +++ b/rate-lavc/rate_lavcrate.c @@ -202,6 +202,20 @@ static void pcm_src_close(void *obj) pcm_src_free(obj); } +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 +static int get_supported_rates(void *obj, unsigned int *rate_min, + unsigned int *rate_max) +{ + *rate_min = *rate_max = 0; /* both unlimited */ + return 0; +} + +static void dump(void *obj, snd_output_t *out) +{ + snd_output_printf(out, "Converter: liblavc\n"); +} +#endif + static snd_pcm_rate_ops_t pcm_src_ops = { .close = pcm_src_close, .init = pcm_src_init, @@ -211,6 +225,11 @@ static snd_pcm_rate_ops_t pcm_src_ops = { .convert_s16 = pcm_src_convert_s16, .input_frames = input_frames, .output_frames = output_frames, +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 + .version = SND_PCM_RATE_PLUGIN_VERSION, + .get_supported_rates = get_supported_rates, + .dump = dump, +#endif }; int pcm_src_open(unsigned int version, void **objp, snd_pcm_rate_ops_t *ops) @@ -218,18 +237,24 @@ int pcm_src_open(unsigned int version, void **objp, snd_pcm_rate_ops_t *ops) { struct rate_src *rate; +#if SND_PCM_RATE_PLUGIN_VERSION < 0x010002 if (version != SND_PCM_RATE_PLUGIN_VERSION) { fprintf(stderr, "Invalid rate plugin version %x\n", version); return -EINVAL; } - +#endif rate = calloc(1, sizeof(*rate)); if (!rate) return -ENOMEM; *objp = rate; rate->context = NULL; - *ops = pcm_src_ops; +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 + if (version == 0x010001) + memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t)); + else +#endif + *ops = pcm_src_ops; return 0; } diff --git a/rate/rate_samplerate.c b/rate/rate_samplerate.c index e366db0..53a0627 100644 --- a/rate/rate_samplerate.c +++ b/rate/rate_samplerate.c @@ -137,6 +137,20 @@ static void pcm_src_close(void *obj) free(obj); } +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 +static int get_supported_rates(void *obj, unsigned int *rate_min, + unsigned int *rate_max) +{ + *rate_min = *rate_max = 0; /* both unlimited */ + return 0; +} + +static void dump(void *obj, snd_output_t *out) +{ + snd_output_printf(out, "Converter: libsamplerate\n"); +} +#endif + static snd_pcm_rate_ops_t pcm_src_ops = { .close = pcm_src_close, .init = pcm_src_init, @@ -146,6 +160,11 @@ static snd_pcm_rate_ops_t pcm_src_ops = { .convert_s16 = pcm_src_convert_s16, .input_frames = input_frames, .output_frames = output_frames, +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 + .version = SND_PCM_RATE_PLUGIN_VERSION, + .get_supported_rates = get_supported_rates, + .dump = dump, +#endif }; static int pcm_src_open(unsigned int version, void **objp, @@ -153,18 +172,24 @@ static int pcm_src_open(unsigned int version, void **objp, { struct rate_src *rate; +#if SND_PCM_RATE_PLUGIN_VERSION < 0x010002 if (version != SND_PCM_RATE_PLUGIN_VERSION) { fprintf(stderr, "Invalid rate plugin version %x\n", version); return -EINVAL; } - +#endif rate = calloc(1, sizeof(*rate)); if (! rate) return -ENOMEM; rate->converter = type; *objp = rate; - *ops = pcm_src_ops; +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 + if (version == 0x010001) + memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t)); + else +#endif + *ops = pcm_src_ops; return 0; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org