Changeset 6726
- Timestamp:
- Apr 14, 2010, 2:19:32 PM (15 years ago)
- Location:
- code/branches/sound5/src/orxonox/sound
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sound5/src/orxonox/sound/BaseSound.cc
r6506 r6726 142 142 if (ALint error = alGetError()) 143 143 COUT(2) << "Sound: Warning: Setting source parameters to 0 failed: " << getALErrorString(error) << std::endl; 144 assert(this->soundBuffer_ != NULL); 145 alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer()); 144 if(this->soundBuffer_ != NULL) { 145 alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer()); 146 } 146 147 if (ALuint error = alGetError()) 147 148 COUT(1) << "Sound: Error: Could not set buffer \"" << this->source_ << "\": " << getALErrorString(error) << std::endl; -
code/branches/sound5/src/orxonox/sound/BaseSound.h
r6506 r6726 86 86 virtual ~BaseSound(); 87 87 88 v oid doPlay();89 v oid doStop();90 v oid doPause();88 virtual void doPlay(); 89 virtual void doStop(); 90 virtual void doPause(); 91 91 92 92 // network callbacks -
code/branches/sound5/src/orxonox/sound/SoundStreamer.cc
r6674 r6726 68 68 69 69 char inbuffer[4096]; 70 ALuint initbuffers[ 20];71 alGenBuffers( 20, initbuffers);70 ALuint initbuffers[5]; 71 alGenBuffers(5, initbuffers); 72 72 if (ALint error = alGetError()) { 73 73 COUT(2) << "Sound: Streamer: Could not generate buffer:" << getALErrorString(error) << std::endl; … … 76 76 int current_section; 77 77 78 for(int i = 0; i < 20; i++)78 for(int i = 0; i < 5; i++) 79 79 { 80 80 long ret = ov_read(&vf, inbuffer, sizeof(inbuffer), 0, 2, 1, ¤t_section); … … 99 99 COUT(2) << "Sound: Warning: Couldn't queue buffers: " << getALErrorString(error) << std::endl; 100 100 } 101 COUT(4) << "Sound: " << ret << std::endl;102 101 } 103 102 … … 116 115 COUT(2) << "Sound: Warning: Couldn't get number of processed buffers: " << getALErrorString(error) << std::endl; 117 116 118 COUT(2) << "Sound: Blub: " << processed << std::endl;119 117 if(processed > 0) 120 118 { … … 130 128 if (ret == 0) 131 129 { 132 break;130 return; 133 131 } 134 132 else if (ret < 0)
Note: See TracChangeset
for help on using the changeset viewer.