corecb.cpp 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #include <precomp.h>
  2. #include "corecbi.h"
  3. #define CBCLASS CoreCallbackI
  4. START_DISPATCH;
  5. CB(CCB_NOTIFY, ccb_notify);
  6. END_DISPATCH;
  7. int CoreCallbackI::ccb_notify(int msg, intptr_t param1, intptr_t param2) {
  8. ReentryFilter f(&filter, msg);
  9. if (f.mustLeave()) return 0;
  10. switch (msg) {
  11. case STARTED:
  12. return corecb_onStarted();
  13. case STOPPED:
  14. return corecb_onStopped();
  15. case PAUSED:
  16. return corecb_onPaused();
  17. case UNPAUSED:
  18. return corecb_onUnpaused();
  19. case SEEKED:
  20. return corecb_onSeeked(param1);
  21. case VOLCHANGE:
  22. return corecb_onVolumeChange(param1);
  23. case PANCHANGE:
  24. return corecb_onPanChange(param1);
  25. case EQSTATUSCHANGE:
  26. return corecb_onEQStatusChange(param1);
  27. case EQPREAMPCHANGE:
  28. return corecb_onEQPreampChange(param1);
  29. case EQBANDCHANGE:
  30. return corecb_onEQBandChange(param1, param2);
  31. case EQFREQCHANGE:
  32. return corecb_onEQFreqChange(param1);
  33. case EQAUTOCHANGE:
  34. return corecb_onEQAutoChange(param1);
  35. case STATUSMSG:
  36. return corecb_onStatusMsg((const wchar_t *)param1);
  37. case WARNINGMSG:
  38. return corecb_onWarningMsg((const wchar_t *)param1);
  39. case ERRORMSG:
  40. return corecb_onErrorMsg((const wchar_t *)param1);
  41. case TITLECHANGE:
  42. return corecb_onTitleChange((const wchar_t *)param1);
  43. case TITLE2CHANGE:
  44. return corecb_onTitle2Change((const wchar_t *)param1);
  45. case INFOCHANGE:
  46. return corecb_onInfoChange((const wchar_t *)param1);
  47. case URLCHANGE:
  48. return corecb_onUrlChange((const wchar_t *)param1);
  49. case LENGTHCHANGE:
  50. return corecb_onLengthChange(param1);
  51. case NEXTFILE:
  52. return corecb_onNextFile();
  53. case NEEDNEXTFILE:
  54. return corecb_onNeedNextFile(param1);
  55. case SETNEXTFILE:
  56. return corecb_onSetNextFile((const wchar_t *)param1);
  57. case ERROROCCURED:
  58. return corecb_onErrorOccured(param1, (const wchar_t *)param2);
  59. case ABORTCURRENTSONG:
  60. return corecb_onAbortCurrentSong();
  61. case ENDOFDECODE:
  62. return corecb_onEndOfDecode();
  63. case ONFILECOMPLETE:
  64. return corecb_onFileComplete((const wchar_t *)param1);
  65. case CONVERTERSCHAINREBUILT:
  66. return corecb_onConvertersChainRebuilt();
  67. case MEDIAFAMILYCHANGE:
  68. return corecb_onMediaFamilyChange((const wchar_t *)param1);
  69. case BITRATECHANGE:
  70. return corecb_onBitrateChange(param1);
  71. case SAMPLERATECHANGE:
  72. return corecb_onSampleRateChange(param1);
  73. case CHANNELSCHANGE:
  74. return corecb_onChannelsChange(param1);
  75. }
  76. return 0;
  77. }