와 이제 진짜 진짜 버그 다 고친 듯?

This commit is contained in:
2025-02-02 23:55:47 +09:00
parent 1af829c711
commit 14db2a31e8
15 changed files with 219 additions and 110 deletions

View File

@@ -1,6 +1,4 @@
#pragma once
#ifndef _MUSICQUEUE_HPP_
#define _MUSICQUEUE_HPP_
#include <memory>
#include <functional>
#include <condition_variable>
@@ -17,17 +15,18 @@ public:
currentPlayingPosition = queue.begin();
repeat = true;
}
void enqueue(std::shared_ptr<MusicQueueElement> Element);
std::shared_ptr<MusicQueueElement> dequeue();
std::list<std::shared_ptr<MusicQueueElement>>::iterator findById(std::string id);
std::list<std::shared_ptr<MusicQueueElement>>::iterator findByIndex(int index);
std::shared_ptr<MusicQueueElement> nowplaying();
std::list<std::shared_ptr<MusicQueueElement>>::iterator next_music();
std::shared_ptr<MusicQueueElement> jump_to_index(int idx);
void clear();
std::shared_ptr<MusicQueueElement> erase(std::list<std::shared_ptr<MusicQueueElement>>::iterator it);
std::list<std::shared_ptr<MusicQueueElement>> getQueueCopy();
int size();
void enqueue(std::shared_ptr<MusicQueueElement> Element);
std::shared_ptr<MusicQueueElement> dequeue();
std::list<std::shared_ptr<MusicQueueElement>>::iterator findById(std::string id);
std::list<std::shared_ptr<MusicQueueElement>>::iterator findByIndex(int index);
std::shared_ptr<MusicQueueElement> nowplaying();
std::list<std::shared_ptr<MusicQueueElement>>::iterator next_music();
std::shared_ptr<MusicQueueElement> jump_to_index(int idx);
void clear();
std::shared_ptr<MusicQueueElement> erase(std::list<std::shared_ptr<MusicQueueElement>>::iterator it);
std::pair<std::shared_ptr<std::list<std::shared_ptr<MusicQueueElement>>>, std::list<std::shared_ptr<MusicQueueElement>>::iterator> getQueueCopy();
int size();
std::list<std::shared_ptr<MusicQueueElement>>::iterator end();
bool repeat;
@@ -36,6 +35,4 @@ private:
std::list<std::shared_ptr<MusicQueueElement>> queue;
std::mutex queueMutex;
};
}
#endif
}

View File

@@ -1,6 +1,4 @@
#pragma once
#ifndef _MUSICQUEUEELEMENT_HPP_
#define _MUSICQUEUEELEMENT_HPP_
#include <dpp/dpp.h>
namespace bumbleBee {
@@ -19,5 +17,4 @@ public:
const dpp::user issuingUser;
const dpp::embed embed;
};
}
#endif
}