+ if(ioctl(oss_audio_fd,SNDCTL_DSP_GETOSPACE,&info)==0)
+ {
+ // for fast forward
+ if(bytes > info.fragments * FRAGMENT_SIZE)
+ bytes = info.fragments * FRAGMENT_SIZE;
+ if(bytes == 0)
+ return;
+
+ if(info.fragments==info.fragstotal)
+ {
+ memset(sbuf, 0, sizeof(sbuf));
+ write(oss_audio_fd, sbuf, sizeof(sbuf));
+ write(oss_audio_fd, sbuf, sizeof(sbuf));
+ write(oss_audio_fd, sbuf, sizeof(sbuf));
+ }
+ }
+