SoundBlockList.h 810 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef NULLSOFT_OUT_DS_SOUNDBLOCKLIST_H
  2. #define NULLSOFT_OUT_DS_SOUNDBLOCKLIST_H
  3. #include "SoundBlock.h"
  4. class SoundBlockList
  5. {
  6. public:
  7. SoundBlockList(int sil);
  8. ~SoundBlockList();
  9. void AddBlock(void * data, size_t size);
  10. size_t DumpBlocks(void * out1, size_t size1);
  11. void Reset();
  12. size_t DataSize();
  13. private:
  14. void connect(SoundBlock * b1, SoundBlock * b2) {if (b1) b1->next = b2;if (b2) b2->prev = b1;}
  15. void advance(SoundBlock * &b);
  16. void goback(SoundBlock * &b);
  17. void mount(SoundBlock * &first, SoundBlock * add);
  18. void mount2(SoundBlock * &first, SoundBlock * add, SoundBlock * &last);
  19. SoundBlock * remove(SoundBlock * &list);
  20. SoundBlock * removelast(SoundBlock * &first, SoundBlock * &last);
  21. size_t data_buffered;
  22. SoundBlock *b_first, *b_last, *b_free;
  23. int silence_filler;
  24. };
  25. #endif