6 #include <vorbis/vorbisfile.h> 7 #include <unordered_map> 21 #pragma region Deleters 26 ::mmioClose(hMmio, 0);
53 using OggFilePtr = std::unique_ptr<OggVorbis_File, oggFileDeleter>;
58 OggVorbis_File *
ovFp()
const {
return m_ovFp.get(); }
63 OggVorbis_File m_ovFile;
67 static size_t read(
void *ptr,
size_t size,
size_t nmemb,
void *datasource);
68 static int seek(
void *datasource, int64_t
offset,
int whence);
69 static long tell(
void *datasource);
70 static int close(
void *datasource);
88 bool isPlayingAnySoundEffect()
const;
89 void stopAllSoundEffect();
98 using SourceVoicePtr = std::unique_ptr<IXAudio2SourceVoice, voiceDeleter>;
99 using MasterVoicePtr = std::unique_ptr<IXAudio2MasteringVoice, voiceDeleter>;
102 IXAudio2Ptr m_pIXAudio;
103 MasterVoicePtr m_pMasterVoice;
107 using PyaingSeElem = std::tuple<SeResourcePtr, SourceVoicePtr>;
108 std::array<PyaingSeElem, SoundEffectPlayMax> m_playingSeList;
110 PyaingSeElem *findFreeSeEntry();
111 void processFrameSe();
115 std::unique_ptr<char[]> m_pBgmBuffer;
118 SourceVoicePtr m_pBgmVoice;
122 void processFrameBgm();
std::unique_ptr< OggVorbis_File, oggFileDeleter > OggFilePtr
std::shared_ptr< BgmResource > BgmResourcePtr
void operator()(HMMIO hMmio)
const uint32_t SoundFileSizeMax
Auto CoInitializeEx() and CoUninitialize() class.
std::shared_ptr< SeResource > SeResourcePtr
const uint32_t SoundEffectPlayMax
std::vector< uint8_t > Bytes
File byte sequence. Vector of uint8_t.
const uint32_t BgmBufferSize
const uint32_t BgmBufferCount
OggVorbis_File * ovFp() const
const uint32_t BgmOvReadSize
void operator()(IXAudio2Voice *pv)
std::unique_ptr< T, ComDeleter > ComPtr
unique_ptr of IUnknown with ComDeleter.
void operator()(OggVorbis_File *ovf)