mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 08:12:17 +00:00
54aea7d5de
Instead of just failing during channel map selection, try to select a close layout that makes most sense and upmix/downmix to that instead of failing AO initialization. The heuristic is rather simple, and uses the following steps: 1) If mono is required always prefer stereo to a multichannel upmix. 2) Search for an upmix that is an exact superset of the required channel map. 3) Search for a downmix that is the exact subset of the required channel map. 4) Search for either an upmix or downmix that is the closest (minimum difference of channels) to the required channel map.
12 lines
147 B
C
12 lines
147 B
C
#ifndef MP_TESTS_H
|
|
#define MP_TESTS_H
|
|
|
|
#include <stdarg.h>
|
|
#include <stddef.h>
|
|
#include <setjmp.h>
|
|
#include <cmocka.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#endif
|