summaryrefslogtreecommitdiff
path: root/audio/mp3asm/files/patch-src-stream.c
blob: 4dfb6cbbdad80cdee1f150ec35f232acaac01b3a (plain) (blame)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
--- src/stream.c.orig	2001-08-18 18:46:34 UTC
+++ src/stream.c
@@ -213,36 +213,36 @@ read_stream (FILE *file)
 void
 print_stream_inf(stream_t *stream, char *name)
 {
-  sprintf (log.buf, "%s: Info on file %s:\n", me, name);
+  sprintf (mp3asm_log.buf, "%s: Info on file %s:\n", me, name);
   print_all (1);
-  sprintf (log.buf, "        MPEG %d layer %d", stream->maj_version, stream->layer);
+  sprintf (mp3asm_log.buf, "        MPEG %d layer %d", stream->maj_version, stream->layer);
   print_all (1);
 
   if (!stream->cbr)
-    sprintf (log.buf, " VBR [avg. %.0f kbps], ", stream->avkbps);
+    sprintf (mp3asm_log.buf, " VBR [avg. %.0f kbps], ", stream->avkbps);
   else 
-    sprintf (log.buf, " at %.0f kbps, ", stream->avkbps);
+    sprintf (mp3asm_log.buf, " at %.0f kbps, ", stream->avkbps);
 
   print_all (1);
-  sprintf (log.buf, "sampled at %d.\n", stream->freq);
+  sprintf (mp3asm_log.buf, "sampled at %d.\n", stream->freq);
   print_all (1);
   
-  sprintf(log.buf, "        ");
+  sprintf(mp3asm_log.buf, "        ");
   print_all (1);
 
   switch (stream->mode)
     {
     case 0:
-      sprintf(log.buf, "Stereo, ");
+      sprintf(mp3asm_log.buf, "Stereo, ");
       break;
     case 1:
-      sprintf(log.buf, "Joint Stereo, ");
+      sprintf(mp3asm_log.buf, "Joint Stereo, ");
       break;
     case 2:
-      sprintf(log.buf, "Dual Channel, ");
+      sprintf(mp3asm_log.buf, "Dual Channel, ");
       break;
     case 3:
-      sprintf(log.buf, "Mono, ");
+      sprintf(mp3asm_log.buf, "Mono, ");
       break;
     }
   print_all (1);
@@ -250,36 +250,36 @@ print_stream_inf(stream_t *stream, char *name)
   switch (stream->crc)
     {
     case 0:
-      sprintf(log.buf, "not protected by CRC.\n");
+      sprintf(mp3asm_log.buf, "not protected by CRC.\n");
       break;
     case 1:
-      sprintf(log.buf, "protected by CRC.\n");
+      sprintf(mp3asm_log.buf, "protected by CRC.\n");
       break;
     }
   print_all (1);
 
-  sprintf(log.buf, "        ");
+  sprintf(mp3asm_log.buf, "        ");
   print_all (1);
 
   if (stream->private) 
-    sprintf(log.buf, "private, ");
+    sprintf(mp3asm_log.buf, "private, ");
   else
-    sprintf(log.buf, "not private, ");
+    sprintf(mp3asm_log.buf, "not private, ");
   print_all (1);
   
   if (stream->copyright) 
-    sprintf(log.buf, "copyrighted, ");
+    sprintf(mp3asm_log.buf, "copyrighted, ");
   else
-    sprintf(log.buf, "not copyrighted, ");
+    sprintf(mp3asm_log.buf, "not copyrighted, ");
   print_all (1);
 
   if (stream->original) 
-    sprintf(log.buf, "original.\n");
+    sprintf(mp3asm_log.buf, "original.\n");
   else
-    sprintf(log.buf, "not original.\n");
+    sprintf(mp3asm_log.buf, "not original.\n");
   print_all (1);
 
-  sprintf(log.buf, "        %ld frames at %d samples per frame, infosize = %d.\n", stream->count, stream->samples, stream->isize);
+  sprintf(mp3asm_log.buf, "        %ld frames at %d samples per frame, infosize = %d.\n", stream->count, stream->samples, stream->isize);
   print_all (1);
 }
 
@@ -292,13 +292,13 @@ process_input (stream_t *stream, long startframe, long
 {
   if (startframe >= stream->count)
     {
-      sprintf (log.buf, "Cannot skip %ld frames... No frames left to write.\n", startframe);
+      sprintf (mp3asm_log.buf, "Cannot skip %ld frames... No frames left to write.\n", startframe);
       print_all (0);
       exit(EX_USAGE);
     }
   if (endframe > stream->count)
     {
-      sprintf (log.buf, "File has less frames (%ld) than specified (%ld)... Reading till end.\n", stream->count, endframe);
+      sprintf (mp3asm_log.buf, "File has less frames (%ld) than specified (%ld)... Reading till end.\n", stream->count, endframe);
       print_all (0);
     }
   
@@ -345,31 +345,31 @@ merge_streams (stream_t *streama, stream_t *streamb)
 {
   if (streama->maj_version != streamb->maj_version)
     {
-      sprintf (log.buf, "Incompatible streams: Cannot combine streams with different major versions.\n");
+      sprintf (mp3asm_log.buf, "Incompatible streams: Cannot combine streams with different major versions.\n");
       print_all (-1);
       exit (EX_USAGE);
     }
   else if (streama->min_version != streamb->min_version)
     {
-      sprintf (log.buf, "Incompatible streams: Cannot combine streams with different minor versions.\n");
+      sprintf (mp3asm_log.buf, "Incompatible streams: Cannot combine streams with different minor versions.\n");
       print_all (-1);
       exit (EX_USAGE);
     }
   else if (streama->layer != streamb->layer)
     {
-      sprintf (log.buf, "Incompatible streams: Cannot combine streams that are not the same layer.\n");
+      sprintf (mp3asm_log.buf, "Incompatible streams: Cannot combine streams that are not the same layer.\n");
       print_all (-1);
       exit (EX_USAGE);
     }
   else if (streama->freq != streamb->freq)
      {
-      sprintf (log.buf, "Incompatible streams: Cannot combine streams with different frequencies.\n");
+      sprintf (mp3asm_log.buf, "Incompatible streams: Cannot combine streams with different frequencies.\n");
       print_all (-1);
       exit (EX_USAGE);
     }
   else if (streama->mode != streamb->mode)
     {
-      sprintf (log.buf, "Incompatible streams: Cannot combine streams with different modes.\n");
+      sprintf (mp3asm_log.buf, "Incompatible streams: Cannot combine streams with different modes.\n");
       print_all (-1);
       exit (EX_USAGE);
     }