MAIN.H 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef NULLSOFT_MAINH
  2. #define NULLSOFT_MAINH
  3. #include <windows.h>
  4. #include <stdio.h>
  5. #include "../Winamp/in2.h"
  6. #include "audio.h"
  7. #include "resource.h"
  8. #include "PlayStatus.h"
  9. #include "../nu/AutoLock.h"
  10. #include <mmsystem.h>
  11. #define WM_WA_MPEG_EOF WM_USER+2
  12. extern In_Module line;
  13. extern volatile int done;
  14. extern int paused;
  15. extern int g_lastpos;
  16. extern int m_nblock;
  17. extern DWORD MainThreadId;
  18. void config(HWND hwndParent);
  19. void config_read();
  20. //extern int config_sample;
  21. //extern int config_rip_buffersize; // number of sectors to read at once when ripping
  22. //extern int config_rip_buffers; // number of buffers to use when ripping
  23. //extern int config_play_buffersize; // number of sectors to read at once when playing
  24. //extern int config_play_buffers; // number of buffers to use when playing
  25. //extern int config_maxextractspeed;
  26. // TODO review this for the DAE mode...
  27. //extern int config_offset; // number of samples of offset when ripping (like EAC)
  28. //extern int config_read_leadin;
  29. extern int g_playlength;
  30. extern int g_playtrack;
  31. void WaitForEvent(HANDLE hEvent, DWORD msMaxWaitTime);
  32. MCIERROR MCISendCommand(MCIDEVICEID IDDevice, UINT uMsg, DWORD fdwCommand, DWORD_PTR dwParam);
  33. int isMediaPresent(MCIDEVICEID wDeviceID);
  34. void CDClose(MCIDEVICEID* lpDeviceID);
  35. BOOL CDOpen(MCIDEVICEID* lpDeviceID, int device, const wchar_t *alias = 0);
  36. BOOL CDID(MCIDEVICEID wDeviceID, wchar_t *id, size_t len);
  37. void CDClose(MCIDEVICEID* lpDeviceID);
  38. unsigned int CDGetTracks(MCIDEVICEID wDeviceID);
  39. unsigned int CDGetCurrTrack(MCIDEVICEID wDeviceID);
  40. int CDPlay(MCIDEVICEID wDeviceID, unsigned int nTrack, BOOL bResume, unsigned int nMin, unsigned int nSec, unsigned int endms);
  41. void CDStop(MCIDEVICEID wDeviceID);
  42. void CDEject(MCIDEVICEID wDeviceID);
  43. void CDPause(MCIDEVICEID wDeviceID);
  44. unsigned int CDGetTrackLength(MCIDEVICEID wDeviceID,
  45. unsigned int nTrack);
  46. int getSCSIIDFromDrive(char driveletter, int *host, int *id, int *lun);
  47. extern char * s_last_error;
  48. void CloseTables();
  49. const char *ReadLine(const char *input, char *output, size_t size, int codepage);
  50. bool ParseName(const wchar_t *fn, wchar_t &device, int &trackNum);
  51. // {B6CB4A7C-A8D0-4c55-8E60-9F7A7A23DA0F}
  52. static const GUID playbackConfigGroupGUID =
  53. { 0xb6cb4a7c, 0xa8d0, 0x4c55, { 0x8e, 0x60, 0x9f, 0x7a, 0x7a, 0x23, 0xda, 0xf } };
  54. class C_CDPlay;
  55. class WindacPlay;
  56. class DAEPlay;
  57. class MciPlay;
  58. extern C_CDPlay *g_cdplay;
  59. extern WindacPlay *windacPlayer;
  60. extern DAEPlay *daePlayer;
  61. extern MciPlay *mciPlayer;
  62. extern int a_v, a_p;
  63. #endif