Mercurial > SDL_sound_CoreAudio
comparison extra_rwops.h @ 485:137c0b00ea4c
Added Sound_NewSampleFromMem(), and implementation of RWops pooling.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 27 Feb 2005 19:53:25 +0000 |
parents | 47cc2de2ae36 |
children | c7ab783f05d3 |
comparison
equal
deleted
inserted
replaced
484:1c09756bc038 | 485:137c0b00ea4c |
---|---|
59 SDL_RWops *RWops_RWRefCounter_new(SDL_RWops *rw); | 59 SDL_RWops *RWops_RWRefCounter_new(SDL_RWops *rw); |
60 | 60 |
61 /* Increment a reference counting RWops's refcount by one. */ | 61 /* Increment a reference counting RWops's refcount by one. */ |
62 void RWops_RWRefCounter_addRef(SDL_RWops *rw); | 62 void RWops_RWRefCounter_addRef(SDL_RWops *rw); |
63 | 63 |
64 | |
65 /* | |
66 * RWops pooling. This is to reduce malloc() pressure for audio that is | |
67 * placed into Sound_Samples over and over again. | |
68 */ | |
69 | |
70 /* Call this first. */ | |
71 int RWops_pooled_init(void); | |
72 | |
73 /* Call this last. */ | |
74 int RWops_pooled_deinit(void); | |
75 | |
76 /* Get a new RWops, allocating if needed. */ | |
77 SDL_RWops *RWops_pooled_alloc(void); | |
78 | |
79 /* Return a RWops to the pool for reuse. */ | |
80 void RWops_pooled_free(SDL_RWops *rw) | |
81 | |
64 #ifdef __cplusplus | 82 #ifdef __cplusplus |
65 } | 83 } |
66 #endif | 84 #endif |
67 | 85 |
68 #endif /* !defined _INCLUDE_EXTRA_RWOPS_H_ */ | 86 #endif /* !defined _INCLUDE_EXTRA_RWOPS_H_ */ |