Changed up how resources import/export files. Added Model codecs.
This commit is contained in:
@@ -39,7 +39,7 @@ namespace ehs
|
||||
|
||||
Audio();
|
||||
|
||||
Audio(Str_8 id);
|
||||
Audio(const Str_8& filePath);
|
||||
|
||||
Audio(Str_8 id, UInt_64 sampleRate, DataType dataType, UInt_8 channels, UInt_64 frames, const Byte* data);
|
||||
|
||||
@@ -123,17 +123,7 @@ namespace ehs
|
||||
|
||||
Audio GetAsChannels(UInt_8 newChannels) const;
|
||||
|
||||
bool ToFile(const Str_8& filePath) const;
|
||||
|
||||
static Audio FromFile(const Str_8& filePath);
|
||||
|
||||
static Audio* FromFile_Heap(const Str_8& filePath);
|
||||
|
||||
static Audio FromFile(const Str_8& filePath, DataType required);
|
||||
|
||||
static Audio* FromFile_Heap(const Str_8& filePath, DataType required);
|
||||
|
||||
static Audio FromData(Str_8 id, const Str_8& ext, Serializer<UInt_64>& data);
|
||||
bool Export(const Str_8& filePath) const;
|
||||
|
||||
private:
|
||||
void ToMono(UInt_64 newFrameCount, Byte* newData, UInt_64 frameOffset) const;
|
||||
@@ -201,4 +191,10 @@ namespace ehs
|
||||
|
||||
void SInt_32_to_SInt_64(Byte* newData, Byte* newPeak) const;
|
||||
};
|
||||
|
||||
bool EncodeEHA(const ehs::AudioCodec* codec, ehs::Serializer<ehs::UInt_64>& out, const ehs::Audio* in);
|
||||
|
||||
bool DecodeEHA(const ehs::AudioCodec* codec, ehs::Serializer<ehs::UInt_64>& in, ehs::Audio* out);
|
||||
|
||||
bool DecodeWAV(const ehs::AudioCodec* codec, ehs::Serializer<ehs::UInt_64>& in, ehs::Audio* out);
|
||||
}
|
Reference in New Issue
Block a user