Fixed warning, set_pitch added
This commit is contained in:
parent
029347619b
commit
53c005fa51
2 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
|
|
10
J/sound.h
10
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(){
|
||||
|
|
Reference in a new issue