1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #include "Stopper.h"
- #include "main.h"
- #include "../Winamp/wa_ipc.h"
- Stopper::Stopper() : isplaying(0), timems(0)
- {
- }
- void Stopper::ChangeTracking(bool mode)
- {
- SendMessage(plugin.hMainWindow, WM_USER, mode, IPC_ALLOW_PLAYTRACKING);
- }
- void Stopper::Stop()
- {
- isplaying = SendMessage(plugin.hMainWindow, WM_USER, 0, IPC_ISPLAYING);
- if (isplaying)
- {
- ChangeTracking(0);
- timems = SendMessage(plugin.hMainWindow, WM_USER, 0, IPC_GETOUTPUTTIME);
- SendMessage(plugin.hMainWindow, WM_COMMAND, 40047, 0);
- }
- }
- void Stopper::Play()
- {
- if (isplaying)
-
-
- {
- if (timems)
- {
- m_force_seek = timems;
- }
- else
- m_force_seek = -1;
- SendMessage(plugin.hMainWindow, WM_COMMAND, 40045, 0);
-
- if (isplaying & 2)
- {
- SendMessage(plugin.hMainWindow, WM_COMMAND, 40046, 0);
- }
- ChangeTracking(1);
- }
- }
|