MayaFlux
0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
Depot.hpp
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* @file API/Depot.hpp
5
* @brief Audio file loading and container management API
6
*
7
* This header provides the public API for working with IOManager,
8
* container creation, and file type checking within the MayaFlux engine.
9
* It includes:
10
* - `create_container<ContainerType>(args...)`: Template function to create signal source containers.
11
* - `is_audio(filepath)`: Check if a file is an audio file based on its extension.
12
* - `is_image(filepath)`: Check if a file is an image file based on its extension.
13
* - `get_io_manager()`: Access the global IOManager instance for file loading and buffer management.
14
*/
15
16
namespace
MayaFlux
{
17
18
namespace
IO {
19
class
IOManager
;
20
}
21
22
namespace
Kakshya {
23
class
SoundFileContainer
;
24
class
SignalSourceContainer
;
25
}
26
27
namespace
Buffers {
28
class
SoundContainerBuffer
;
29
class
TextureBuffer
;
30
}
31
32
/**
33
* @brief creates a new container of the specified type
34
* @tparam ContainerType Type of container to create (must be derived from SignalSourceContainer)
35
* @tparam Args Constructor argument types
36
* @param args Constructor arguments for the container
37
* @return Shared pointer to the created container
38
*/
39
template
<
typename
ContainerType,
typename
... Args>
40
requires
std::derived_from<ContainerType, Kakshya::SignalSourceContainer>
41
auto
create_container
(Args&&... args) -> std::shared_ptr<ContainerType>
42
{
43
return
std::make_shared<ContainerType>(std::forward<Args>(args)...);
44
}
45
46
/**
47
* @brief Checks if the given file is an audio file based on its extension
48
* @param filepath Path to the file to check
49
* @return true if the file is recognized as an audio file, false otherwise
50
*/
51
MAYAFLUX_API
bool
is_audio
(
const
std::filesystem::path& filepath);
52
53
/**
54
* @brief Checks if the given file is an image file based on its extension
55
* @param filepath Path to the file to check
56
* @return true if the file is recognized as an image file, false otherwise
57
*/
58
MAYAFLUX_API
bool
is_image
(
const
std::filesystem::path& filepath);
59
60
/**
61
* @brief Retrieves the global IOManager instance for file loading and buffer management
62
* @return Shared pointer to the IOManager instance
63
*
64
* Provides access to the central IOManager responsible for all file loading operations,
65
* container management, and buffer integration. This is the primary interface for
66
* performing file I/O tasks within the MayaFlux engine.
67
*/
68
MAYAFLUX_API std::shared_ptr<IO::IOManager>
get_io_manager
();
69
70
}
MayaFlux::Buffers::SoundContainerBuffer
AudioBuffer implementation backed by a StreamContainer.
Definition
SoundContainerBuffer.hpp:146
MayaFlux::Buffers::TextureBuffer
A hybrid buffer managing both a textured quad geometry and its pixel data.
Definition
TextureBuffer.hpp:33
MayaFlux::IO::IOManager
Optional orchestration layer for IO reader lifetime and IOService dispatch.
Definition
IOManager.hpp:75
MayaFlux::Kakshya::SignalSourceContainer
Data-driven interface for managing arbitrary processable signal sources.
Definition
SignalSourceContainer.hpp:100
MayaFlux::Kakshya::SoundFileContainer
File-backed audio container with complete streaming functionality.
Definition
SoundFileContainer.hpp:27
MayaFlux::is_image
bool is_image(const fs::path &filepath)
Definition
Depot.cpp:14
MayaFlux::is_audio
bool is_audio(const fs::path &filepath)
Definition
Depot.cpp:32
MayaFlux::create_container
auto create_container(Args &&... args) -> std::shared_ptr< ContainerType >
creates a new container of the specified type
Definition
Depot.hpp:41
MayaFlux::get_io_manager
std::shared_ptr< IO::IOManager > get_io_manager()
Retrieves the global IOManager instance for file loading and buffer management.
Definition
Depot.cpp:50
MayaFlux
Main namespace for the Maya Flux audio engine.
Definition
LiveAid.hpp:6
src
MayaFlux
API
Depot.hpp
Generated by
1.9.8