summaryrefslogtreecommitdiffstats
path: root/gtk/src/hb-backend.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-07-18 13:42:25 -0700
committerBradley Sepos <[email protected]>2016-09-02 03:33:06 -0400
commitfb78eca4a49077c171ad78177c1615c205adc642 (patch)
treea74bd30ca1ab0f67e4a37c0c728273d87dc57635 /gtk/src/hb-backend.c
parente7a320cb6223a2389db025e8bd8001ee9ece9769 (diff)
contrib: Add opus audio encoder.
Remove: hb_audio_samplerate_get_best() Add: hb_audio_samplerate_is_supported() hb_audio_samplerate_find_closest() hb_audio_samplerate_get_sr_shift()
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r--gtk/src/hb-backend.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 5feababa5..1df18e703 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -1011,20 +1011,7 @@ lookup_param_option(const hb_filter_param_t *param, const GhbValue *gval)
gint
ghb_find_closest_audio_samplerate(gint irate)
{
- gint result;
- const hb_rate_t *rate;
-
- result = 0;
- for (rate = hb_audio_samplerate_get_next(NULL); rate != NULL;
- rate = hb_audio_samplerate_get_next(rate))
- {
- if (irate <= rate->rate)
- {
- result = rate->rate;
- break;
- }
- }
- return result;
+ return hb_audio_samplerate_find_closest(irate, HB_ACODEC_INVALID);
}
const iso639_lang_t* ghb_iso639_lookup_by_int(int idx)