ACMEncoder.h 961 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef NULLSOFT_ENC_ACM_ACMENCODER_H
  2. #define NULLSOFT_ENC_ACM_ACMENCODER_H
  3. #include <windows.h>
  4. #include <mmreg.h>
  5. #include <msacm.h>
  6. #include "../nsv/enc_if.h"
  7. #include "Config.h"
  8. #include "Finisher.h"
  9. class ACMEncoder : public AudioCommon
  10. {
  11. public:
  12. ACMEncoder(int srate, int nch, int bps, ACMConfig *config);
  13. virtual ~ACMEncoder();
  14. virtual int Encode(int framepos, void *in, int in_avail, int *in_used, void *out, int out_avail);
  15. void FinishAudio(const wchar_t *filename);
  16. int GetLastError();
  17. int m_did_header;
  18. int m_nch, m_srate, m_bps;
  19. int m_bytes_done;
  20. int m_error;
  21. int m_hlen;
  22. int m_nsam;
  23. EXT_WFX m_convert_wfx;
  24. WAVEFORMATEX m_wfx_src;
  25. HACMSTREAM hStream, hStreamResample;
  26. ACMSTREAMHEADER ahd, ahdResample;
  27. unsigned char *m_acm_buf, *m_acm_outbuf;
  28. int m_bytes_inbuf, m_bytes_outbuf;
  29. unsigned char *m_acm_resample_buf, *m_acm_resample_outbuf;
  30. int m_bytes_inbuf_resample, m_bytes_outbuf_resample;
  31. bool do_header;
  32. };
  33. #endif