You.i Engine
YiAssetDecoderWAV.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_ASSET_DECODER_WAV_H_
3 #define _YI_ASSET_DECODER_WAV_H_
4 
5 #include <asset/YiAssetDecoder.h>
6 
7 class CYIAssetSound;
8 
19 {
20 public:
22  virtual ~CYIAssetDecoderWAV();
23 
24  virtual bool SupportsParams(const CYIAssetLoadParams *pDecodeParams) override;
25 
26  virtual std::shared_ptr<CYIAsset> DecodeAsset(const CYIString &path, const CYIAssetLoadParams *pDecodeParams) override;
27 
28  virtual std::shared_ptr<CYIAsset> DecodeAsset(const uint8_t *pData, uint32_t nDataSize, const CYIAssetLoadParams *pDecodeParams) override;
29 
30  virtual bool DecodeAsset(const std::shared_ptr<CYIAsset> &pAsset) override;
31 
32  virtual bool IsFormatSupported(const uint8_t *pData, uint32_t nDataSize) override;
33 
34  virtual bool DecodeAsset(const std::shared_ptr<CYIAsset> &pAsset, const uint8_t *pData, uint32_t uDataSize) override;
35 
36 private:
37 
41  bool PopulateSound(const std::shared_ptr<CYIAssetSound> &pAsset, const CYIString &path, const CYIAssetLoadParams *pDecodeParams);
42  bool PopulateSound(const std::shared_ptr<CYIAssetSound> &pAsset, const uint8_t *pData, uint32_t nDataSize, const CYIAssetLoadParams *pDecodeParams);
43 
45 };
46 
49 #endif // _YI_ASSET_DECODER_WAV_H_
virtual std::shared_ptr< CYIAsset > DecodeAsset(const CYIString &path, const CYIAssetLoadParams *pDecodeParams) override
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
virtual bool SupportsParams(const CYIAssetLoadParams *pDecodeParams) override
virtual ~CYIAssetDecoderWAV()
#define YI_TYPE_BASES(...)
Definition: YiRtti.h:350
Base class for decoders which can accept specialized parameter objects.
Definition: YiAssetLoadParams.h:16
Asset representing sound PCM data.
Definition: YiAssetSound.h:17
Asset decoder for WAVE sound files; these typically have a ".wav" file extension. ...
Definition: YiAssetDecoderWAV.h:18
virtual bool IsFormatSupported(const uint8_t *pData, uint32_t nDataSize) override
Base class for all specialized decoders.
Definition: YiAssetDecoder.h:22