diff --git a/J/shader.h b/J/shader.h index 3d2eed1..88a52b3 100644 --- a/J/shader.h +++ b/J/shader.h @@ -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); diff --git a/J/sound.h b/J/sound.h index b3c488d..16063ba 100644 --- a/J/sound.h +++ b/J/sound.h @@ -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(){