summaryrefslogtreecommitdiff
path: root/src/libac3/ac3.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libac3/ac3.h')
-rw-r--r--src/libac3/ac3.h45
1 files changed, 20 insertions, 25 deletions
diff --git a/src/libac3/ac3.h b/src/libac3/ac3.h
index dcc125f85..07f41c0a0 100644
--- a/src/libac3/ac3.h
+++ b/src/libac3/ac3.h
@@ -22,33 +22,28 @@
*
*/
-#ifndef __AC3_H__
-#define __AC3_H__
-
#include <inttypes.h>
-#include "audio_out.h"
-
-#define AC3_DOLBY_SURR_ENABLE (1<<0)
-#define AC3_ALTIVEC_ENABLE (1<<1)
-#define AC3_3DNOW_ENABLE (1<<2)
-#define AC3_MMX_ENABLE (1<<3)
-#define AC3_SSE_ENABLE (1<<4)
-typedef struct ac3_config_s {
- // Bit flags that enable various things
- uint32_t flags;
- //Callback that points the decoder to new stream data
- void (*fill_buffer_callback)(uint8_t **, uint8_t **);
- // Number of discrete channels in final output (for downmixing)
- uint16_t num_output_ch;
- // Which channel of a dual mono stream to select
- uint16_t dual_mono_ch_sel;
+#define AC3_DOLBY_SURR_ENABLE 0x1
+
+typedef struct ac3_config_s
+{
+ //Bit flags that enable various things
+ uint32_t flags;
+ //Callback that points the decoder to new stream data
+ void (* fill_buffer_callback) (uint8_t **, uint8_t **);
+ //Number of discrete channels in final output (for downmixing)
+ uint16_t num_output_ch;
+ //Which channel of a dual mono stream to select
+ uint16_t dual_mono_ch_sel;
} ac3_config_t;
-void ac3_init(ac3_config_t *,ao_functions_t*);
-
-size_t ac3_decode_data(uint8_t *data_start,uint8_t *data_end,uint32_t pts);
-
-void ac3_reset(void);
+typedef struct ac3_frame_s
+{
+ uint32_t sampling_rate;
+ int16_t * audio_data;
+} ac3_frame_t;
-#endif
+void ac3_init(void);
+int ac3_frame_length(uint8_t * buf);
+ac3_frame_t* ac3_decode_frame(uint8_t * buf);