Sort out Chunk::{Get,Set}Volume

This commit is contained in:
Dmitry Marakasov 2015-09-07 01:56:53 +03:00
parent 4d4fcf5929
commit b7eb867aa5
2 changed files with 16 additions and 2 deletions

View File

@ -61,8 +61,12 @@ Mix_Chunk* Chunk::Get() const {
return chunk_;
}
int Chunk::Volume(int volume) {
int Chunk::SetVolume(int volume) {
return Mix_VolumeChunk(chunk_, volume);
}
int Chunk::GetVolume() const {
return Mix_VolumeChunk(chunk_, -1);
}
}

View File

@ -142,7 +142,17 @@ public:
/// \see https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC23
///
////////////////////////////////////////////////////////////
int Volume(int volume);
int SetVolume(int volume);
////////////////////////////////////////////////////////////
/// \brief Get volume of a chunk
///
/// \returns Current volume setting
///
/// \see https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC23
///
////////////////////////////////////////////////////////////
int GetVolume() const;
};
}