Get limits and hints for the UIs. granularity sets the minimum step increments that should be used (it's ok to round up to some nice multiple if you like) direction says whether 'low' limit is highest or lowest quality (direction 0 == lowest value is worst quality)
| 2335 | // direction says whether 'low' limit is highest or lowest |
| 2336 | // quality (direction 0 == lowest value is worst quality) |
| 2337 | void hb_audio_quality_get_limits(uint32_t codec, float *low, float *high, |
| 2338 | float *granularity, int *direction) |
| 2339 | { |
| 2340 | switch (codec) |
| 2341 | { |
| 2342 | case HB_ACODEC_FFAAC: |
| 2343 | *direction = 0; |
| 2344 | *granularity = 1.; |
| 2345 | *low = 1.; |
| 2346 | *high = 5.; |
| 2347 | break; |
| 2348 | |
| 2349 | case HB_ACODEC_FDK_HAAC: |
| 2350 | case HB_ACODEC_FDK_AAC: |
| 2351 | *direction = 0; |
| 2352 | *granularity = 1.; |
| 2353 | *low = 1.; |
| 2354 | *high = 5.; |
| 2355 | break; |
| 2356 | |
| 2357 | case HB_ACODEC_LAME: |
| 2358 | *direction = 1; |
| 2359 | *granularity = 0.5; |
| 2360 | *low = 0.; |
| 2361 | *high = 10.; |
| 2362 | break; |
| 2363 | |
| 2364 | case HB_ACODEC_VORBIS: |
| 2365 | *direction = 0; |
| 2366 | *granularity = 0.5; |
| 2367 | *low = -2.; |
| 2368 | *high = 10.; |
| 2369 | break; |
| 2370 | |
| 2371 | case HB_ACODEC_CA_AAC: |
| 2372 | *direction = 0; |
| 2373 | *granularity = 9.; |
| 2374 | *low = 1.; |
| 2375 | *high = 127.; |
| 2376 | break; |
| 2377 | |
| 2378 | default: |
| 2379 | *direction = 0; |
| 2380 | *granularity = 1.; |
| 2381 | *low = *high = HB_INVALID_AUDIO_QUALITY; |
| 2382 | break; |
| 2383 | } |
| 2384 | } |
| 2385 | |
| 2386 | float hb_audio_quality_get_best(uint32_t codec, float quality) |
| 2387 | { |
no outgoing calls
no test coverage detected