'ifnot' template property + hpp
This commit is contained in:
+8
-6
@@ -1,12 +1,14 @@
|
||||
#include "ogg.h"
|
||||
#include "ogg.hpp"
|
||||
|
||||
#include "../debug/Logger.hpp"
|
||||
#include "../audio/audio.hpp"
|
||||
#include "../typedefs.h"
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <vorbis/codec.h>
|
||||
#include <vorbis/vorbisfile.h>
|
||||
|
||||
#include "../audio/audio.h"
|
||||
#include "../typedefs.h"
|
||||
static debug::Logger logger("ogg");
|
||||
|
||||
using namespace audio;
|
||||
|
||||
@@ -56,7 +58,7 @@ audio::PCM* ogg::load_pcm(const std::filesystem::path& file, bool headerOnly) {
|
||||
if (ret == 0) {
|
||||
eof = true;
|
||||
} else if (ret < 0) {
|
||||
std::cerr << "ogg::load_pcm: " << vorbis_error_message(ret) << std::endl;
|
||||
logger.error() << "ogg::load_pcm: " << vorbis_error_message(ret);
|
||||
} else {
|
||||
data.insert(data.end(), std::begin(buffer), std::begin(buffer)+ret);
|
||||
}
|
||||
@@ -98,7 +100,7 @@ public:
|
||||
int bitstream = 0;
|
||||
long bytes = ov_read(&vf, buffer, bufferSize, 0, 2, true, &bitstream);
|
||||
if (bytes < 0) {
|
||||
std::cerr << "ogg::load_pcm: " << vorbis_error_message(bytes) << " " << bytes << std::endl;
|
||||
logger.error() << "ogg::load_pcm: " << vorbis_error_message(bytes) << " " << bytes;
|
||||
return PCMStream::ERROR;
|
||||
}
|
||||
return bytes;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef CODERS_OGG_H_
|
||||
#define CODERS_OGG_H_
|
||||
#ifndef CODERS_OGG_HPP_
|
||||
#define CODERS_OGG_HPP_
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
@@ -13,4 +13,4 @@ namespace ogg {
|
||||
extern audio::PCMStream* create_stream(const std::filesystem::path& file);
|
||||
}
|
||||
|
||||
#endif // CODERS_OGG_H_
|
||||
#endif // CODERS_OGG_HPP_
|
||||
+3
-3
@@ -1,4 +1,6 @@
|
||||
#include "wav.h"
|
||||
#include "wav.hpp"
|
||||
|
||||
#include "../audio/audio.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@@ -7,8 +9,6 @@
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "../audio/audio.h"
|
||||
|
||||
bool is_big_endian() {
|
||||
uint32_t ui32_v = 0x01020304;
|
||||
char bytes[sizeof(uint32_t)];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef CODERS_WAV_H_
|
||||
#define CODERS_WAV_H_
|
||||
#ifndef CODERS_WAV_HPP_
|
||||
#define CODERS_WAV_HPP_
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
@@ -13,4 +13,4 @@ namespace wav {
|
||||
extern audio::PCMStream* create_stream(const std::filesystem::path& file);
|
||||
}
|
||||
|
||||
#endif // CODERS_WAV_H_
|
||||
#endif // CODERS_WAV_HPP_
|
||||
+3
-2
@@ -1,9 +1,10 @@
|
||||
#include "xml.h"
|
||||
#include "xml.hpp"
|
||||
|
||||
#include "../util/stringutil.h"
|
||||
|
||||
#include <charconv>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include "../util/stringutil.h"
|
||||
|
||||
using namespace xml;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef CODERS_XML_H_
|
||||
#define CODERS_XML_H_
|
||||
#ifndef CODERS_XML_HPP_
|
||||
#define CODERS_XML_HPP_
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
@@ -141,4 +141,4 @@ namespace xml {
|
||||
extern xmldocument parse(std::string filename, std::string source);
|
||||
}
|
||||
|
||||
#endif // CODERS_XML_H_
|
||||
#endif // CODERS_XML_HPP_
|
||||
Reference in New Issue
Block a user