mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 20:31:29 +02:00
assume RAW audio if not processed as WAV
This commit is contained in:
parent
11e9b18a98
commit
70c1f8290e
1 changed files with 3 additions and 7 deletions
|
@ -44,13 +44,8 @@ void Sound::replyFinished(QNetworkReply* reply) {
|
||||||
|
|
||||||
QByteArray headerContentType = reply->rawHeader("Content-Type");
|
QByteArray headerContentType = reply->rawHeader("Content-Type");
|
||||||
|
|
||||||
// RAW audio file encountered
|
|
||||||
if (headerContentType == "application/octet-stream") {
|
|
||||||
downSample(rawAudioByteArray);
|
|
||||||
}
|
|
||||||
|
|
||||||
// WAV audio file encountered
|
// WAV audio file encountered
|
||||||
else if (headerContentType == "audio/x-wav"
|
if (headerContentType == "audio/x-wav"
|
||||||
|| headerContentType == "audio/wav"
|
|| headerContentType == "audio/wav"
|
||||||
|| headerContentType == "audio/wave") {
|
|| headerContentType == "audio/wave") {
|
||||||
|
|
||||||
|
@ -59,7 +54,8 @@ void Sound::replyFinished(QNetworkReply* reply) {
|
||||||
interpretAsWav(rawAudioByteArray, outputAudioByteArray);
|
interpretAsWav(rawAudioByteArray, outputAudioByteArray);
|
||||||
downSample(outputAudioByteArray);
|
downSample(outputAudioByteArray);
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Unknown audio file 'Content-Type'.";
|
// Process as RAW file
|
||||||
|
downSample(rawAudioByteArray);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Network reply without 'Content-Type'.";
|
qDebug() << "Network reply without 'Content-Type'.";
|
||||||
|
|
Loading…
Reference in a new issue