-
Notifications
You must be signed in to change notification settings - Fork 1
/
cutmp3.h
112 lines (82 loc) · 2.9 KB
/
cutmp3.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <termios.h>
#include <signal.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/time.h>
#include <sys/types.h>
#ifdef LINENOISE
# include "linenoise/linenoise.h"
# define readline linenoise
#else
# include <readline/readline.h>
# include <readline/history.h>
#endif
#include "mpglib.h"
#define EOF (-1)
void usage(char *text);
void help(void);
unsigned int mpeg(unsigned char secondbyte);
unsigned int layer(unsigned char secondbyte);
unsigned int sampfreq(unsigned char secondbyte, unsigned char thirdbyte);
unsigned int channelmode(unsigned char fourthbyte);
unsigned int channels(unsigned char fourthbyte);
unsigned int bitrate(unsigned char secondbyte, unsigned char thirdbyte);
unsigned int paddingbit(unsigned char thirdbyte);
unsigned int framesize(unsigned char secondbyte,unsigned char thirdbyte,unsigned char fourthbyte);
unsigned int is_header(int secondbyte, int thirdbyte, int fourthbyte);
long nextframe(long seekpos);
long prevframe(long seekpos);
//int showmins (long bytes);
//real showsecs (long bytes);
unsigned long fforward (long seekpos,long skiptime);
unsigned long frewind (long seekpos,long skiptime);
real avbitrate(void);
long get_total_frames(void);
unsigned int volume(long playpos);
long seeksilence(long seekpos);
long seeksilstart(long seekpos);
/* This function prints the reached ID3 V1 TAG,
argument is next byte after tag */
void showtag(long seekpos);
/* This function prints the reached ID3 V1 TAG */
void print_id3v1(long seekpos);
/* This function prints the reached ID3 V2 TAG */
void print_id3v2(long showpos);
/* This function rewinds to before ID3V1 tag, if any.
Returns position of last byte before tag. */
long rewind3v1(long seekpos);
/* This function rewinds max 100kB to before ID3V2 tag, if any.
Returns position of first byte of tag. */
long rewind3v2(long seekpos);
/* This function gets data from ID3 V1 and returns its length,
argument is end of tag */
int importid3v1(long seekpos);
/* This function gets data from ID3 V2 and returns its length,
argument is start of tag */
long importid3v2(long seekpos);
/* This function skips ID3 V1 tag, if any.
Returns position of next byte after tag. */
long skipid3v1(long seekpos);
/* This function skips ID3 V2 tag, if any.
Useful also for getting the length of the ID3 V2 tag.
Returns position of next byte after tag. */
long skipid3v2(long seekpos);
/* This function returns the position of the next ID3 TAG,
next byte after V1 and first byte of prepended V2 */
long seektag(long seekpos);
void infotag(long seekpos);
void zaptitle (void);
void writeconf(void);
void readconf(void);
void playsel(long int playpos);
void playfirst(long int playpos);
//void savesel(void);
void savewithtag(void);
//void cutexact(void);
//void writetable(void);
//void cutfromtable(void);
void showfileinfo(int rawmode, int fix_channels);