# Plutonium framework API: Plutonium/include/pu/audio/audio_Music.hpp Source File

audio_Music.hpp
Go to the documentation of this file.
/*
Plutonium library
@file audio_Music.hpp
@brief Music (BGM) support
@author XorTroll
@copyright Plutonium project - an easy-to-use UI framework for Nintendo Switch homebrew
*/
#pragma once
#include <SDL2/SDL_mixer.h>
#include <pu/pu_Include.hpp>
namespace pu::audio {
using Music = Mix_Music*;
Music OpenMusic(const std::string &path);
void PlayMusic(Music mus, const int loops);
void PlayMusicWithFadeIn(Music mus, const i32 llops, const i32 ms);
bool IsPlayingMusic();
void PauseMusic();
void ResumeMusic();
void SetMusicVolume(const i32 vol);
i32 GetMusicVolume();
void FadeOutMusic(const i32 ms);
void RewindMusic();
void StopMusic();
void SetMusicPosition(const double sec);
void DestroyMusic(Music &mus);
}
pu::audio
Definition: audio_Music.hpp:18
pu::audio::GetMusicVolume
i32 GetMusicVolume()
pu::audio::FadeOutMusic
void FadeOutMusic(const i32 ms)
pu::audio::IsPlayingMusic
bool IsPlayingMusic()
pu::audio::SetMusicPosition
void SetMusicPosition(const double sec)
pu::audio::PauseMusic
void PauseMusic()
pu::audio::DestroyMusic
void DestroyMusic(Music &mus)
pu::audio::ResumeMusic
void ResumeMusic()
pu::audio::RewindMusic
void RewindMusic()
pu::audio::OpenMusic
Music OpenMusic(const std::string &path)
pu::audio::PlayMusicWithFadeIn
void PlayMusicWithFadeIn(Music mus, const i32 llops, const i32 ms)
pu::audio::SetMusicVolume
void SetMusicVolume(const i32 vol)
pu::audio::Music
Mix_Music * Music
Definition: audio_Music.hpp:20
pu::audio::StopMusic
void StopMusic()
pu::audio::PlayMusic
void PlayMusic(Music mus, const int loops)
pu::i32
s32 i32
Definition: pu_Include.hpp:28
pu_Include.hpp