From 70c1f8290e62f56596a39555aca5588176a2d3e7 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Tue, 25 Feb 2014 13:21:02 -0800 Subject: [PATCH] assume RAW audio if not processed as WAV --- libraries/audio/src/Sound.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libraries/audio/src/Sound.cpp b/libraries/audio/src/Sound.cpp index a403439ec6..07eec031b5 100644 --- a/libraries/audio/src/Sound.cpp +++ b/libraries/audio/src/Sound.cpp @@ -44,13 +44,8 @@ void Sound::replyFinished(QNetworkReply* reply) { QByteArray headerContentType = reply->rawHeader("Content-Type"); - // RAW audio file encountered - if (headerContentType == "application/octet-stream") { - downSample(rawAudioByteArray); - } - // WAV audio file encountered - else if (headerContentType == "audio/x-wav" + if (headerContentType == "audio/x-wav" || headerContentType == "audio/wav" || headerContentType == "audio/wave") { @@ -59,7 +54,8 @@ void Sound::replyFinished(QNetworkReply* reply) { interpretAsWav(rawAudioByteArray, outputAudioByteArray); downSample(outputAudioByteArray); } else { - qDebug() << "Unknown audio file 'Content-Type'."; + // Process as RAW file + downSample(rawAudioByteArray); } } else { qDebug() << "Network reply without 'Content-Type'.";