Reformat audio module
This commit is contained in:
parent
069318dc0b
commit
9656552878
3 changed files with 12 additions and 12 deletions
|
@ -1,12 +1,12 @@
|
|||
set(SRC
|
||||
include/audio.hpp
|
||||
src/audio.cpp)
|
||||
include/audio.hpp
|
||||
src/audio.cpp)
|
||||
|
||||
add_library(Audio STATIC ${SRC})
|
||||
target_include_directories(Audio PUBLIC include)
|
||||
target_link_libraries(Audio PRIVATE
|
||||
Log
|
||||
opus
|
||||
opusfile
|
||||
Core)
|
||||
Log
|
||||
opus
|
||||
opusfile
|
||||
Core)
|
||||
set_engine_properties(Audio)
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
#include "path.hpp"
|
||||
|
||||
/*
|
||||
* Audio API
|
||||
*/
|
||||
* Audio API
|
||||
*/
|
||||
namespace audio {
|
||||
void initialize();
|
||||
|
||||
void play_file(const prism::path& path, float gain = 1.0f);
|
||||
}
|
||||
} // namespace audio
|
||||
|
|
|
@ -18,12 +18,12 @@ struct AudioFile {
|
|||
std::vector<AudioFile> audio_files;
|
||||
|
||||
void audio::initialize() {
|
||||
// todo: stub
|
||||
// todo: stub
|
||||
}
|
||||
|
||||
void audio::play_file(const prism::path& path, const float gain) {
|
||||
auto audio_file = prism::open_file(path);
|
||||
if(audio_file == std::nullopt)
|
||||
if (audio_file == std::nullopt)
|
||||
return;
|
||||
|
||||
audio_file->read_all();
|
||||
|
|
Reference in a new issue