GSLDatei.h 1.2 KB

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