From f4c338c63f3456a8eccd56c35e233843687d55be Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 29 Mar 2019 00:43:25 +0800 Subject: *thread --- source/libs/asura-lib-openal/sound.h | 8 ++++-- source/libs/asura-lib-openal/sound_decode_task.cpp | 0 source/libs/asura-lib-openal/sound_decode_task.h | 25 +++++++++++++++++++ source/libs/asura-lib-openal/sound_decoder.cpp | 29 ++++++++++++++++++++++ source/libs/asura-lib-openal/sound_decoder.h | 7 +++--- 5 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 source/libs/asura-lib-openal/sound_decode_task.cpp create mode 100644 source/libs/asura-lib-openal/sound_decode_task.h create mode 100644 source/libs/asura-lib-openal/sound_decoder.cpp (limited to 'source/libs/asura-lib-openal') diff --git a/source/libs/asura-lib-openal/sound.h b/source/libs/asura-lib-openal/sound.h index 095bdb7..6c2d7c2 100644 --- a/source/libs/asura-lib-openal/sound.h +++ b/source/libs/asura-lib-openal/sound.h @@ -1,14 +1,18 @@ #ifndef __ASURA_ENGINE_SOUND_H__ #define __ASURA_ENGINE_SOUND_H__ -#include "Scripting/Portable.h" +#include namespace AsuraEngine { namespace Audio { - class Sound ASURA_FINAL: virtual public Scripting::Portable + /// + /// 音频文件 + /// + class Sound ASURA_FINAL + : public AEScripting::Portable { public: diff --git a/source/libs/asura-lib-openal/sound_decode_task.cpp b/source/libs/asura-lib-openal/sound_decode_task.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-openal/sound_decode_task.h b/source/libs/asura-lib-openal/sound_decode_task.h new file mode 100644 index 0000000..d39013f --- /dev/null +++ b/source/libs/asura-lib-openal/sound_decode_task.h @@ -0,0 +1,25 @@ +#ifndef __ASURA_OPENAL_SOUND_DECODER_TASK_H__ +#define __ASURA_OPENAL_SOUND_DECODER_TASK_H__ + +#include + +namespace AsuraEngine +{ + namespace OpenAL + { + + /// + /// 解析音频文件任务。 + /// + class SoundDecodeTask : public AEThreading::ThreadTask + { + public: + + private: + + }; + + } +} + +#endif \ No newline at end of file diff --git a/source/libs/asura-lib-openal/sound_decoder.cpp b/source/libs/asura-lib-openal/sound_decoder.cpp new file mode 100644 index 0000000..ad9f761 --- /dev/null +++ b/source/libs/asura-lib-openal/sound_decoder.cpp @@ -0,0 +1,29 @@ +#ifndef __ASURA_ENGINE_SOUND_DECODER_H__ +#define __ASURA_ENGINE_SOUND_DECODER_H__ + +#include "Sound.h" +#include "FileSystem/DataBuffer.h" + +namespace AsuraEngine +{ + namespace Audio + { + + /// + /// 解析音频文件 + /// + class SoundDecoder + { + public: + + SoundDecoder(); + virtual ~SoundDecoder(); + + virtual Sound* Decode(const Filesystem::DataBuffer* db); + + }; + + } +} + +#endif \ No newline at end of file diff --git a/source/libs/asura-lib-openal/sound_decoder.h b/source/libs/asura-lib-openal/sound_decoder.h index ad9f761..2a3f087 100644 --- a/source/libs/asura-lib-openal/sound_decoder.h +++ b/source/libs/asura-lib-openal/sound_decoder.h @@ -1,8 +1,9 @@ #ifndef __ASURA_ENGINE_SOUND_DECODER_H__ #define __ASURA_ENGINE_SOUND_DECODER_H__ -#include "Sound.h" -#include "FileSystem/DataBuffer.h" +#include + +#include "sound.h" namespace AsuraEngine { @@ -19,7 +20,7 @@ namespace AsuraEngine SoundDecoder(); virtual ~SoundDecoder(); - virtual Sound* Decode(const Filesystem::DataBuffer* db); + virtual Sound* Decode(const AEIO::DataBuffer* db); }; -- cgit v1.1-26-g67d0