Lines Matching refs:soundinfo

82 typedef int (*lpFunc6)(u8 *path, SOUNDINFO *soundinfo);
83 typedef int (*lpFunc7)(u8 *path, SOUNDINFO *soundinfo, void *dest);
567 void encode_soundfile(char *path, SOUNDINFO *soundinfo) in encode_soundfile() argument
575 soundbuffer = malloc(soundinfo->bufferLength); in encode_soundfile()
576 outputbuffer = malloc(getBytesForAdpcmBuffer(soundinfo->samples)); 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()
609 else if (soundinfo->loopEnd) // the sound info has loops form AIFF in encode_soundfile()
613 nibbleLoopStart = getNibbleAddress(soundinfo->loopStart); in encode_soundfile()
614 nibbleLoopEnd = getNibbleAddress(soundinfo->loopEnd - 1); // AIFF loop end is 1 based in encode_soundfile()
633 nibbleLoopEnd = getNibbleAddress(soundinfo->samples - 1); in encode_soundfile()
644 getSoundSamples(path, soundinfo, soundbuffer); in encode_soundfile()
648 encode(soundbuffer, outputbuffer, &adpcminfo, soundinfo->samples); in encode_soundfile()
654 else if (soundinfo->loopEnd) in encode_soundfile()
655 getLoopContext(outputbuffer, &adpcminfo, soundinfo->loopStart); in encode_soundfile()
689 fwrite(outputbuffer, getBytesForAdpcmSamples(soundinfo->samples), sizeof(u8), output_file); in encode_soundfile()
706 SOUNDINFO soundinfo; in encode_input_file() local
710 switch (getSoundInfo(input_path, &soundinfo)) in encode_input_file()
714 if (soundinfo.bitsPerSample != 16) in encode_input_file()
720 if (soundinfo.channels != 1) in encode_input_file()
726 encode_soundfile(input_path, &soundinfo); in encode_input_file()
770 SOUNDINFO soundinfo; in decode_input_file() local
808 soundinfo.bitsPerSample = 16; in decode_input_file()
809 soundinfo.bufferLength = samples * 2; in decode_input_file()
810 soundinfo.channels = 1; in decode_input_file()
811 soundinfo.sampleRate = sampleRate; in decode_input_file()
812 soundinfo.samples = samples; in decode_input_file()
816 soundinfo.loopStart = getSampleForAdpcmNibble(reverse_endian_32(dspadpcmheader.sa)); in decode_input_file()
817soundinfo.loopEnd = getSampleForAdpcmNibble(reverse_endian_32(dspadpcmheader.ea)) + 1; in decode_input_file()
821 soundinfo.loopStart = 0; in decode_input_file()
822 soundinfo.loopEnd = 0; in decode_input_file()
831 writeWaveFile(output_path, &soundinfo, outputBuffer); in decode_input_file()
837 writeAiffFile(output_path, &soundinfo, outputBuffer); in decode_input_file()