Changeset 2090:4f37bdba1b06 in roaraudio


Ignore:
Timestamp:
07/20/09 18:03:50 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added new macro ROAR_OUTPUT_CALC_OUTBUFSIZE_MAX()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/include/output.h

    r1739 r2090  
    5757#define ROAR_OUTPUT_CALC_OUTBUFSIZE(x)   (ROAR_OUTPUT_BUFFER_SAMPLES * (x)->channels * ((x)->bits / 8) * ((float)(x)->rate/g_sa->rate)) 
    5858#define ROAR_OUTPUT_CALC_OUTBUFSAMP(x,y) ((y) / ((x)->channels * ((x)->bits / 8)*((float)(x)->rate/g_sa->rate))) 
     59#define ROAR_OUTPUT_CALC_OUTBUFSIZE_MAX(x0,x1)  (ROAR_OUTPUT_BUFFER_SAMPLES                                  * \ 
     60                                                  ROAR_MAX((x0)->channels,(x1)->channels)                    * \ 
     61                                                 (ROAR_MAX((x0)->bits,    (x1)->bits    ) / 8)               * \ 
     62                                                 (ROAR_MAX((float)(x0)->rate,(float)(x1)->rate)/g_sa->rate)    \ 
     63                                                ) 
    5964 
    6065void         * g_output_buffer; 
Note: See TracChangeset for help on using the changeset viewer.