MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
mgl_audio_voice_storage.h
[詳解]
1// SPDX-License-Identifier: Zlib
2/* ------------------------------------------------------------------------- */
9/* ------------------------------------------------------------------------- */
10
11#ifndef INCGUARD_MGL_AUDIO_VOICE_STORAGE_H_1610732545
12#define INCGUARD_MGL_AUDIO_VOICE_STORAGE_H_1610732545
13
14#include <mutex>
15
18
19namespace MGL::Audio
20{
23
26{
27public:
28 bool Add(const SharedVoice &voice) noexcept;
29 SharedVoice Get(VoiceKey key) noexcept;
30 bool Remove(VoiceKey key) noexcept;
31
32private:
33 VoiceMap _voices;
34 std::mutex _mutex;
35};
36}; // namespace MGL::Audio
37
38#endif // INCGUARD_MGL_AUDIO_VOICE_STORAGE_H_1610732545
39
40// vim: et ts=4 sw=4 sts=4
ボイスストレージクラス
Definition mgl_audio_voice_storage.h:26
bool Add(const SharedVoice &voice) noexcept
ボイスの追加
Definition mgl_audio_voice_storage.cc:23
SharedVoice Get(VoiceKey key) noexcept
ボイスの取得
Definition mgl_audio_voice_storage.cc:42
bool Remove(VoiceKey key) noexcept
ボイスの削除
Definition mgl_audio_voice_storage.cc:64
VoiceKey
ボイスキー
Definition mgl_audio_defs.h:22
MGL オーディオボイス
std::shared_ptr< Voice > SharedVoice
共有ボイスの型
Definition mgl_audio_voice.h:251
STL::unordered_map< VoiceKey, SharedVoice > VoiceMap
ボイスストレージ用のマップの型
Definition mgl_audio_voice_storage.h:22
MGL STLコンテナの代替
std::unordered_map< Key, T, Hash, Pred, Allocator< std::pair< const Key, T > > > unordered_map
std::unordered_mapの代替
Definition mgl_stl_containers.h:71