Changeset 3655:db9b17e0f504 in roaraudio for libroaross


Ignore:
Timestamp:
04/03/10 11:24:34 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

get it work with ALSA oss plugin!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroaross/libroaross.c

    r3654 r3655  
    874874 
    875875 if ( (pointer = _get_pointer_by_fh(fd)) != NULL ) { 
     876  ROAR_DBG("write(fd=%i, buf=%p, count=%lu) = ? // pointer write", fd, buf, (long unsigned int) count); 
    876877  switch (pointer->handle->type) { 
    877878   case HT_STREAM: 
     
    989990 struct handle  * handle; 
    990991 int * ip = NULL; 
     992 size_t tmp; 
    991993 audio_buf_info * bi; 
    992994 count_info     * ci; 
     
    10861088       break; 
    10871089      case SNDCTL_DSP_GETOPTR: 
     1090        ROAR_DBG("ioctl(__fd=%i, __request=0x%lX): writec=%lu", __fd, (long unsigned int) __request, (long unsigned int) handle->writec); 
    10881091        ci = argp; 
    10891092        memset(ci, 0, sizeof(*ci)); 
    10901093        ci->bytes  = handle->writec; 
    1091         ci->blocks = ci->bytes / _get_stream_buffersize(handle); 
    1092         ci->ptr    = 0; 
     1094        ci->blocks = ci->bytes / (tmp = _get_stream_buffersize(handle)); 
     1095        ci->ptr    = ci->bytes % tmp; 
    10931096        return 0; 
    10941097       break; 
     
    10971100        memset(ci, 0, sizeof(*ci)); 
    10981101        ci->bytes  = handle->readc; 
    1099         ci->blocks = ci->bytes / _get_stream_buffersize(handle); 
    1100         ci->ptr    = 0; 
     1102        ci->blocks = ci->bytes / (tmp = _get_stream_buffersize(handle)); 
     1103        ci->ptr    = ci->bytes % tmp; 
    11011104        return 0; 
    11021105       break; 
Note: See TracChangeset for help on using the changeset viewer.