Capycore Engine
0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
sound_factory.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
engine/audio/sound/instance/sound_instance.h
>
4
#include <
engine/audio/sound/resource/sound_resource.h
>
5
#include <
engine/audio/sound/sound_type.h
>
6
7
#include <memory>
8
#include <string>
9
16
class
SoundFactory
{
17
public
:
18
SoundFactory
() =
delete
;
19
~SoundFactory
() =
delete
;
20
21
static
std::shared_ptr<SoundResource>
create_sound_resource
(
22
const
std::string& file_path,
const
std::string& name,
23
SoundType
type =
SoundType::GENERIC
);
24
static
std::unique_ptr<SoundInstance>
create_sound_instance
(
25
std::shared_ptr<SoundResource>& resource,
float
volume = 1.0f);
26
};
SoundFactory
Factory class for creating SoundResource instances based on SoundType. The reason for shared pointers...
Definition
sound_factory.h:16
SoundFactory::create_sound_instance
static std::unique_ptr< SoundInstance > create_sound_instance(std::shared_ptr< SoundResource > &resource, float volume=1.0f)
SoundFactory::~SoundFactory
~SoundFactory()=delete
SoundFactory::create_sound_resource
static std::shared_ptr< SoundResource > create_sound_resource(const std::string &file_path, const std::string &name, SoundType type=SoundType::GENERIC)
SoundFactory::SoundFactory
SoundFactory()=delete
sound_instance.h
sound_resource.h
sound_type.h
SoundType
SoundType
Definition
sound_type.h:5
SoundType::GENERIC
@ GENERIC
include
engine
audio
sound
sound_factory.h
Generated by
1.9.8