mirror of
https://github.com/HappyTanuki/BumbleCee.git
synced 2025-10-26 09:55:14 +00:00
일단 저장
This commit is contained in:
18
include/Audio/MusicPlayerThreadManager.hpp
Normal file
18
include/Audio/MusicPlayerThreadManager.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include <dpp/dpp.h>
|
||||
#include <Queue/MusicQueueElement.hpp>
|
||||
#include "Utils/ThreadPool.hpp"
|
||||
|
||||
namespace bumbleBee {
|
||||
class ThreadManager : public ThreadPool<dpp::snowflake, int, int> {
|
||||
public:
|
||||
bool addMusic(std::shared_ptr<bumbleBee::MusicQueueElement> music, dpp::discord_voice_client* client);
|
||||
void stopSending(dpp::snowflake gid);
|
||||
private:
|
||||
// GID, 쓰레드
|
||||
std::unordered_map<dpp::snowflake, std::thread> threadPool;
|
||||
// GID, 쓰레드 종료
|
||||
std::unordered_map<dpp::snowflake, bool> terminating;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user