0
0

Hi,

when I write some WAV files (from other MP3, FLAC, … files) in a format that isn’t PCM16 under Mac OS X PPC (really, Rosetta emulation), I get files with noise or silence only. Moreover, I can’t play any files not in PCM16 format.

With x86 there are no problems, I can export/play in/from any formats.
FMOD Ex 4.06.18

  • You must to post comments
0
0

Its more likely the way you are writing out your wave files. What formats are you writing out and how are you writing the data.

  • You must to post comments
0
0

This is a sample code:

on x86 works with any FMOD_SOUND_FORMAT;
on PPC works with FMOD_SOUND_FORMAT_PCM16 only (NO FMOD errors, but "output.wav" is broken).

Notes:
"waves.mp3" is in the examples/media;
ERRCHECK is the same function from examples.
FMOD Ex 4.06.19

[code:32engvcm]
int main (int argc, const char * argv[]) {

    FMOD_SYSTEM *fmod_sys_write;
    FMOD_CHANNEL    *fmod_chn_write;
    FMOD_SOUND      *fmod_snd_write;
    FMOD_BOOL       writing = 1;
    FMOD_RESULT     result;

    unsigned int    write_tot_ms, write_position;
    float           write_percentage;

    /* set system */
    result = FMOD_System_Create(&fmod_sys_write);
    ERRCHECK(result);
    result = FMOD_System_SetOutput(fmod_sys_write, FMOD_OUTPUTTYPE_WAVWRITER_NRT);
    ERRCHECK(result);
    result = FMOD_System_SetSoftwareFormat(fmod_sys_write, 48000, FMOD_SOUND_FORMAT_PCMFLOAT, 0, 0, FMOD_DSP_RESAMPLER_SPLINE);
    ERRCHECK(result);
    result = FMOD_System_Init(fmod_sys_write, 32, FMOD_INIT_STREAM_FROM_UPDATE, "output.wav");
    ERRCHECK(result);

    /* set sound */
    result = FMOD_System_CreateStream(fmod_sys_write, "wave.mp3", FMOD_2D | FMOD_SOFTWARE | FMOD_LOWMEM | FMOD_UNIQUE, 0, &fmod_snd_write);
    ERRCHECK(result);
    result = FMOD_Sound_GetLength(fmod_snd_write, &write_tot_ms, FMOD_TIMEUNIT_MS);
    ERRCHECK(result);
    FMOD_System_PlaySound(fmod_sys_write, FMOD_CHANNEL_REUSE, fmod_snd_write, 0, &fmod_chn_write);
    ERRCHECK(result);

    /* write */
    while (writing) {
        result = FMOD_System_Update(fmod_sys_write);
        ERRCHECK(result);
        result = FMOD_Channel_GetPosition(fmod_chn_write, &write_position, FMOD_TIMEUNIT_MS);
        ERRCHECK(result);

        write_percentage = ((float) write_position / write_tot_ms) * 100;
        printf("\rWriting: %f", write_percentage);

        result = FMOD_Channel_IsPlaying(fmod_chn_write, &writing);
    }

    /* release */
    FMOD_System_Release(fmod_sys_write);

return 0;

}
[/code:32engvcm]

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.