Add closest_power_of_2 func and implement mix_rate/latency on OS X

This commit is contained in:
Marcelo Fernandez
2017-08-18 12:10:21 -03:00
parent 49028e0c49
commit 647c4ae5bf
25 changed files with 136 additions and 87 deletions

View File

@@ -1076,8 +1076,8 @@ void Geometry::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_resu
for (int i = 0; i < results.size(); i++) {
float h = nearest_power_of_2(results[i].max_h);
float w = nearest_power_of_2(results[i].max_w);
float h = next_power_of_2(results[i].max_h);
float w = next_power_of_2(results[i].max_w);
float aspect = h > w ? h / w : w / h;
if (aspect < best_aspect) {
best = i;