load_ogg.c
changeset 561 87bdb4c81c0b
parent 518 8bc9b5fd2aae
child 601 05123263dab3
equal deleted inserted replaced
560:0fc8dffb86c5 561:87bdb4c81c0b
   111     spec->samples = 4096; /* buffer size */
   111     spec->samples = 4096; /* buffer size */
   112     
   112     
   113     samples = (long)vorbis.ov_pcm_total(&vf, -1);
   113     samples = (long)vorbis.ov_pcm_total(&vf, -1);
   114 
   114 
   115     *audio_len = spec->size = samples * spec->channels * 2;
   115     *audio_len = spec->size = samples * spec->channels * 2;
   116     *audio_buf = malloc(*audio_len);
   116     *audio_buf = SDL_malloc(*audio_len);
   117     if (*audio_buf == NULL)
   117     if (*audio_buf == NULL)
   118         goto done;
   118         goto done;
   119 
   119 
   120     buf = *audio_buf;
   120     buf = *audio_buf;
   121     to_read = *audio_len;
   121     to_read = *audio_len;