Annotation of nono/host/sounddriver_wav.h, revision 1.1

1.1     ! root        1: //
        !             2: // nono
        !             3: // Copyright (C) 2021 nono project
        !             4: // Licensed under nono-license.txt
        !             5: //
        !             6: 
        !             7: //
        !             8: // サウンドの Wav ドライバ
        !             9: //
        !            10: 
        !            11: #pragma once
        !            12: 
        !            13: #include "sounddriver.h"
        !            14: 
        !            15: class SoundDriverWav : public SoundDriver
        !            16: {
        !            17:        using inherited = SoundDriver;
        !            18:  public:
        !            19:        explicit SoundDriverWav(HostDevice *hostdev_);
        !            20:        ~SoundDriverWav() override;
        !            21: 
        !            22:        bool InitDriver(bool startup = true) override;
        !            23: 
        !            24:        void Write(const int16 *) override;
        !            25: 
        !            26:        void MonitorUpdateMD(TextScreen&, int y) override;
        !            27: 
        !            28:  private:
        !            29:        bool OpenWav();
        !            30:        void CloseWav();
        !            31: 
        !            32:        void fwrite4LE(FILE *, uint32 val);
        !            33: 
        !            34:        FILE *fp {};
        !            35: 
        !            36:        // 出力 WAV ファイルのファイル名部分
        !            37:        std::string filename {};
        !            38: 
        !            39:        // 書き込んだバイト数
        !            40:        uint32 databytes {};
        !            41: 
        !            42:        // バイトスワップ用のバッファ
        !            43:        std::vector<int16> le16buf {};
        !            44: 
        !            45:        static const uint8 wav_header[0x2c];
        !            46: };

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.