mozilla / cubeb

Cross platform audio library
ISC License
441 stars 125 forks source link

test_mixer fails to compile when building with BUILD_SHARED_LIBS=ON #325

Open kinetiknz opened 7 years ago

kinetiknz commented 7 years ago

test_mixer fails to compile when building with BUILD_SHARED_LIBS=ON because the various cubebmixer* functions defined in cubeb_mixer.h have hidden symbol visibility and subsequently aren't publicly available in the DSO.

Except for the test compilation failure, this is the desired outcome, because cubebmixer* is internal-only and should not show up in the public API. However, the tests need access to various internals to test them directly.

In the past (e.g. for test_resampler) we've hacked around this by compiling the necessary code directly into the test. We can use the same fix here, or look for a better solution that works for any future additions like this and perhaps even allows gtests to call internal functions defined in the backends themselves.

kinetiknz commented 7 years ago

3c77b3b takes the easy approach for now. This issue can serve as a reminder to come up with a nicer solution.