source: roaraudio/roard/include/output.h @ 380:c71736eb9236

Last change on this file since 380:c71736eb9236 was 380:c71736eb9236, checked in by phi, 16 years ago

added a macro to get the number of samples a output buffer is long

File size: 766 bytes
RevLine 
[0]1//output.h:
2
3#ifndef _OUTPUT_H_
4#define _OUTPUT_H_
5
6#include <roaraudio.h>
7
8//#define ROAR_OUTPUT_BUFFER_SAMPLES 1024
9//#define ROAR_OUTPUT_BUFFER_SAMPLES 1024
[55]10#ifdef DEBUG
11#define ROAR_OUTPUT_BUFFER_SAMPLES 2048
12#else
[0]13#define ROAR_OUTPUT_BUFFER_SAMPLES 441
[55]14#endif
15
[0]16#define ROAR_OUTPUT_WRITE_SIZE     1024
17
[380]18#define ROAR_OUTPUT_CALC_OUTBUFSIZE(x)   (ROAR_OUTPUT_BUFFER_SAMPLES * (x)->channels * ((x)->bits / 8))
19#define ROAR_OUTPUT_CALC_OUTBUFSAMP(x,y) ((y) / ((x)->channels * ((x)->bits / 8)))
[0]20
21void         * g_output_buffer;
22unsigned int   g_output_buffer_len;
23
24int output_buffer_init   (struct roar_audio_info * info);
25int output_buffer_reinit (void);
26int output_buffer_free   (void);
27
28int output_buffer_flush  (DRIVER_USERDATA_T inst, int driver);
29
30#endif
31
32//ll
Note: See TracBrowser for help on using the repository browser.