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
|
// status checking
|
||||||
void check_compile_status(GLint shader, std::string source = "") {
|
void check_compile_status(GLuint shader, std::string source = "") {
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
GLint status = GL_FALSE;
|
GLint status = GL_FALSE;
|
||||||
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
|
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
|
||||||
|
|
|
@ -87,12 +87,12 @@ struct Source {
|
||||||
Source & operator=(Source const &) = delete;
|
Source & operator=(Source const &) = delete;
|
||||||
|
|
||||||
Source(Buffer const & buffer){
|
Source(Buffer const & buffer){
|
||||||
int r = rand() % 10;
|
|
||||||
float pitch = 0.5 + r*0.5;
|
|
||||||
|
|
||||||
alGenSources(1, &source);
|
alGenSources(1, &source);
|
||||||
alSourcei(source, AL_BUFFER, buffer.buffer);
|
alSourcei(source, AL_BUFFER, buffer.buffer);
|
||||||
alSourcef(source, AL_PITCH, pitch); //?
|
}
|
||||||
|
|
||||||
|
void set_pitch(float pitch){
|
||||||
|
alSourcef(source, AL_PITCH, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void play(){
|
void play(){
|
||||||
|
|
Reference in a new issue