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
|
$NetBSD: patch-al,v 1.3 2011/11/22 20:57:35 wiz Exp $
--- subband_layer_1.cc.orig 1994-06-23 12:14:36.000000000 +0000
+++ subband_layer_1.cc
@@ -67,7 +67,7 @@ SubbandLayer1::SubbandLayer1 (uint32 sub
void SubbandLayer1::read_allocation (Ibitstream *stream, Header *, Crc16 *crc)
{
if ((allocation = stream->get_bits (4)) == 15)
- cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
+ std::cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
if (crc)
crc->add_bits (allocation, 4);
if (allocation)
@@ -86,14 +86,14 @@ void SubbandLayer1::read_scalefactor (Ib
}
-bool SubbandLayer1::read_sampledata (Ibitstream *stream)
+boolean SubbandLayer1::read_sampledata (Ibitstream *stream)
{
if (allocation)
{
sample = real (stream->get_bits (samplelength));
#ifdef DEBUG
if (sample == (1 << samplelength) - 1)
- cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
+ std::cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
#endif
}
if (++samplenumber == 12)
@@ -105,15 +105,15 @@ bool SubbandLayer1::read_sampledata (Ibi
}
-bool SubbandLayer1::put_next_sample (e_channels channels,
+boolean SubbandLayer1::put_next_sample (e_channels channels,
SynthesisFilter *filter1, SynthesisFilter *)
{
- if (allocation && channels != right)
+ if (allocation && channels != maplay_right)
{
register real scaled_sample = (sample * factor + offset) * scalefactor;
#ifdef DEBUG
if (scaled_sample < -1.0 || scaled_sample > 1.0)
- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
+ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
// this should never occur
#endif
filter1->input_sample (scaled_sample, subbandnumber);
@@ -142,7 +142,7 @@ void SubbandLayer1IntensityStereo::read_
}
-bool SubbandLayer1IntensityStereo::put_next_sample (e_channels channels,
+boolean SubbandLayer1IntensityStereo::put_next_sample (e_channels channels,
SynthesisFilter *filter1, SynthesisFilter *filter2)
{
if (allocation)
@@ -154,18 +154,18 @@ bool SubbandLayer1IntensityStereo::put_n
sample2 = sample * channel2_scalefactor;
#ifdef DEBUG
if (sample1 < -1.0 || sample1 > 1.0 || sample2 < -1.0 || sample2 > 1.0)
- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
+ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
// this should never occur
#endif
filter1->input_sample (sample1, subbandnumber);
filter2->input_sample (sample2, subbandnumber);
}
- else if (channels == left)
+ else if (channels == maplay_left)
{
register real sample1 = sample * scalefactor;
#ifdef DEBUG
if (sample1 < -1.0 || sample1 > 1.0)
- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
+ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
// this should never occur
#endif
filter1->input_sample (sample1, subbandnumber);
@@ -175,7 +175,7 @@ bool SubbandLayer1IntensityStereo::put_n
register real sample2 = sample * channel2_scalefactor;
#ifdef DEBUG
if (sample2 < -1.0 || sample2 > 1.0)
- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
+ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
// this should never occur
#endif
filter1->input_sample (sample2, subbandnumber);
@@ -206,7 +206,7 @@ void SubbandLayer1Stereo::read_allocatio
crc->add_bits (channel2_allocation, 4);
}
if (allocation == 15 || channel2_allocation == 15)
- cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
+ std::cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
if (allocation)
{
samplelength = allocation + 1;
@@ -231,32 +231,32 @@ void SubbandLayer1Stereo::read_scalefact
}
-bool SubbandLayer1Stereo::read_sampledata (Ibitstream *stream)
+boolean SubbandLayer1Stereo::read_sampledata (Ibitstream *stream)
{
- bool returnvalue = SubbandLayer1::read_sampledata (stream);
+ boolean returnvalue = SubbandLayer1::read_sampledata (stream);
if (channel2_allocation)
{
channel2_sample = real (stream->get_bits (channel2_samplelength));
#ifdef DEBUG
if (channel2_sample == (1 << channel2_samplelength) - 1)
- cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
+ std::cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
#endif
}
return returnvalue;
}
-bool SubbandLayer1Stereo::put_next_sample (e_channels channels,
+boolean SubbandLayer1Stereo::put_next_sample (e_channels channels,
SynthesisFilter *filter1, SynthesisFilter *filter2)
{
SubbandLayer1::put_next_sample (channels, filter1, filter2);
- if (channel2_allocation && channels != left)
+ if (channel2_allocation && channels != maplay_left)
{
register float sample2 = (channel2_sample * channel2_factor + channel2_offset) *
channel2_scalefactor;
#ifdef DEBUG
if (sample2 < -1.0 || sample2 > 1.0)
- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
+ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
// this should never occur
#endif
if (channels == both)
|