StreamFileWin32.h 916 B

1234567891011121314151617181920212223
  1. #ifndef NULLSOFT_IN_FLAC_STREAMFILEWIN32_H
  2. #define NULLSOFT_IN_FLAC_STREAMFILEWIN32_H
  3. #include <FLAC/all.h>
  4. #include <windows.h>
  5. struct Win32_State
  6. {
  7. void *userData;
  8. HANDLE handle;
  9. bool endOfFile;
  10. };
  11. FLAC__StreamDecoderReadStatus Win32_Read(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data);
  12. FLAC__StreamDecoderSeekStatus Win32_Seek(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data);
  13. FLAC__StreamDecoderTellStatus Win32_Tell(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data);
  14. FLAC__StreamDecoderLengthStatus Win32_Length(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data);
  15. FLAC__bool Win32_EOF(const FLAC__StreamDecoder *decoder, void *client_data);
  16. // helper function extern'd here because DecodeThread needs it
  17. __int64 FileSize64(HANDLE file);
  18. #endif