Changeset 4111:ea89fa7723d6 in roaraudio for roard/include


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

experimental patch from maister for resampling

File:
1 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                                  * \ 
Note: See TracChangeset for help on using the changeset viewer.