View Single Post
Old 07-16-2012, 11:13 PM   #151
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by geekmaster View Post
//============================
// sndplay - play sound buffer
// this plays until we kill it
//----------------------------
void sndplay(void) {
unsigned char buf[1024]; // play buffer
snd_pcm_sframes_t fc; // frame count
unsigned int i,j;
for (i=0;;i++) { // forever
for (j=0;j<sizeof(buf);j++) buf[j]=(random()&3)*i*350;
fc=snd_pcm_writei(hp,buf,sizeof(buf)); // play buffer
if (fc<0) fc=snd_pcm_recover(hp,fc,0); // error recovery
}
}

HEH! I love it! Brilliant
twobob is offline   Reply With Quote