123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #pragma once
- #include <GSLDateiV.h>
- #include <Datei.h>
- using namespace Framework;
- struct WAVKopf
- {
- char riff[4];
- unsigned int datGr;
- char wav[4];
- };
- struct WAVFormat
- {
- char fmt[4];
- int fmtLän;
- short tag;
- unsigned short channels;
- unsigned int sampleRate;
- unsigned int bytesPerSec;
- unsigned short blockAlign;
- unsigned short bitsPerSample;
- };
- struct WAVDBeg
- {
- char data[4];
- int län;
- };
- class WAVDatei : public GSL::GSLSoundV
- {
- private:
- WAVKopf kpf;
- WAVFormat fmt;
- WAVDBeg dBeg;
- int pos;
- Datei d;
- public:
- // Konstruktor
- WAVDatei();
- // nicht constant
- bool lade(const char* pfad);
- // GSL
- void playSound() override
- {}
- void setPause(bool p) override
- {}
- void stopSound() override
- {}
- void warteAufSound(int zeit) override
- {}
- // Lautstärke: 0 - 0xFFFF
- void setVolume(unsigned int links, unsigned int rechts) override
- {}
- // zum Speichern
- void open() override;
- int getDaten(char* buffer, int län) override;
- void close() override;
- bool istMono() const override;
- int getSampleRate() const override;
- __int64 getDatLength() const override;
- };
|