Mercurial > audlegacy
annotate Plugins/Input/musepack/libmpc.h @ 507:b3dd43f37b81 trunk
[svn] documentation updates.
author | nenolod |
---|---|
date | Wed, 25 Jan 2006 22:42:38 -0800 |
parents | 5d0a74c31ee6 |
children | 4f88f4e6c123 |
rev | line source |
---|---|
293
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
1 #ifndef XMMS_MUSEPACK |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
2 #define XMMS_MUSEPACK |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
3 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
4 //xmms headers |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
5 extern "C" |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
6 { |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
7 #include "audacious/plugin.h" |
352 | 8 #include "audacious/output.h" |
293
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
9 #include "libaudacious/util.h" |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
10 #include "libaudacious/configdb.h" |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
11 #include "libaudacious/titlestring.h" |
369 | 12 #include "libaudacious/vfs.h" |
293
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
13 } |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
14 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
15 //stdlib headers |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
16 #include <string.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
17 #include <stdio.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
18 #include <stdlib.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
19 #include <unistd.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
20 #include <math.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
21 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
22 //libmpcdec headers |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
23 #include <mpcdec/mpcdec.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
24 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
25 //GTK+ headers |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
26 #include <glib.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
27 #include <gtk/gtk.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
28 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
29 //taglib headers |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
30 #include <taglib/tag.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
31 #include <taglib/apetag.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
32 #include <taglib/mpcfile.h> |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
33 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
34 #include "equalizer.h" |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
35 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
36 #ifndef M_LN10 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
37 #define M_LN10 2.3025850929940456840179914546843642 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
38 #endif |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
39 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
40 typedef struct PluginConfig |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
41 { |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
42 gboolean clipPrevention; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
43 gboolean dynamicBitrate; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
44 gboolean replaygain; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
45 gboolean albumGain; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
46 gboolean isEq; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
47 }; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
48 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
49 typedef struct Widgets |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
50 { |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
51 GtkWidget* aboutBox; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
52 GtkWidget* configBox; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
53 GtkWidget* bitrateCheck; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
54 GtkWidget* clippingCheck; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
55 GtkWidget* replaygainCheck; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
56 GtkWidget* albumCheck; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
57 GtkWidget* infoBox; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
58 GtkWidget* albumEntry; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
59 GtkWidget* artistEntry; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
60 GtkWidget* titleEntry; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
61 GtkWidget* genreEntry; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
62 GtkWidget* yearEntry; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
63 GtkWidget* trackEntry; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
64 GtkWidget* commentEntry; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
65 GtkWidget* fileEntry; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
66 }; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
67 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
68 typedef struct MpcDecoder |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
69 { |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
70 char* isError; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
71 double offset; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
72 bool isOutput; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
73 bool isAlive; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
74 bool isPause; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
75 }; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
76 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
77 typedef struct TrackInfo |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
78 { |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
79 int bitrate; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
80 char* display; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
81 int length; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
82 int sampleFreq; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
83 int channels; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
84 }; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
85 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
86 typedef struct MpcInfo |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
87 { |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
88 char* title; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
89 char* artist; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
90 char* album; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
91 char* comment; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
92 char* genre; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
93 char* date; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
94 unsigned track; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
95 unsigned year; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
96 }; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
97 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
98 extern "C" InputPlugin * get_iplugin_info(void); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
99 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
100 static void mpcOpenPlugin(); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
101 static void mpcAboutBox(); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
102 static void mpcConfigBox(); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
103 static void toggleSwitch(GtkWidget*, gpointer); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
104 static void saveConfigBox(GtkWidget*, gpointer); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
105 static int mpcIsOurFile(char*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
106 static void mpcPlay(char*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
107 static void mpcStop(); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
108 static void mpcPause(short); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
109 static void mpcSeek(int); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
110 static void mpcSetEq(int, float, float*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
111 static int mpcGetTime(); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
112 static void mpcGetSongInfo(char*, char**, int*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
113 static void freeTags(MpcInfo&); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
114 static MpcInfo getTags(const char*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
115 static void mpcFileInfoBox(char*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
116 static void mpcGtkPrintLabel(GtkWidget*, char*, ...); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
117 static GtkWidget* mpcGtkTagLabel(char*, int, int, int, int, GtkWidget*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
118 static GtkWidget* mpcGtkTagEntry(int, int, int, int, int, GtkWidget*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
119 static GtkWidget* mpcGtkLabel(GtkWidget*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
120 static GtkWidget* mpcGtkButton(char*, GtkWidget*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
121 static void removeTags(GtkWidget*, gpointer); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
122 static void saveTags(GtkWidget*, gpointer); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
123 static void closeInfoBox(GtkWidget*, gpointer); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
124 static char* mpcGenerateTitle(const MpcInfo&, const char*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
125 static void lockAcquire(); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
126 static void lockRelease(); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
127 static void* decodeStream(void*); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
128 static int processBuffer(MPC_SAMPLE_FORMAT*, char*, mpc_decoder&); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
129 static void* endThread(char*, FILE*, bool); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
130 static bool isAlive(); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
131 static void setAlive(bool); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
132 static double getOffset(); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
133 static void setOffset(double); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
134 static bool isPause(); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
135 static void setReplaygain(mpc_streaminfo&, mpc_decoder&); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
136 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
137 #ifdef MPC_FIXED_POINT |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
138 inline static int shiftSigned(MPC_SAMPLE_FORMAT val, int shift) |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
139 { |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
140 if (shift > 0) |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
141 val <<= shift; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
142 else if (shift < 0) |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
143 val >>= -shift; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
144 return (int) val; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
145 } |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
146 #endif |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
147 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
148 inline static void copyBuffer(MPC_SAMPLE_FORMAT* pInBuf, char* pOutBuf, unsigned pLength) |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
149 { |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
150 unsigned pSize = 16; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
151 int clipMin = -1 << (pSize - 1); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
152 int clipMax = (1 << (pSize - 1)) - 1; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
153 int floatScale = 1 << (pSize - 1); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
154 for (unsigned n = 0; n < 2 * pLength; n++) |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
155 { |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
156 int val; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
157 #ifdef MPC_FIXED_POINT |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
158 val = shiftSigned(pInBuf[n], pSize - MPC_FIXED_POINT_SCALE_SHIFT); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
159 #else |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
160 val = (int) (pInBuf[n] * floatScale); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
161 #endif |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
162 if (val < clipMin) |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
163 val = clipMin; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
164 else if (val > clipMax) |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
165 val = clipMax; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
166 unsigned shift = 0; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
167 do |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
168 { |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
169 pOutBuf[n * 2 + (shift / 8)] = (unsigned char) ((val >> shift) & 0xFF); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
170 shift += 8; |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
171 } |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
172 while (shift < pSize); |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
173 } |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
174 } |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
175 |
9b191695629c
[svn] Add musepack input plugin & hook into build system.
chainsaw
parents:
diff
changeset
|
176 #endif |