GSLDatei.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef GSLDatei_H
  2. #define GSLDatei_H
  3. #include <Text.h>
  4. #include <Array.h>
  5. #include <Datei.h>
  6. #include <Critical.h>
  7. #include "Include/GSLDateiV.h"
  8. using namespace Framework;
  9. namespace GSL
  10. {
  11. struct SoundKopf
  12. {
  13. Text name;
  14. char channels;
  15. unsigned int sampleRate = 0;
  16. __int64 datPos = 0;
  17. __int64 datEnd = 0;
  18. Text pfad;
  19. };
  20. class GSLDatei : public GSLDateiV
  21. {
  22. private:
  23. Array< SoundKopf >* sounds;
  24. Text* pfad;
  25. Critical cs;
  26. public:
  27. // Konstruktor
  28. GSLDatei();
  29. // Destruktor
  30. ~GSLDatei();
  31. // Datei open
  32. void setDatei(Framework::Text* txt) override;
  33. void setDatei(const char* txt) override;
  34. bool leseDaten() override;
  35. int getSoundAnzahl() override;
  36. Text* getSoundName(int num) override;
  37. // Laden
  38. GSLSoundV* getSound(Framework::Text* name) override;
  39. GSLSoundV* getSound(const char* name) override;
  40. // Speichern
  41. bool speicherSound(GSLSoundV* zSound, Framework::Text* name) override;
  42. bool speicherSound(GSLSoundV* zSound, const char* name) override;
  43. // Löschen
  44. bool removeSound(Framework::Text* name) override;
  45. bool removeSound(const char* name) override;
  46. };
  47. }
  48. #endif