• Home
  • Raw
  • Download

Lines Matching refs:sf

182 	subformat = SF_CODEC (psf->sf.format) ;  in wav_open()
190 format = SF_CONTAINER (psf->sf.format) ; in wav_open()
194 psf->blockwidth = psf->bytewidth * psf->sf.channels ; in wav_open()
197 psf->endian = SF_ENDIAN (psf->sf.format) ; in wav_open()
207 psf->sf.frames = 0 ; in wav_open()
219 { blockalign = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ; in wav_open()
227 { if ((psf->peak_info = peak_info_calloc (psf->sf.channels)) == NULL) in wav_open()
438 if (! psf->sf.seekable || psf->dataoffset < 0) in wav_read_header()
655 if (! psf->sf.seekable && (parsestage & HAVE_data)) in wav_read_header()
667 if (psf->sf.channels < 1) in wav_read_header()
670 if (psf->sf.channels > SF_MAX_CHANNELS) in wav_read_header()
696 psf->sf.frames = (psf->filelength - psf->dataoffset) / psf->blockwidth ; in wav_read_header()
698 psf->sf.frames = psf->datalength / psf->blockwidth ; in wav_read_header()
703 if (psf->sf.format == (SF_FORMAT_WAVEX | SF_FORMAT_MS_ADPCM)) in wav_read_header()
712 psf->sf.format = SF_FORMAT_WAV | SF_FORMAT_NMS_ADPCM_16 ; in wav_read_header()
715 psf->sf.format = SF_FORMAT_WAV | SF_FORMAT_NMS_ADPCM_24 ; in wav_read_header()
718 psf->sf.format = SF_FORMAT_WAV | SF_FORMAT_NMS_ADPCM_32 ; in wav_read_header()
727 psf->sf.format = SF_FORMAT_WAV | u_bitwidth_to_subformat (psf->bytewidth * 8) ; in wav_read_header()
732 psf->sf.format = (SF_FORMAT_WAV | SF_FORMAT_ULAW) ; in wav_read_header()
737 psf->sf.format = (SF_FORMAT_WAV | SF_FORMAT_ALAW) ; in wav_read_header()
741 psf->sf.format = (SF_FORMAT_WAV | SF_FORMAT_MS_ADPCM) ; in wav_read_header()
747 psf->sf.format = (SF_FORMAT_WAV | SF_FORMAT_IMA_ADPCM) ; in wav_read_header()
753 psf->sf.format = (SF_FORMAT_WAV | SF_FORMAT_GSM610) ; in wav_read_header()
757 psf->sf.format = SF_FORMAT_WAV ; in wav_read_header()
758 psf->sf.format |= (psf->bytewidth == 8) ? SF_FORMAT_DOUBLE : SF_FORMAT_FLOAT ; in wav_read_header()
762 psf->sf.format = SF_FORMAT_WAV | SF_FORMAT_G721_32 ; in wav_read_header()
766 psf->sf.format = SF_FORMAT_WAV | SF_FORMAT_MPEG_LAYER_III ; in wav_read_header()
768 psf->sf.frames = fact_chunk.frames ; in wav_read_header()
779 psf->sf.format |= SF_ENDIAN_BIG ; in wav_read_header()
788 subformat = SF_CODEC (psf->sf.format) ; in wav_write_fmt_chunk()
798 …f, "4224", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_PCM), BHW2 (psf->sf.channels), BHW4 (psf->sf.sampler… in wav_write_fmt_chunk()
800 … psf_binheader_writef (psf, "4", BHW4 (psf->sf.samplerate * psf->bytewidth * psf->sf.channels)) ; in wav_write_fmt_chunk()
802 …psf_binheader_writef (psf, "22", BHW2 (psf->bytewidth * psf->sf.channels), BHW2 (psf->bytewidth * … in wav_write_fmt_chunk()
810 …4", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_IEEE_FLOAT), BHW2 (psf->sf.channels), BHW4 (psf->sf.sampler… in wav_write_fmt_chunk()
812 … psf_binheader_writef (psf, "4", BHW4 (psf->sf.samplerate * psf->bytewidth * psf->sf.channels)) ; in wav_write_fmt_chunk()
814 …psf_binheader_writef (psf, "22", BHW2 (psf->bytewidth * psf->sf.channels), BHW2 (psf->bytewidth * … in wav_write_fmt_chunk()
823 … "4224", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_MULAW), BHW2 (psf->sf.channels), BHW4 (psf->sf.sampler… in wav_write_fmt_chunk()
825 … psf_binheader_writef (psf, "4", BHW4 (psf->sf.samplerate * psf->bytewidth * psf->sf.channels)) ; in wav_write_fmt_chunk()
827 … psf_binheader_writef (psf, "222", BHW2 (psf->bytewidth * psf->sf.channels), BHW2 (8), BHW2 (0)) ; in wav_write_fmt_chunk()
836 …, "4224", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_ALAW), BHW2 (psf->sf.channels), BHW4 (psf->sf.sampler… in wav_write_fmt_chunk()
838 … psf_binheader_writef (psf, "4", BHW4 (psf->sf.samplerate * psf->bytewidth * psf->sf.channels)) ; in wav_write_fmt_chunk()
840 … psf_binheader_writef (psf, "222", BHW2 (psf->bytewidth * psf->sf.channels), BHW2 (8), BHW2 (0)) ; in wav_write_fmt_chunk()
849 blockalign = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ; in wav_write_fmt_chunk()
850 framesperblock = 2 * (blockalign - 4 * psf->sf.channels) / psf->sf.channels + 1 ; in wav_write_fmt_chunk()
851 bytespersec = (psf->sf.samplerate * blockalign) / framesperblock ; in wav_write_fmt_chunk()
858 BHW2 (psf->sf.channels), BHW4 (psf->sf.samplerate), BHW4 (bytespersec)) ; in wav_write_fmt_chunk()
870 blockalign = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ; in wav_write_fmt_chunk()
871 framesperblock = 2 + 2 * (blockalign - 7 * psf->sf.channels) / psf->sf.channels ; in wav_write_fmt_chunk()
872 bytespersec = (psf->sf.samplerate * blockalign) / framesperblock ; in wav_write_fmt_chunk()
879 …psf_binheader_writef (psf, "422", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_MS_ADPCM), BHW2 (psf->sf.chan… in wav_write_fmt_chunk()
882 psf_binheader_writef (psf, "44", BHW4 (psf->sf.samplerate), BHW4 (bytespersec)) ; in wav_write_fmt_chunk()
900 …BHW2 (psf->sf.channels), BHW4 (psf->sf.samplerate), BHW4 (psf->sf.samplerate * psf->sf.channels / … in wav_write_fmt_chunk()
915 bytespersec = psf->sf.samplerate * blockalign / 160 ; in wav_write_fmt_chunk()
922 BHW2 (psf->sf.channels), BHW4 (psf->sf.samplerate)) ; in wav_write_fmt_chunk()
937 bytespersec = (psf->sf.samplerate * blockalign) / framesperblock ; in wav_write_fmt_chunk()
943 …psf_binheader_writef (psf, "422", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_GSM610), BHW2 (psf->sf.channe… in wav_write_fmt_chunk()
946 psf_binheader_writef (psf, "44", BHW4 (psf->sf.samplerate), BHW4 (bytespersec)) ; in wav_write_fmt_chunk()
965 blocksize = (1152 * bytespersec) / psf->sf.samplerate ; in wav_write_fmt_chunk()
981 samplesperblock = psf->sf.samplerate >= 32000 ? 1152 : 576 ; in wav_write_fmt_chunk()
992 …ader_writef (psf, "422", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_MPEGLAYER3), BHW2 (psf->sf.channels)) ; in wav_write_fmt_chunk()
995 psf_binheader_writef (psf, "44", BHW4 (psf->sf.samplerate), BHW4 (bytespersec)) ; in wav_write_fmt_chunk()
1012 psf_binheader_writef (psf, "tm48", BHWm (fact_MARKER), BHW4 (4), BHW8 (psf->sf.frames)) ; in wav_write_fmt_chunk()
1025 subformat = SF_CODEC (psf->sf.format) ; in wavex_write_fmt_chunk()
1040 …4", BHW4 (fmt_size), BHW2 (WAVE_FORMAT_EXTENSIBLE), BHW2 (psf->sf.channels), BHW4 (psf->sf.sampler… in wavex_write_fmt_chunk()
1042 psf_binheader_writef (psf, "4", BHW4 (psf->sf.samplerate * psf->bytewidth * psf->sf.channels)) ; in wavex_write_fmt_chunk()
1044 …psf_binheader_writef (psf, "22", BHW2 (psf->bytewidth * psf->sf.channels), BHW2 (psf->bytewidth * … in wavex_write_fmt_chunk()
1065 switch (psf->sf.channels) in wavex_write_fmt_chunk()
1134 psf_binheader_writef (psf, "tm48", BHWm (fact_MARKER), BHW4 (4), BHW8 (psf->sf.frames)) ; in wavex_write_fmt_chunk()
1157 else if (psf->bytewidth > 0 && psf->sf.seekable == SF_TRUE) in wav_write_header()
1158 psf->datalength = psf->sf.frames * psf->bytewidth * psf->sf.channels ; in wav_write_header()
1183 switch (SF_CONTAINER (psf->sf.format)) in wav_write_header()
1228 tmp = (int) (1.0e9 / psf->sf.samplerate) ; /* Sample period in nano seconds */ in wav_write_header()
1289 if (psf->bytewidth > 0 && psf->sf.seekable == SF_TRUE) in wav_write_tailer()
1290 { psf->datalength = psf->sf.frames * psf->bytewidth * psf->sf.channels ; in wav_write_tailer()
1351 if ((SF_CONTAINER (psf->sf.format)) == SF_FORMAT_WAVEX) in wav_command()
1365 wpriv->wavex_channelmask = wavlike_gen_channel_mask (psf->channel_map, psf->sf.channels) ; in wav_command()