Reformat audio module
This commit is contained in:
parent
069318dc0b
commit
9656552878
3 changed files with 12 additions and 12 deletions
|
@ -3,10 +3,10 @@
|
||||||
#include "path.hpp"
|
#include "path.hpp"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Audio API
|
* Audio API
|
||||||
*/
|
*/
|
||||||
namespace audio {
|
namespace audio {
|
||||||
void initialize();
|
void initialize();
|
||||||
|
|
||||||
void play_file(const prism::path& path, float gain = 1.0f);
|
void play_file(const prism::path& path, float gain = 1.0f);
|
||||||
}
|
} // namespace audio
|
||||||
|
|
|
@ -23,7 +23,7 @@ void audio::initialize() {
|
||||||
|
|
||||||
void audio::play_file(const prism::path& path, const float gain) {
|
void audio::play_file(const prism::path& path, const float gain) {
|
||||||
auto audio_file = prism::open_file(path);
|
auto audio_file = prism::open_file(path);
|
||||||
if(audio_file == std::nullopt)
|
if (audio_file == std::nullopt)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
audio_file->read_all();
|
audio_file->read_all();
|
||||||
|
|
Reference in a new issue