- auto intermediate_128 = reinterpret_cast<__m128i*>(intermediate.data());\r
- auto result_128 = reinterpret_cast<__m128i*>(result.data());\r
- for(size_t n = 0; n < format_desc_.audio_samples_per_frame/32; ++n)\r
- {\r
- auto xmm0 = _mm_load_ps(reinterpret_cast<float*>(intermediate_128++));\r
- auto xmm1 = _mm_load_ps(reinterpret_cast<float*>(intermediate_128++));\r
- auto xmm2 = _mm_load_ps(reinterpret_cast<float*>(intermediate_128++));\r
- auto xmm3 = _mm_load_ps(reinterpret_cast<float*>(intermediate_128++));\r
- auto xmm4 = _mm_load_ps(reinterpret_cast<float*>(intermediate_128++));\r
- auto xmm5 = _mm_load_ps(reinterpret_cast<float*>(intermediate_128++));\r
- auto xmm6 = _mm_load_ps(reinterpret_cast<float*>(intermediate_128++));\r
- auto xmm7 = _mm_load_ps(reinterpret_cast<float*>(intermediate_128++));\r
- \r
- _mm_stream_si128(result_128++, _mm_cvtps_epi32(xmm0));\r
- _mm_stream_si128(result_128++, _mm_cvtps_epi32(xmm1));\r
- _mm_stream_si128(result_128++, _mm_cvtps_epi32(xmm2));\r
- _mm_stream_si128(result_128++, _mm_cvtps_epi32(xmm3));\r
- _mm_stream_si128(result_128++, _mm_cvtps_epi32(xmm4));\r
- _mm_stream_si128(result_128++, _mm_cvtps_epi32(xmm5));\r
- _mm_stream_si128(result_128++, _mm_cvtps_epi32(xmm6));\r
- _mm_stream_si128(result_128++, _mm_cvtps_epi32(xmm7));\r
+ auto nb_invalid_streams = boost::count_if(audio_streams_ | boost::adaptors::map_values, [&](const audio_stream& x)\r
+ {\r
+ return x.audio_data.size() < audio_cadence_.front();\r
+ });\r
+\r
+ if(nb_invalid_streams > 0) \r
+ CASPAR_LOG(trace) << "[audio_mixer] Incorrect frame audio cadence detected. Appending empty samples."; \r