Lines Matching refs:soundinfo

97 typedef int (*lpFunc6)(u8 *path, SOUNDINFO *soundinfo);
98 typedef int (*lpFunc7)(u8 *path, SOUNDINFO *soundinfo, void *dest);
577 void encode_soundfile(char *path, SOUNDINFO *soundinfo) in encode_soundfile() argument
585 soundbuffer = malloc(soundinfo->bufferLength); in encode_soundfile()
586 outputbuffer = malloc(getBytesForAdpcmBuffer(soundinfo->samples)); in encode_soundfile()
599 dspadpcmheader.num_samples = reverse_endian_32(soundinfo->samples); in encode_soundfile()
600 dspadpcmheader.num_adpcm_nibbles = reverse_endian_32(getNibblesForNSamples(soundinfo->samples)); in encode_soundfile()
601 dspadpcmheader.sample_rate = reverse_endian_32(soundinfo->sampleRate); in encode_soundfile()
619 else if (soundinfo->loopEnd) // the sound info has loops form AIFF in encode_soundfile()
623 nibbleLoopStart = getNibbleAddress(soundinfo->loopStart); in encode_soundfile()
624 nibbleLoopEnd = getNibbleAddress(soundinfo->loopEnd - 1); // AIFF loop end is 1 based in encode_soundfile()
643 nibbleLoopEnd = getNibbleAddress(soundinfo->samples - 1); in encode_soundfile()
654 getSoundSamples(path, soundinfo, soundbuffer); in encode_soundfile()
658 encode(soundbuffer, outputbuffer, &adpcminfo, soundinfo->samples); in encode_soundfile()
664 else if (soundinfo->loopEnd) in encode_soundfile()
665 getLoopContext(outputbuffer, &adpcminfo, soundinfo->loopStart); in encode_soundfile()
699 fwrite(outputbuffer, getBytesForAdpcmSamples(soundinfo->samples), sizeof(u8), output_file); in encode_soundfile()
716 SOUNDINFO soundinfo; in encode_input_file() local
720 switch (getSoundInfo(input_path, &soundinfo)) in encode_input_file()
724 if (soundinfo.bitsPerSample != 16) in encode_input_file()
730 if (soundinfo.channels != 1) in encode_input_file()
736 encode_soundfile(input_path, &soundinfo); in encode_input_file()
780 SOUNDINFO soundinfo; in decode_input_file() local
818 soundinfo.bitsPerSample = 16; in decode_input_file()
819 soundinfo.bufferLength = samples * 2; in decode_input_file()
820 soundinfo.channels = 1; in decode_input_file()
821 soundinfo.sampleRate = sampleRate; in decode_input_file()
822 soundinfo.samples = samples; in decode_input_file()
826 soundinfo.loopStart = getSampleForAdpcmNibble(reverse_endian_32(dspadpcmheader.sa)); in decode_input_file()
827soundinfo.loopEnd = getSampleForAdpcmNibble(reverse_endian_32(dspadpcmheader.ea)) + 1; in decode_input_file()
831 soundinfo.loopStart = 0; in decode_input_file()
832 soundinfo.loopEnd = 0; in decode_input_file()
841 writeWaveFile(output_path, &soundinfo, outputBuffer); in decode_input_file()
847 writeAiffFile(output_path, &soundinfo, outputBuffer); in decode_input_file()