mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 22:06:41 +00:00
parent
0c38d700ca
commit
191c2d38ea
2 changed files with 30 additions and 1 deletions
|
@ -1263,7 +1263,12 @@ AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
|
||||||
dnl *** wildmidi ***
|
dnl *** wildmidi ***
|
||||||
translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
|
translit(dnm, m, l) AM_CONDITIONAL(USE_WILDMIDI, true)
|
||||||
AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
|
AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [
|
||||||
AC_CHECK_HEADER([wildmidi_lib.h],HAVE_WILDMIDI=yes, HAVE_WILDMIDI=no)
|
AG_GST_CHECK_LIBHEADER(WILDMIDI, WildMidi,
|
||||||
|
WildMidi_Init, ,
|
||||||
|
wildmidi_lib.h,
|
||||||
|
WILDMIDI_LIBS="-lWildMidi")
|
||||||
|
AC_CHECK_LIB(WildMidi, WildMidi_LoadSamples, AC_DEFINE(HAVE_WILDMIDI_0_2_2, [1], [Have WildMidi 0.2.2 or earlier library]))
|
||||||
|
|
||||||
if test "x$HAVE_WILDMIDI" = "xyes"; then
|
if test "x$HAVE_WILDMIDI" = "xyes"; then
|
||||||
WILDMIDI_CFLAGS=
|
WILDMIDI_CFLAGS=
|
||||||
WILDMIDI_LIBS=-lWildMidi
|
WILDMIDI_LIBS=-lWildMidi
|
||||||
|
|
|
@ -489,11 +489,16 @@ gst_wildmidi_do_seek (GstWildmidi * wildmidi, GstEvent * event)
|
||||||
sample = segment->last_stop;
|
sample = segment->last_stop;
|
||||||
|
|
||||||
GST_OBJECT_LOCK (wildmidi);
|
GST_OBJECT_LOCK (wildmidi);
|
||||||
|
#ifdef HAVE_WILDMIDI_0_2_2
|
||||||
if (accurate) {
|
if (accurate) {
|
||||||
WildMidi_SampledSeek (wildmidi->song, &sample);
|
WildMidi_SampledSeek (wildmidi->song, &sample);
|
||||||
} else {
|
} else {
|
||||||
WildMidi_FastSeek (wildmidi->song, &sample);
|
WildMidi_FastSeek (wildmidi->song, &sample);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
WildMidi_FastSeek (wildmidi->song, &sample);
|
||||||
|
#endif
|
||||||
|
|
||||||
GST_OBJECT_UNLOCK (wildmidi);
|
GST_OBJECT_UNLOCK (wildmidi);
|
||||||
|
|
||||||
segment->start = segment->time = segment->last_stop = sample;
|
segment->start = segment->time = segment->last_stop = sample;
|
||||||
|
@ -669,12 +674,21 @@ gst_wildmidi_parse_song (GstWildmidi * wildmidi)
|
||||||
if (!wildmidi->song)
|
if (!wildmidi->song)
|
||||||
goto open_failed;
|
goto open_failed;
|
||||||
|
|
||||||
|
#ifdef HAVE_WILDMIDI_0_2_2
|
||||||
WildMidi_LoadSamples (wildmidi->song);
|
WildMidi_LoadSamples (wildmidi->song);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WILDMIDI_0_2_2
|
||||||
WildMidi_SetOption (wildmidi->song, WM_MO_LINEAR_VOLUME,
|
WildMidi_SetOption (wildmidi->song, WM_MO_LINEAR_VOLUME,
|
||||||
wildmidi->linear_volume);
|
wildmidi->linear_volume);
|
||||||
WildMidi_SetOption (wildmidi->song, WM_MO_EXPENSIVE_INTERPOLATION,
|
WildMidi_SetOption (wildmidi->song, WM_MO_EXPENSIVE_INTERPOLATION,
|
||||||
wildmidi->high_quality);
|
wildmidi->high_quality);
|
||||||
|
#else
|
||||||
|
WildMidi_SetOption (wildmidi->song, WM_MO_LOG_VOLUME,
|
||||||
|
!wildmidi->linear_volume);
|
||||||
|
WildMidi_SetOption (wildmidi->song, WM_MO_ENHANCED_RESAMPLING,
|
||||||
|
wildmidi->high_quality);
|
||||||
|
#endif
|
||||||
|
|
||||||
info = WildMidi_GetInfo (wildmidi->song);
|
info = WildMidi_GetInfo (wildmidi->song);
|
||||||
GST_OBJECT_UNLOCK (wildmidi);
|
GST_OBJECT_UNLOCK (wildmidi);
|
||||||
|
@ -901,16 +915,26 @@ gst_wildmidi_set_property (GObject * object, guint prop_id,
|
||||||
GST_OBJECT_LOCK (object);
|
GST_OBJECT_LOCK (object);
|
||||||
wildmidi->linear_volume = g_value_get_boolean (value);
|
wildmidi->linear_volume = g_value_get_boolean (value);
|
||||||
if (wildmidi->song)
|
if (wildmidi->song)
|
||||||
|
#ifdef HAVE_WILDMIDI_0_2_2
|
||||||
WildMidi_SetOption (wildmidi->song, WM_MO_LINEAR_VOLUME,
|
WildMidi_SetOption (wildmidi->song, WM_MO_LINEAR_VOLUME,
|
||||||
wildmidi->linear_volume);
|
wildmidi->linear_volume);
|
||||||
|
#else
|
||||||
|
WildMidi_SetOption (wildmidi->song, WM_MO_LOG_VOLUME,
|
||||||
|
!wildmidi->linear_volume);
|
||||||
|
#endif
|
||||||
GST_OBJECT_UNLOCK (object);
|
GST_OBJECT_UNLOCK (object);
|
||||||
break;
|
break;
|
||||||
case ARG_HIGH_QUALITY:
|
case ARG_HIGH_QUALITY:
|
||||||
GST_OBJECT_LOCK (object);
|
GST_OBJECT_LOCK (object);
|
||||||
wildmidi->high_quality = g_value_get_boolean (value);
|
wildmidi->high_quality = g_value_get_boolean (value);
|
||||||
if (wildmidi->song)
|
if (wildmidi->song)
|
||||||
|
#ifdef HAVE_WILDMIDI_0_2_2
|
||||||
WildMidi_SetOption (wildmidi->song, WM_MO_EXPENSIVE_INTERPOLATION,
|
WildMidi_SetOption (wildmidi->song, WM_MO_EXPENSIVE_INTERPOLATION,
|
||||||
wildmidi->high_quality);
|
wildmidi->high_quality);
|
||||||
|
#else
|
||||||
|
WildMidi_SetOption (wildmidi->song, WM_MO_ENHANCED_RESAMPLING,
|
||||||
|
wildmidi->high_quality);
|
||||||
|
#endif
|
||||||
GST_OBJECT_UNLOCK (object);
|
GST_OBJECT_UNLOCK (object);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue