equal
deleted
inserted
replaced
18 |
18 |
19 /* Allocate a new FileEntry */ |
19 /* Allocate a new FileEntry */ |
20 FileEntry *AllocateFileEntry() |
20 FileEntry *AllocateFileEntry() |
21 { |
21 { |
22 if (_sound_count == GetSoundInternalPoolSize()) { |
22 if (_sound_count == GetSoundInternalPoolSize()) { |
23 if (!AddBlockToPool(&_SoundInternal_pool)) return NULL; |
23 if (!_SoundInternal_pool.AddBlockToPool()) return NULL; |
24 } |
24 } |
25 |
25 |
26 return GetSoundInternal(_sound_count++); |
26 return GetSoundInternal(_sound_count++); |
27 } |
27 } |
28 |
28 |
29 |
29 |
30 void InitializeSoundPool() |
30 void InitializeSoundPool() |
31 { |
31 { |
32 CleanPool(&_SoundInternal_pool); |
32 _SoundInternal_pool.CleanPool(); |
33 _sound_count = 0; |
33 _sound_count = 0; |
34 |
34 |
35 /* Copy original sound data to the pool */ |
35 /* Copy original sound data to the pool */ |
36 SndCopyToPool(); |
36 SndCopyToPool(); |
37 } |
37 } |