Changeset 4111:ea89fa7723d6 in roaraudio for roard


Ignore:
Timestamp:
08/06/10 16:39:18 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

experimental patch from maister for resampling

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/include/output.h

    r3811 r4111  
    5252#define ROAR_OUTPUT_WRITE_SIZE     1024 
    5353 
    54 #define ROAR_OUTPUT_CALC_OUTBUFSIZE(x)   (ROAR_OUTPUT_BUFFER_SAMPLES * (x)->channels * ((x)->bits / 8) * ((float)(x)->rate/g_sa->rate)) 
     54//#define ROAR_OUTPUT_CALC_OUTBUFSIZE(x)   (ROAR_OUTPUT_BUFFER_SAMPLES * (x)->channels * ((x)->bits / 8) * ((float)(x)->rate/g_sa->rate)) 
     55// First rounds the samples count, and makes sure that the outbuffer size is divisible by the framesize (channels * bits/8) 
     56#define ROAR_OUTPUT_CALC_OUTBUFSIZE(x)   ( \ 
     57                                          ( \ 
     58                                           (int)(ROAR_OUTPUT_BUFFER_SAMPLES * ((float)(x)->rate/g_sa->rate) + 0.5) \ 
     59                                          ) * \ 
     60                                          (x)->channels * ((x)->bits / 8) \ 
     61                                         ) 
     62 
    5563#define ROAR_OUTPUT_CALC_OUTBUFSAMP(x,y) ((y) / ((x)->channels * ((x)->bits / 8)*((float)(x)->rate/g_sa->rate))) 
    5664#define ROAR_OUTPUT_CALC_OUTBUFSIZE_MAX(x0,x1)  (ROAR_OUTPUT_BUFFER_SAMPLES                                  * \ 
  • roard/streams.c

    r4102 r4111  
    11651165//  if ( roar_conv(outdata, indata, (8*inlen_got*info->rate)/(stream_info->rate * stream_info->bits), stream_info, info) == -1 ) { 
    11661166  ROAR_DBG("streams_fill_mixbuffer2(*): CALL roar_conv2(*)..."); 
    1167   if ( roar_conv2(bufdata, indata, inlen, stream_info, info, buflen) == -1 ) { 
     1167  if ( roar_conv2(bufdata, indata, inlen, stream_info, info, outlen) == -1 ) { 
    11681168   if ( bufbuf != NULL ) 
    11691169    roar_buffer_free(bufbuf); 
Note: See TracChangeset for help on using the changeset viewer.