CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/ext/at3_standalone/at3_decoders.h
Views: 1401
1
#pragma once
2
3
#include <cstdint>
4
5
// Notes
6
//
7
// Performance-wise, these are OK.
8
// For Atrac3+, the bottleneck is two functions: decode_qu_spectra and ff_atrac3p_ipqf. At least the latter is quite SIMD-able.
9
10
// The full external API for the standalone Atrac3/3+ decoder.
11
12
struct ATRAC3Context;
13
struct ATRAC3PContext;
14
15
// If the block_align passed in is 0, tries to audio detect.
16
// flush_buffers should be called when seeking before the next decode_frame.
17
18
ATRAC3Context *atrac3_alloc(int channels, int *block_align, const uint8_t *extra_data, int extra_data_size);
19
void atrac3_free(ATRAC3Context *ctx);
20
void atrac3_flush_buffers(ATRAC3Context *ctx);
21
int atrac3_decode_frame(ATRAC3Context *ctx, float *out_data[2], int *nb_samples, const uint8_t *buf, int buf_size);
22
23
ATRAC3PContext *atrac3p_alloc(int channels, int *block_align);
24
void atrac3p_free(ATRAC3PContext *ctx);
25
void atrac3p_flush_buffers(ATRAC3PContext *ctx);
26
int atrac3p_decode_frame(ATRAC3PContext *ctx, float *out_data[2], int *nb_samples, const uint8_t *buf, int buf_size);
27
28