mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 03:13:32 +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");
|
||||
|
||||
// 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'.";
|
||||
|
|
Loading…
Reference in a new issue