Files
ReMixer/include/ReMixer/StreamManager.h

48 lines
1.3 KiB
C++

/// ReMixer
/// A Public Domain C++ Audio Playback Library
/// By william @ RedactedSoftware. Thanks to Dawsh & Maxine.
/// (c) 2024 Redacted Software
/// This work is explicitly dedicated to the public domain, for the hopeful betterment of the software industry.
/// @file StreamManager.h
/// @desc This class manages internal creation and storage of active Streams.
/// @edit 2024-08-06
#pragma once
#include <map>
#include "stream.h"
class TakenStreamIDException : public std::exception
{
};
//class StreamManager {
//public:
//static std::map<uint16_t, Stream *> streamList;
//StreamManager();
//StreamManager(const StreamManager&);
// Get stream using handle
//static Stream *GetStream(uint16_t handle)
//{
// return streamList.at(handle);
//}
// Return Stream handle
// TODO:
/*static Stream* CreateStream()
{
// Can we create the stream here and assign the handle on our side?
// or do you need to change it from outside
}
static void AddStream(Stream* stream)
{
streamList.emplace(stream->handle, stream);
}
// Iterator maybe?
// Fuck if I know what type is returned.
auto begin() { return streamList.begin(); };
auto end() { return streamList.end(); };
};*/