• Home
  • Raw
  • Download

Lines Matching refs:sf

115 	subformat = SF_CODEC (psf->sf.format) ;  in voc_open()
118 { if ((SF_CONTAINER (psf->sf.format)) != SF_FORMAT_VOC) in voc_open()
129 psf->blockwidth = psf->bytewidth * psf->sf.channels ; in voc_open()
197 psf->sf.format = SF_FORMAT_VOC ; /* Major format */ in voc_read_header()
247 psf->sf.samplerate = 1000000 / (256 - (rate_byte & 0xFF)) ; in voc_read_header()
250 size, rate_byte, psf->sf.samplerate, compression) ; in voc_read_header()
266 psf->sf.channels = 1 ; in voc_read_header()
269 psf->sf.format = SF_FORMAT_VOC | SF_FORMAT_PCM_U8 ; in voc_read_header()
291 { psf->sf.channels = 2 ; in voc_read_header()
292 psf->sf.samplerate = 128000000 / (65536 - rate_short) ; in voc_read_header()
295 { psf->sf.channels = 1 ; in voc_read_header()
296 psf->sf.samplerate = 256000000 / (65536 - rate_short) ; in voc_read_header()
299 psf_log_printf (psf, " sr : %d => %dHz\n", (rate_short & 0xFFFF), psf->sf.samplerate) ; in voc_read_header()
331 psf->sf.format = SF_FORMAT_VOC | SF_FORMAT_PCM_U8 ; in voc_read_header()
340 offset += psf_binheader_readf (psf, "e341124", &size, &psf->sf.samplerate, in voc_read_header()
354 " channels : %d\n", psf->sf.samplerate, bitwidth, channels) ; in voc_read_header()
366 psf->sf.channels = channels ; in voc_read_header()
388 psf->sf.format = SF_FORMAT_VOC | SF_FORMAT_PCM_U8 ; in voc_read_header()
393 psf->sf.format = SF_FORMAT_VOC | SF_FORMAT_PCM_16 ; in voc_read_header()
398 psf->sf.format = SF_FORMAT_VOC | SF_FORMAT_ALAW ; in voc_read_header()
403 psf->sf.format = SF_FORMAT_VOC | SF_FORMAT_ULAW ; in voc_read_header()
434 psf->sf.frames = psf->datalength / (psf->bytewidth * psf->sf.channels) ; in voc_write_header()
437 subformat = SF_CODEC (psf->sf.format) ; in voc_write_header()
455 if (subformat == SF_FORMAT_PCM_U8 && psf->sf.channels == 1) in voc_write_header()
457 rate_const = 256 - 1000000 / psf->sf.samplerate ; in voc_write_header()
462 else if (subformat == SF_FORMAT_PCM_U8 && psf->sf.channels == 2) in voc_write_header()
464 rate_const = 65536 - 128000000 / psf->sf.samplerate ; in voc_write_header()
472 rate_const = 256 - 1000000 / psf->sf.samplerate ; in voc_write_header()
482 if (psf->sf.channels < 1 || psf->sf.channels > 2) in voc_write_header()
488 length = psf->sf.frames * psf->sf.channels * psf->bytewidth + 12 ; in voc_write_header()
490 …124", BHW1 (VOC_EXTENDED_II), BHW3 (length), BHW4 (psf->sf.samplerate), BHW1 (16), BHW1 (psf->sf.c… in voc_write_header()
495 length = psf->sf.frames * psf->sf.channels * psf->bytewidth + 12 ; in voc_write_header()
497 …124", BHW1 (VOC_EXTENDED_II), BHW3 (length), BHW4 (psf->sf.samplerate), BHW1 (16), BHW1 (psf->sf.c… in voc_write_header()
502 length = psf->sf.frames * psf->sf.channels * psf->bytewidth + 12 ; in voc_write_header()
503 …1124", BHW1 (VOC_EXTENDED_II), BHW3 (length), BHW4 (psf->sf.samplerate), BHW1 (8), BHW1 (psf->sf.c… in voc_write_header()
508 length = psf->sf.frames * psf->sf.channels * psf->bytewidth + 12 ; in voc_write_header()
509 …1124", BHW1 (VOC_EXTENDED_II), BHW3 (length), BHW4 (psf->sf.samplerate), BHW1 (8), BHW1 (psf->sf.c… in voc_write_header()
570 psf->sf.frames = 0 ;