Bugfix floating point sample load

pull/35/head
Adrian Biedrzycki 8 years ago
parent 8a141449ab
commit a303147a07

@ -24,6 +24,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "Common.h" #include "Common.h"
#include <cstring>
using namespace nqr; using namespace nqr;
@ -105,9 +106,10 @@ void nqr::ConvertToFloat32(float * dst, const uint8_t * src, const size_t N, PCM
else if (f == PCM_FLT) else if (f == PCM_FLT)
{ {
const float * dataPtr = reinterpret_cast<const float *>(src); memcpy(dst, src, N * sizeof(float));
/* const float * dataPtr = reinterpret_cast<const float *>(src);
for (size_t i = 0; i < N; ++i) for (size_t i = 0; i < N; ++i)
dst[i] = (float) Read32(dataPtr[i]); dst[i] = (float) Read32(dataPtr[i]); */
} }
else if (f == PCM_DBL) else if (f == PCM_DBL)
{ {

Loading…
Cancel
Save