main.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #pragma once
  2. #ifndef WIN32_LEAN_AND_MEAN
  3. #define WIN32_LEAN_AND_MEAN
  4. #endif
  5. #include <windows.h>
  6. #include "giofile.h"
  7. #include "dxhead.h"
  8. #include "CVbriHeader.h"
  9. #include "resource.h"
  10. #include "in2.h"
  11. #define PLUGIN_VERSION L"4.6"
  12. extern In_Module mod;
  13. extern char INI_FILE[MAX_PATH];
  14. extern int g_length;
  15. extern int lastfn_data_ready;
  16. extern int id3Dlg(const wchar_t *fn, HWND hwnd);
  17. extern int getlength();
  18. extern void getfileinfo(const wchar_t *filename, wchar_t *title, int *length_in_ms);
  19. extern int config_max_bufsize_k;
  20. extern int config_gapless;
  21. extern int config_fastvis;
  22. extern unsigned char config_miscopts;
  23. extern unsigned char config_downmix, config_downsample;
  24. extern int config_http_buffersize, config_http_prebuffer, config_http_prebuffer_underrun;
  25. extern unsigned char allow_sctitles,sctitle_format, allow_scartwork;
  26. extern char config_http_save_dir[MAX_PATH];
  27. extern wchar_t lastfn[8192]; // currently playing file (used for getting info on the current file)
  28. extern char g_stream_title[256];
  29. extern char lastfn_status[256];
  30. extern int lastfn_status_err;
  31. extern int paused; // are we paused?
  32. extern void config_read();
  33. extern void about(HWND hwndParent);
  34. extern void strmBuf_Quit();
  35. extern int strmBuf_Start(char *streamurl, int num_bytes, int pre_buffer_top, int pre_buffer_bottom);
  36. extern int strmBuf_Read(void *data, int bytes_requested);
  37. extern void config(HWND hwndParent);
  38. extern volatile int killDecodeThread;
  39. extern unsigned char eq_preamp;
  40. extern unsigned char eq_enabled;
  41. extern unsigned char eq_tab[10];
  42. extern unsigned char config_eqmode;
  43. extern unsigned int winampVersion;
  44. extern int g_eq_ok;
  45. extern CRITICAL_SECTION g_lfnscs;
  46. extern CRITICAL_SECTION streamInfoLock;
  47. #if !defined(__alpha) && !defined(_WIN64)
  48. static __inline long float_to_long(double t)
  49. {
  50. long r;
  51. __asm fld t
  52. __asm fistp r
  53. return r;
  54. }
  55. #else
  56. #define float_to_long(x) ((long)( x ))
  57. #endif
  58. extern void processMetaDataC(char *data, int len, int msgId );
  59. enum
  60. {
  61. UVOX_METADATA_STYLE_AOLRADIO = 0,
  62. UVOX_METADATA_STYLE_SHOUTCAST = 1,
  63. UVOX_METADATA_STYLE_SHOUTCAST2 = 2,
  64. UVOX_METADATA_STYLE_SHOUTCAST2_ARTWORK = 3,
  65. UVOX_METADATA_STYLE_SHOUTCAST2_ARTWORK_PLAYING = 4,
  66. };
  67. typedef struct {
  68. void *Next;
  69. int style;
  70. long timer;
  71. char title[16384];
  72. int part;
  73. int total_parts;
  74. int part_len;
  75. int type;
  76. } TitleType;
  77. #define TITLELISTTYPE TitleType
  78. extern TITLELISTTYPE *TitleLinkedList;
  79. extern TITLELISTTYPE TitleListTerminator;
  80. extern void initTitleList(void);
  81. extern TITLELISTTYPE *newTitleListEntry(void);
  82. extern void removeTitleListEntry(TITLELISTTYPE *Entry);
  83. extern void clearTitleList(void);
  84. char *GetUltravoxUserAgent();
  85. char *GetUserAgent();
  86. void w9x_lstrcpynW(wchar_t *dest, const wchar_t *src, int maxLen);
  87. // maximum acceptable deviance between LAME header bytesize and real filesize (minus id3 tag)
  88. // has to be large enough to accomodate unknown tags (APE, lyrics3)
  89. const int MAX_ACCEPTABLE_DEVIANCE = 16384;
  90. void get_extended_info(const wchar_t *fn, int *len);
  91. #define UVOX_3901_LEN 32768
  92. void ConvertTryUTF8(const char *in, wchar_t *out, size_t outlen);
  93. #ifdef AAC_SUPPORT
  94. extern char config_extlist_aac[129];
  95. #define config_extlist config_extlist_aac
  96. #else
  97. extern char config_extlist[129];
  98. #endif
  99. extern int m_force_seek;
  100. extern CGioFile *g_playing_file;
  101. int _r_i(char *name, int def);
  102. void _w_i(char *name, int d);