Lines Matching refs:dspadpcmheader
569 DSPADPCMHEADER dspadpcmheader; in encode_soundfile() local
587 memset(&dspadpcmheader, 0, sizeof(DSPADPCMHEADER)); in encode_soundfile()
589 dspadpcmheader.num_samples = reverse_endian_32(soundinfo->samples); in encode_soundfile()
590 …dspadpcmheader.num_adpcm_nibbles = reverse_endian_32(getNibblesForNSamples(soundinfo->samples)); in encode_soundfile()
591 dspadpcmheader.sample_rate = reverse_endian_32(soundinfo->sampleRate); in encode_soundfile()
603 dspadpcmheader.loop_flag = reverse_endian_16(VOICE_TYPE_LOOPED); in encode_soundfile()
604 dspadpcmheader.format = reverse_endian_16(DEC_MODE_ADPCM); in encode_soundfile()
605 dspadpcmheader.sa = reverse_endian_32(nibbleLoopStart); in encode_soundfile()
606 dspadpcmheader.ea = reverse_endian_32(nibbleLoopEnd); in encode_soundfile()
607 dspadpcmheader.ca = reverse_endian_32(nibbleCurrent); in encode_soundfile()
617 dspadpcmheader.loop_flag = reverse_endian_16(VOICE_TYPE_LOOPED); in encode_soundfile()
618 dspadpcmheader.format = reverse_endian_16(DEC_MODE_ADPCM); in encode_soundfile()
619 dspadpcmheader.sa = reverse_endian_32(nibbleLoopStart); in encode_soundfile()
620 dspadpcmheader.ea = reverse_endian_32(nibbleLoopEnd); in encode_soundfile()
621 dspadpcmheader.ca = reverse_endian_32(nibbleCurrent); in encode_soundfile()
637 dspadpcmheader.loop_flag = reverse_endian_16(VOICE_TYPE_NOTLOOPED); in encode_soundfile()
638 dspadpcmheader.format = reverse_endian_16(DEC_MODE_ADPCM); in encode_soundfile()
639 dspadpcmheader.sa = reverse_endian_32(nibbleLoopStart); in encode_soundfile()
640 dspadpcmheader.ea = reverse_endian_32(nibbleLoopEnd); in encode_soundfile()
641 dspadpcmheader.ca = reverse_endian_32(nibbleCurrent); in encode_soundfile()
661 dspadpcmheader.coef[0] = reverse_endian_16(adpcminfo.coef[0]); in encode_soundfile()
662 dspadpcmheader.coef[1] = reverse_endian_16(adpcminfo.coef[1]); in encode_soundfile()
663 dspadpcmheader.coef[2] = reverse_endian_16(adpcminfo.coef[2]); in encode_soundfile()
664 dspadpcmheader.coef[3] = reverse_endian_16(adpcminfo.coef[3]); in encode_soundfile()
665 dspadpcmheader.coef[4] = reverse_endian_16(adpcminfo.coef[4]); in encode_soundfile()
666 dspadpcmheader.coef[5] = reverse_endian_16(adpcminfo.coef[5]); in encode_soundfile()
667 dspadpcmheader.coef[6] = reverse_endian_16(adpcminfo.coef[6]); in encode_soundfile()
668 dspadpcmheader.coef[7] = reverse_endian_16(adpcminfo.coef[7]); in encode_soundfile()
669 dspadpcmheader.coef[8] = reverse_endian_16(adpcminfo.coef[8]); in encode_soundfile()
670 dspadpcmheader.coef[9] = reverse_endian_16(adpcminfo.coef[9]); in encode_soundfile()
671 dspadpcmheader.coef[10] = reverse_endian_16(adpcminfo.coef[10]); in encode_soundfile()
672 dspadpcmheader.coef[11] = reverse_endian_16(adpcminfo.coef[11]); in encode_soundfile()
673 dspadpcmheader.coef[12] = reverse_endian_16(adpcminfo.coef[12]); in encode_soundfile()
674 dspadpcmheader.coef[13] = reverse_endian_16(adpcminfo.coef[13]); in encode_soundfile()
675 dspadpcmheader.coef[14] = reverse_endian_16(adpcminfo.coef[14]); in encode_soundfile()
676 dspadpcmheader.coef[15] = reverse_endian_16(adpcminfo.coef[15]); in encode_soundfile()
677 dspadpcmheader.gain = reverse_endian_16(adpcminfo.gain); in encode_soundfile()
678 dspadpcmheader.ps = reverse_endian_16(adpcminfo.pred_scale); in encode_soundfile()
679 dspadpcmheader.yn1 = reverse_endian_16(adpcminfo.yn1); in encode_soundfile()
680 dspadpcmheader.yn2 = reverse_endian_16(adpcminfo.yn2); in encode_soundfile()
681 dspadpcmheader.lps = reverse_endian_16(adpcminfo.loop_pred_scale); in encode_soundfile()
682 dspadpcmheader.lyn1 = reverse_endian_16(adpcminfo.loop_yn1); in encode_soundfile()
683 dspadpcmheader.lyn2 = reverse_endian_16(adpcminfo.loop_yn2); in encode_soundfile()
688 fwrite(&dspadpcmheader, 1, sizeof(DSPADPCMHEADER), output_file); in encode_soundfile()
694 dump_header(&dspadpcmheader, coef_file); in encode_soundfile()
750 DSPADPCMHEADER dspadpcmheader; in decode_input_file() local
758 fread(&dspadpcmheader, 1, sizeof(DSPADPCMHEADER), input_file); in decode_input_file()
760 samples = reverse_endian_32(dspadpcmheader.num_samples); in decode_input_file()
761 sampleRate = reverse_endian_32(dspadpcmheader.sample_rate); in decode_input_file()
774 adpcminfo.coef[0] = (s16)reverse_endian_16(dspadpcmheader.coef[0]); in decode_input_file()
775 adpcminfo.coef[1] = (s16)reverse_endian_16(dspadpcmheader.coef[1]); in decode_input_file()
776 adpcminfo.coef[2] = (s16)reverse_endian_16(dspadpcmheader.coef[2]); in decode_input_file()
777 adpcminfo.coef[3] = (s16)reverse_endian_16(dspadpcmheader.coef[3]); in decode_input_file()
778 adpcminfo.coef[4] = (s16)reverse_endian_16(dspadpcmheader.coef[4]); in decode_input_file()
779 adpcminfo.coef[5] = (s16)reverse_endian_16(dspadpcmheader.coef[5]); in decode_input_file()
780 adpcminfo.coef[6] = (s16)reverse_endian_16(dspadpcmheader.coef[6]); in decode_input_file()
781 adpcminfo.coef[7] = (s16)reverse_endian_16(dspadpcmheader.coef[7]); in decode_input_file()
782 adpcminfo.coef[8] = (s16)reverse_endian_16(dspadpcmheader.coef[8]); in decode_input_file()
783 adpcminfo.coef[9] = (s16)reverse_endian_16(dspadpcmheader.coef[9]); in decode_input_file()
784 adpcminfo.coef[10] = (s16)reverse_endian_16(dspadpcmheader.coef[10]); in decode_input_file()
785 adpcminfo.coef[11] = (s16)reverse_endian_16(dspadpcmheader.coef[11]); in decode_input_file()
786 adpcminfo.coef[12] = (s16)reverse_endian_16(dspadpcmheader.coef[12]); in decode_input_file()
787 adpcminfo.coef[13] = (s16)reverse_endian_16(dspadpcmheader.coef[13]); in decode_input_file()
788 adpcminfo.coef[14] = (s16)reverse_endian_16(dspadpcmheader.coef[14]); in decode_input_file()
789 adpcminfo.coef[15] = (s16)reverse_endian_16(dspadpcmheader.coef[15]); in decode_input_file()
790 adpcminfo.gain = reverse_endian_16(dspadpcmheader.gain); in decode_input_file()
814 if (dspadpcmheader.loop_flag) in decode_input_file()
816 soundinfo.loopStart = getSampleForAdpcmNibble(reverse_endian_32(dspadpcmheader.sa)); in decode_input_file()
817 … soundinfo.loopEnd = getSampleForAdpcmNibble(reverse_endian_32(dspadpcmheader.ea)) + 1; in decode_input_file()
864 dump_header(&dspadpcmheader, coef_file); in decode_input_file()