new cspot/bell

This commit is contained in:
philippe44
2023-05-06 23:50:26 +02:00
parent e0e7e718ba
commit 8bad480112
163 changed files with 6611 additions and 6739 deletions

View File

@@ -1,5 +1,16 @@
#include "AudioContainers.h"
#include <string.h> // for memcmp
#include <cstddef> // for byte
#include "AACContainer.h" // for AACContainer
#include "CodecType.h" // for bell
#include "MP3Container.h" // for MP3Container
namespace bell {
class AudioContainer;
} // namespace bell
using namespace bell;
std::unique_ptr<bell::AudioContainer> AudioContainers::guessAudioContainer(
@@ -7,8 +18,7 @@ std::unique_ptr<bell::AudioContainer> AudioContainers::guessAudioContainer(
std::byte tmp[14];
istr.read((char*)tmp, sizeof(tmp));
if (memcmp(tmp, "\xFF\xF1", 2) == 0 ||
memcmp(tmp, "\xFF\xF9", 2) == 0) {
if (memcmp(tmp, "\xFF\xF1", 2) == 0 || memcmp(tmp, "\xFF\xF9", 2) == 0) {
// AAC found
std::cout << "AAC" << std::endl;
return std::make_unique<bell::AACContainer>(istr);