protected boolean bind ( Clip clip ) { AL10 . alGetError ( ) ; // throw away any unchecked error prior to an op we want to check _buffer . setData ( clip . format , clip . data , clip . frequency ) ; int errno = AL10 . alGetError ( ) ; if ( errno != AL10 . AL_NO_ERROR ) { log . warning ( "Failed to bind clip" , "key" , getKey ( ) , "errno" , errno ) ; failed ( ) ; return false ; } _state = LOADED ; _size = _buffer . getSize ( ) ; _observers . apply ( new ObserverList . ObserverOp < Observer > ( ) { public boolean apply ( Observer observer ) { observer . clipLoaded ( ClipBuffer . this ) ; return true ; } } ) ; _observers . clear ( ) ; return true ; }
This method is called back on the main thread and instructs this buffer to bind the clip data to this buffer s OpenAL buffer .