Mercurial > SDL_sound_CoreAudio
diff decoders/timidity/instrum_dls.c @ 459:4d2febf33dc7
Changed some SDL_Error()s to __Sound_SetError() to fix linking issues.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 10 Oct 2003 08:00:42 +0000 |
parents | 69c8ba97f4bd |
children | d02c00ce16d9 |
line wrap: on
line diff
--- a/decoders/timidity/instrum_dls.c Sun Oct 05 23:33:11 2003 +0000 +++ b/decoders/timidity/instrum_dls.c Fri Oct 10 08:00:42 2003 +0000 @@ -66,7 +66,7 @@ { RIFF_Chunk *chunk = (RIFF_Chunk *)malloc(sizeof(*chunk)); if ( !chunk ) { - SDL_Error(SDL_ENOMEM); + __Sound_SetError(ERR_OUT_OF_MEMORY); return NULL; } memset(chunk, 0, sizeof(*chunk)); @@ -179,18 +179,18 @@ chunk->magic = SDL_ReadLE32(src); chunk->length = SDL_ReadLE32(src); if ( chunk->magic != RIFF ) { - SDL_SetError("Not a RIFF file"); + __Sound_SetError("Not a RIFF file"); FreeRIFFChunk(chunk); return NULL; } chunk->data = (Uint8 *)malloc(chunk->length); if ( chunk->data == NULL ) { - SDL_Error(SDL_ENOMEM); + __Sound_SetError(ERR_OUT_OF_MEMORY); FreeRIFFChunk(chunk); return NULL; } if ( SDL_RWread(src, chunk->data, chunk->length, 1) != 1 ) { - SDL_Error(SDL_EFREAD); + __Sound_SetError(ERR_IO_ERROR); FreeRIFF(chunk); return NULL; } @@ -738,7 +738,7 @@ RIFF_Chunk *chunk; DLS_Data *data = (DLS_Data *)malloc(sizeof(*data)); if ( !data ) { - SDL_Error(SDL_ENOMEM); + __Sound_SetError(ERR_OUT_OF_MEMORY); return NULL; } memset(data, 0, sizeof(*data));