comparison libao2/ao_sun.c @ 23332:0471ad67050e

Remove unused code, if it is ever needed it can be recovered from history
author reimar
date Sun, 20 May 2007 08:15:27 +0000
parents 99e20a22d5d0
children f665e123e6f9
comparison
equal deleted inserted replaced
23331:a35d0ad65e72 23332:0471ad67050e
560 560
561 bytes_per_sample = channels * info.play.precision / 8; 561 bytes_per_sample = channels * info.play.precision / 8;
562 ao_data.bps = byte_per_sec = bytes_per_sample * ao_data.samplerate; 562 ao_data.bps = byte_per_sec = bytes_per_sample * ao_data.samplerate;
563 ao_data.outburst = byte_per_sec > 100000 ? 16384 : 8192; 563 ao_data.outburst = byte_per_sec > 100000 ? 16384 : 8192;
564 564
565 #ifdef __not_used__
566 /*
567 * hmm, ao_data.buffersize is currently not used in this driver, do there's
568 * no need to measure it
569 */
570 if(ao_data.buffersize==-1){
571 // Measuring buffer size:
572 void* data;
573 ao_data.buffersize=0;
574 #ifdef HAVE_AUDIO_SELECT
575 data = malloc(ao_data.outburst);
576 memset(data, format==AF_FORMAT_U8 ? 0x80 : 0, ao_data.outburst);
577 while(ao_data.buffersize<0x40000){
578 fd_set rfds;
579 struct timeval tv;
580 FD_ZERO(&rfds); FD_SET(audio_fd,&rfds);
581 tv.tv_sec=0; tv.tv_usec = 0;
582 if(!select(audio_fd+1, NULL, &rfds, NULL, &tv)) break;
583 write(audio_fd,data,ao_data.outburst);
584 ao_data.buffersize+=ao_data.outburst;
585 }
586 free(data);
587 if(ao_data.buffersize==0){
588 mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_SUN_CantUseSelect);
589 return 0;
590 }
591 #ifdef __svr4__
592 // remove the 0 bytes from the above ao_data.buffersize measurement from the
593 // audio driver's STREAMS queue
594 ioctl(audio_fd, I_FLUSH, FLUSHW);
595 #endif
596 ioctl(audio_fd, AUDIO_DRAIN, 0);
597 #endif
598 }
599 #endif /* __not_used__ */
600
601 AUDIO_INITINFO(&info); 565 AUDIO_INITINFO(&info);
602 info.play.samples = 0; 566 info.play.samples = 0;
603 info.play.eof = 0; 567 info.play.eof = 0;
604 info.play.error = 0; 568 info.play.error = 0;
605 ioctl (audio_fd, AUDIO_SETINFO, &info); 569 ioctl (audio_fd, AUDIO_SETINFO, &info);