Changeset 2569:6997f3702901 in roaraudio for libroareio
- Timestamp:
- 09/04/09 05:21:54 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroareio/driver_oss.c
r2301 r2569 34 34 #endif 35 35 #include <sys/ioctl.h> 36 37 #ifdef SNDCTL_DSP_SETFRAGMENT 38 static void roar_cdriver_oss_try_buf_setups(int fh) { 39 int blocksizes[] = {11, 12, 13}; 40 int blocks[] = {4, 5, 6, 3, 7, 2, 8}; 41 int bs, b; 42 int tmp; 43 44 for (bs = 0; bs < sizeof(blocksizes)/sizeof(int); bs++) { 45 for (b = 0; b < sizeof(blocks) /sizeof(int); b++ ) { 46 tmp = blocksizes[bs] | (blocks[b] << 16); 47 if ( ioctl(fh, SNDCTL_DSP_SETFRAGMENT, &tmp) == 0 ) 48 return; 49 } 50 } 51 } 52 #endif 36 53 37 54 #define _err() roar_vio_close(calls); return -1 … … 154 171 } 155 172 173 #ifdef SNDCTL_DSP_SETFRAGMENT 174 roar_cdriver_oss_try_buf_setups(fh); 175 #endif 176 156 177 return 0; 157 178 }
Note: See TracChangeset
for help on using the changeset viewer.