Archived
1
Fork 0

Fixed warning, set_pitch added

This commit is contained in:
Joshua Moerman 2013-02-12 11:29:34 +01:00
parent 029347619b
commit 53c005fa51
2 changed files with 6 additions and 6 deletions

View file

@ -271,7 +271,7 @@ private:
// ***************
// status checking
void check_compile_status(GLint shader, std::string source = "") {
void check_compile_status(GLuint shader, std::string source = "") {
#if defined(DEBUG)
GLint status = GL_FALSE;
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);

View file

@ -86,13 +86,13 @@ struct Source {
Source(Source const &) = delete;
Source & operator=(Source const &) = delete;
Source(Buffer const & buffer){
int r = rand() % 10;
float pitch = 0.5 + r*0.5;
Source(Buffer const & buffer){
alGenSources(1, &source);
alSourcei(source, AL_BUFFER, buffer.buffer);
alSourcef(source, AL_PITCH, pitch); //?
}
void set_pitch(float pitch){
alSourcef(source, AL_PITCH, pitch);
}
void play(){