# Plutonium framework API: pu::audio Namespace Reference

pu::audio Namespace Reference

## Typedefs

using | Music = Mix_Music *
using | Sfx = Mix_Chunk *

## Functions

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)
Sfx | LoadSfx (const std::string &path)
void | PlaySfx (Sfx sfx)
void | DestroySfx (Sfx &sfx)

## Typedef Documentation

## Music

using pu::audio::Music = typedef Mix_Music*

## Sfx

using pu::audio::Sfx = typedef Mix_Chunk*

## Function Documentation

## DestroyMusic()

void pu::audio::DestroyMusic | ( | Music & | mus | ) |

## DestroySfx()

void pu::audio::DestroySfx | ( | Sfx & | sfx | ) |

## FadeOutMusic()

void pu::audio::FadeOutMusic | ( | const i32 | ms | ) |

## GetMusicVolume()

i32 pu::audio::GetMusicVolume | ( |  | ) |

## IsPlayingMusic()

bool pu::audio::IsPlayingMusic | ( |  | ) |

## LoadSfx()

Sfx pu::audio::LoadSfx | ( | const std::string & | path | ) |

## OpenMusic()

Music pu::audio::OpenMusic | ( | const std::string & | path | ) |

## PauseMusic()

void pu::audio::PauseMusic | ( |  | ) |

## PlayMusic()

void pu::audio::PlayMusic | ( | Music | mus,
|  | const int | loops
| ) |  |

## PlayMusicWithFadeIn()

void pu::audio::PlayMusicWithFadeIn | ( | Music | mus,
|  | const i32 | llops,
|  | const i32 | ms
| ) |  |

## PlaySfx()

void pu::audio::PlaySfx | ( | Sfx | sfx | ) |

## ResumeMusic()

void pu::audio::ResumeMusic | ( |  | ) |

## RewindMusic()

void pu::audio::RewindMusic | ( |  | ) |

## SetMusicPosition()

void pu::audio::SetMusicPosition | ( | const double | sec | ) |

## SetMusicVolume()

void pu::audio::SetMusicVolume | ( | const i32 | vol | ) |

## StopMusic()

void pu::audio::StopMusic | ( |  | ) |