~ubuntu-branches/ubuntu/lucid/mpg123/lucid

« back to all changes in this revision

Viewing changes to src/common.h

Tags: upstream-0.60
ImportĀ upstreamĀ versionĀ 0.60

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
        common: anything can happen here... frame reading, output, messages
 
3
 
 
4
        copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
 
5
        see COPYING and AUTHORS files in distribution or http://mpg123.de
 
6
        initially written by Michael Hipp
 
7
*/
 
8
 
 
9
#ifndef _MPG123_COMMON_H_
 
10
#define _MPG123_COMMON_H_
 
11
 
 
12
/* max = 1728 */
 
13
#define MAXFRAMESIZE 3456
 
14
#define HDRCMPMASK 0xfffffd00
 
15
 
 
16
extern unsigned long firsthead;
 
17
extern int tabsel_123[2][3][16];
 
18
extern double compute_tpf(struct frame *fr);
 
19
extern double compute_bpf(struct frame *fr);
 
20
extern long compute_buffer_offset(struct frame *fr);
 
21
 
 
22
struct bitstream_info {
 
23
  int bitindex;
 
24
  unsigned char *wordpointer;
 
25
};
 
26
 
 
27
extern struct bitstream_info bsi;
 
28
 
 
29
/* well, I take that one for granted... at least layer3 */
 
30
#define DECODER_DELAY 529
 
31
 
 
32
#ifdef GAPLESS
 
33
unsigned long samples_to_bytes(unsigned long s, struct frame *fr , struct audio_info_struct* ai);
 
34
/* samples per frame ...
 
35
Layer I
 
36
Layer II
 
37
Layer III
 
38
MPEG-1
 
39
384
 
40
1152
 
41
1152
 
42
MPEG-2 LSF
 
43
384
 
44
1152
 
45
576
 
46
MPEG 2.5
 
47
384
 
48
1152
 
49
576
 
50
*/
 
51
#define spf(fr) (fr->lay == 1 ? 384 : (fr->lay==2 ? 1152 : (fr->lsf || fr->mpeg25 ? 576 : 1152)))
 
52
/* still fine-tuning the "real music" window... see read_frame */
 
53
#define GAP_SHIFT -1
 
54
#endif
 
55
 
 
56
/* for control_generic */
 
57
extern const char* remote_header_help;
 
58
void make_remote_header(struct frame* fr, char *target);
 
59
 
 
60
int position_info(struct frame* fr, long buffsize, struct audio_info_struct* ai,
 
61
                   unsigned long* frames_left, double* current_seconds, double* seconds_left);
 
62
 
 
63
int read_frame_recover(struct frame* fr);
 
64
 
 
65
off_t frame_index_find(unsigned long want_frame, unsigned long* get_frame);
 
66
void print_frame_index(FILE* out);
 
67
 
 
68
/* this could become a struct... */
 
69
extern long lastscale;
 
70
extern int rva_level[2];
 
71
extern float rva_gain[2];
 
72
extern float rva_peak[2];
 
73
 
 
74
#endif