• Home
  • Raw
  • Download

Lines Matching refs:sf

179 	subformat = SF_CODEC (psf->sf.format) ;  in wav_open()
187 format = SF_CONTAINER (psf->sf.format) ; in wav_open()
191 psf->blockwidth = psf->bytewidth * psf->sf.channels ; in wav_open()
194 psf->endian = SF_ENDIAN (psf->sf.format) ; in wav_open()
204 psf->sf.frames = 0 ; in wav_open()
208 { blockalign = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ; in wav_open()
216 { if ((psf->peak_info = peak_info_calloc (psf->sf.channels)) == NULL) in wav_open()
423 if (! psf->sf.seekable || psf->dataoffset < 0) in wav_read_header()
631 if (! psf->sf.seekable && (parsestage & HAVE_data)) in wav_read_header()
643 if (psf->sf.channels < 1) in wav_read_header()
646 if (psf->sf.channels > SF_MAX_CHANNELS) in wav_read_header()
672 psf->sf.frames = (psf->filelength - psf->dataoffset) / psf->blockwidth ; in wav_read_header()
674 psf->sf.frames = psf->datalength / psf->blockwidth ; in wav_read_header()
679 if (psf->sf.format == (SF_FORMAT_WAVEX | SF_FORMAT_MS_ADPCM)) in wav_read_header()
690 psf->sf.format = SF_FORMAT_WAV | SF_FORMAT_NMS_ADPCM_16 ; in wav_read_header()
693 psf->sf.format = SF_FORMAT_WAV | SF_FORMAT_NMS_ADPCM_24 ; in wav_read_header()
696 psf->sf.format = SF_FORMAT_WAV | SF_FORMAT_NMS_ADPCM_32 ; in wav_read_header()
705 psf->sf.format = SF_FORMAT_WAV | u_bitwidth_to_subformat (psf->bytewidth * 8) ; in wav_read_header()
710 psf->sf.format = (SF_FORMAT_WAV | SF_FORMAT_ULAW) ; in wav_read_header()
715 psf->sf.format = (SF_FORMAT_WAV | SF_FORMAT_ALAW) ; in wav_read_header()
719 psf->sf.format = (SF_FORMAT_WAV | SF_FORMAT_MS_ADPCM) ; in wav_read_header()
725 psf->sf.format = (SF_FORMAT_WAV | SF_FORMAT_IMA_ADPCM) ; in wav_read_header()
731 psf->sf.format = (SF_FORMAT_WAV | SF_FORMAT_GSM610) ; in wav_read_header()
735 psf->sf.format = SF_FORMAT_WAV ; in wav_read_header()
736 psf->sf.format |= (psf->bytewidth == 8) ? SF_FORMAT_DOUBLE : SF_FORMAT_FLOAT ; in wav_read_header()
740 psf->sf.format = SF_FORMAT_WAV | SF_FORMAT_G721_32 ; in wav_read_header()
751 psf->sf.format |= SF_ENDIAN_BIG ; in wav_read_header()
760 subformat = SF_CODEC (psf->sf.format) ; in wav_write_fmt_chunk()
770 …f, "4224", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_PCM), BHW2 (psf->sf.channels), BHW4 (psf->sf.sampler… in wav_write_fmt_chunk()
772 … psf_binheader_writef (psf, "4", BHW4 (psf->sf.samplerate * psf->bytewidth * psf->sf.channels)) ; in wav_write_fmt_chunk()
774 …psf_binheader_writef (psf, "22", BHW2 (psf->bytewidth * psf->sf.channels), BHW2 (psf->bytewidth * … in wav_write_fmt_chunk()
782 …4", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_IEEE_FLOAT), BHW2 (psf->sf.channels), BHW4 (psf->sf.sampler… in wav_write_fmt_chunk()
784 … psf_binheader_writef (psf, "4", BHW4 (psf->sf.samplerate * psf->bytewidth * psf->sf.channels)) ; in wav_write_fmt_chunk()
786 …psf_binheader_writef (psf, "22", BHW2 (psf->bytewidth * psf->sf.channels), BHW2 (psf->bytewidth * … in wav_write_fmt_chunk()
795 … "4224", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_MULAW), BHW2 (psf->sf.channels), BHW4 (psf->sf.sampler… in wav_write_fmt_chunk()
797 … psf_binheader_writef (psf, "4", BHW4 (psf->sf.samplerate * psf->bytewidth * psf->sf.channels)) ; in wav_write_fmt_chunk()
799 … psf_binheader_writef (psf, "222", BHW2 (psf->bytewidth * psf->sf.channels), BHW2 (8), BHW2 (0)) ; in wav_write_fmt_chunk()
808 …, "4224", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_ALAW), BHW2 (psf->sf.channels), BHW4 (psf->sf.sampler… in wav_write_fmt_chunk()
810 … psf_binheader_writef (psf, "4", BHW4 (psf->sf.samplerate * psf->bytewidth * psf->sf.channels)) ; in wav_write_fmt_chunk()
812 … psf_binheader_writef (psf, "222", BHW2 (psf->bytewidth * psf->sf.channels), BHW2 (8), BHW2 (0)) ; in wav_write_fmt_chunk()
821 blockalign = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ; in wav_write_fmt_chunk()
822 framesperblock = 2 * (blockalign - 4 * psf->sf.channels) / psf->sf.channels + 1 ; in wav_write_fmt_chunk()
823 bytespersec = (psf->sf.samplerate * blockalign) / framesperblock ; in wav_write_fmt_chunk()
830 BHW2 (psf->sf.channels), BHW4 (psf->sf.samplerate), BHW4 (bytespersec)) ; in wav_write_fmt_chunk()
842 blockalign = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ; in wav_write_fmt_chunk()
843 framesperblock = 2 + 2 * (blockalign - 7 * psf->sf.channels) / psf->sf.channels ; in wav_write_fmt_chunk()
844 bytespersec = (psf->sf.samplerate * blockalign) / framesperblock ; in wav_write_fmt_chunk()
851 …psf_binheader_writef (psf, "422", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_MS_ADPCM), BHW2 (psf->sf.chan… in wav_write_fmt_chunk()
854 psf_binheader_writef (psf, "44", BHW4 (psf->sf.samplerate), BHW4 (bytespersec)) ; in wav_write_fmt_chunk()
872 …BHW2 (psf->sf.channels), BHW4 (psf->sf.samplerate), BHW4 (psf->sf.samplerate * psf->sf.channels / … in wav_write_fmt_chunk()
887 bytespersec = psf->sf.samplerate * blockalign / 160 ; in wav_write_fmt_chunk()
894 BHW2 (psf->sf.channels), BHW4 (psf->sf.samplerate)) ; in wav_write_fmt_chunk()
909 bytespersec = (psf->sf.samplerate * blockalign) / framesperblock ; in wav_write_fmt_chunk()
915 …psf_binheader_writef (psf, "422", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_GSM610), BHW2 (psf->sf.channe… in wav_write_fmt_chunk()
918 psf_binheader_writef (psf, "44", BHW4 (psf->sf.samplerate), BHW4 (bytespersec)) ; in wav_write_fmt_chunk()
931 psf_binheader_writef (psf, "tm48", BHWm (fact_MARKER), BHW4 (4), BHW8 (psf->sf.frames)) ; in wav_write_fmt_chunk()
944 subformat = SF_CODEC (psf->sf.format) ; in wavex_write_fmt_chunk()
959 …4", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_EXTENSIBLE), BHW2 (psf->sf.channels), BHW4 (psf->sf.sampler… in wavex_write_fmt_chunk()
961 psf_binheader_writef (psf, "4", BHW4 (psf->sf.samplerate * psf->bytewidth * psf->sf.channels)) ; in wavex_write_fmt_chunk()
963 …psf_binheader_writef (psf, "22", BHW2 (psf->bytewidth * psf->sf.channels), BHW2 (psf->bytewidth * … in wavex_write_fmt_chunk()
984 switch (psf->sf.channels) in wavex_write_fmt_chunk()
1053 psf_binheader_writef (psf, "tm48", BHWm (fact_MARKER), BHW4 (4), BHW8 (psf->sf.frames)) ; in wavex_write_fmt_chunk()
1076 else if (psf->bytewidth > 0 && psf->sf.seekable == SF_TRUE) in wav_write_header()
1077 psf->datalength = psf->sf.frames * psf->bytewidth * psf->sf.channels ; in wav_write_header()
1102 switch (SF_CONTAINER (psf->sf.format)) in wav_write_header()
1147 tmp = (int) (1.0e9 / psf->sf.samplerate) ; /* Sample period in nano seconds */ in wav_write_header()
1208 if (psf->bytewidth > 0 && psf->sf.seekable == SF_TRUE) in wav_write_tailer()
1209 { psf->datalength = psf->sf.frames * psf->bytewidth * psf->sf.channels ; in wav_write_tailer()
1270 if ((SF_CONTAINER (psf->sf.format)) == SF_FORMAT_WAVEX) in wav_command()
1284 wpriv->wavex_channelmask = wavlike_gen_channel_mask (psf->channel_map, psf->sf.channels) ; in wav_command()