Lines Matching defs:psf
33 rx2_open (SF_PRIVATE *psf)
34 { if (psf)
70 static int rx2_close (SF_PRIVATE *psf) ;
77 rx2_open (SF_PRIVATE *psf)
91 psf_binheader_readf (psf, "Epm4", 0, &marker, &length) ;
94 { psf_log_printf (psf, "length : %d\n", length) ;
98 if (length != psf->filelength - 8)
99 psf_log_printf (psf, "%M : %d (should be %d)\n", marker, length, psf->filelength - 8) ;
101 psf_log_printf (psf, "%M : %d\n", marker, length) ;
104 psf_binheader_readf (psf, "m", &marker) ;
105 psf_log_printf (psf, "%M", marker) ;
108 psf_binheader_readf (psf, "m", &marker) ;
109 psf_log_printf (psf, "%M\n", marker) ;
112 psf_binheader_readf (psf, "E4", &glob_offset) ;
116 psf_binheader_readf (psf, "p", 0x30) ;
120 psf_binheader_readf (psf, "1", &length) ;
122 { psf_log_printf (psf, " Text : %d *** Error : Too sf_count_t!\n") ;
127 psf_binheader_readf (psf, "b", ubuf.cbuf, length) ;
128 psf_log_printf (psf, " Text : \"%s\"\n", ubuf.cbuf) ;
134 psf_binheader_readf (psf, "p", glob_offset) ;
139 { psf_binheader_readf (psf, "m", &marker) ;
142 { psf_log_printf (psf, " SLCE count : %d\n", slce_count) ;
147 psf_binheader_readf (psf, "E4", &length) ;
148 psf_log_printf (psf, " %M : %d\n", marker, length) ;
149 psf_binheader_readf (psf, "j", length) ;
153 psf_binheader_readf (psf, "E4", &length) ;
154 psf_log_printf (psf, " %M : %d\n", marker, length) ;
155 psf_binheader_readf (psf, "j", (length+1) & 0xFFFFFFFE) ; /* ?????? */
159 psf_binheader_readf (psf, "E4", &length) ;
160 psf_log_printf (psf, " %M : %d\n", marker, length) ;
161 /*-psf_binheader_readf (psf, "j", length) ;-*/
165 psf_binheader_readf (psf, "mE4", &marker, &length) ;
166 psf_log_printf (psf, " DEVL%M : %d\n", marker, length) ;
169 psf_binheader_readf (psf, "j", length) ;
174 psf_binheader_readf (psf, "E4", &length) ;
175 psf_log_printf (psf, " %M : %d\n", marker, length) ;
179 psf_binheader_readf (psf, "j", length) ;
183 psf_log_printf (psf, " %M\n (Offset, Next Offset, Type)\n", marker) ;
190 psf_binheader_readf (psf, "E4444", &len [0], &len [1], &len [2], &len [3]) ;
198 psf_log_printf (psf, " %M : (%6d, ?: 0x%X, %s)\n", marker, len [1], (len [3] & 0xFFFF0000) >> 16, marker_type [indx]) ;
203 psf_log_printf (psf, " %M : (%6d, SLCE_next_ofs:%d, ?: 0x%X, %s)\n", marker, len [1], len [2], (len [3] & 0xFFFF0000) >> 16, marker_type [indx]) ;
211 psf_binheader_readf (psf, "E4", &length) ;
212 psf_log_printf (psf, " %M : %d\n", marker, length) ;
214 psf_binheader_readf (psf, "E2", &n_channels) ;
216 psf_log_printf (psf, " Channels : %d\n", n_channels) ;
218 psf_binheader_readf (psf, "E44", &psf->sf.samplerate, &frames) ;
219 psf->sf.frames = frames ;
220 psf_log_printf (psf, " Sample Rate : %d\n", psf->sf.samplerate) ;
221 psf_log_printf (psf, " Frames : %D\n", psf->sf.frames) ;
223 psf_binheader_readf (psf, "E4", &length) ;
224 psf_log_printf (psf, " ??????????? : %d\n", length) ;
226 psf_binheader_readf (psf, "E4", &length) ;
227 psf_log_printf (psf, " ??????????? : %d\n", length) ;
231 psf_binheader_readf (psf, "E4", &length) ;
236 psf->dataoffset = psf_binheader_readf (psf, NULL) ;
238 if (psf->dataoffset + length != psf->filelength)
239 psf_log_printf (psf, " %M : %d (should be %d)\n", marker, length, psf->dataoffset + psf->filelength) ;
241 psf_log_printf (psf, " %M : %d\n", marker, length) ;
245 psf_log_printf (psf, "Unknown marker : 0x%X %M", marker, marker) ;
255 puts (psf->parselog.buf) ;
272 psf->parselog.buf [0] = 0 ;
276 psf->endian = SF_ENDIAN_BIG ;
278 psf->datalength = psf->filelength - psf->dataoffset ;
280 if (psf_fseek (psf, psf->dataoffset, SEEK_SET))
283 psf->sf.format = (SF_FORMAT_REX2 | SF_FORMAT_DWVW_12) ;
285 psf->sf.channels = 1 ;
286 psf->bytewidth = 2 ;
287 psf->blockwidth = psf->sf.channels * psf->bytewidth ;
289 if ((error = dwvw_init (psf, 16)))
292 psf->container_close = rx2_close ;
294 if (! psf->sf.frames && psf->blockwidth)
295 psf->sf.frames = psf->datalength / psf->blockwidth ;
306 rx2_close (SF_PRIVATE *psf)
308 if (psf->file.mode == SFM_WRITE)