SoundBackendSDL.h 644 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef SOUND_BACKEND_SDL_HH__
  2. #define SOUND_BACKEND_SDL_HH__
  3. //#include <SDL/SDL.h>
  4. #include "common/TypeDefine.h"
  5. #include "../SoundBackend.h"
  6. #include <stdint.h>
  7. class SoundBackendSDL : public SoundBackend
  8. {
  9. private:
  10. struct FillAudioContext
  11. {
  12. uint8_t *buffer;
  13. uint32_t buffer_size;
  14. uint32_t play_length;
  15. };
  16. FillAudioContext m_Context;
  17. friend void sound_manager_fill_audio(void *arg_user_data, unsigned char *arg_stream, int arg_length);
  18. public:
  19. SoundBackendSDL();
  20. virtual ~SoundBackendSDL();
  21. virtual u32 GetBytesBuffered();
  22. virtual void FeedStreamData(u8 *arg_data, u32 arg_length);
  23. };
  24. #endif