-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwinamp_constants.py
More file actions
57 lines (50 loc) · 2 KB
/
winamp_constants.py
File metadata and controls
57 lines (50 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""
Winamp IPC Constants
Based on wa_ipc.h from Winamp SDK
https://github.com/hugovk/winamp/blob/master/wa_ipc.h
"""
# Windows Messages
WM_USER = 0x0400
WM_WA_IPC = WM_USER
WM_COMMAND = 0x0111
WM_COPYDATA = 0x004A
# Winamp IPC Commands (sent via WM_WA_IPC / WM_USER)
IPC_GETVERSION = 0 # Returns Winamp version (0x5xxx for 5.x)
IPC_ISPLAYING = 104 # Returns: 1=playing, 3=paused, 0=stopped
IPC_GETOUTPUTTIME = 105 # wParam=0: pos in ms, wParam=1: length in sec
IPC_JUMPTOTIME = 106 # Jump to position in ms
IPC_GETLISTLENGTH = 124 # Get playlist length
IPC_GETLISTPOS = 125 # Get current playlist position
IPC_GETPLAYLISTFILE = 211 # Get playlist file path
IPC_GETPLAYLISTTITLE = 212 # Get current track title
# Winamp WM_COMMAND Button IDs
WINAMP_BUTTON1 = 40044 # Previous track
WINAMP_BUTTON2 = 40045 # Play
WINAMP_BUTTON3 = 40046 # Pause
WINAMP_BUTTON4 = 40047 # Stop
WINAMP_BUTTON5 = 40048 # Next track
WINAMP_VOLUMEUP = 40058 # Volume up
WINAMP_VOLUMEDOWN = 40059 # Volume down
WINAMP_FFWD5S = 40060 # Fast forward 5 seconds
WINAMP_REW5S = 40061 # Rewind 5 seconds
# IPC Messages for playlist (from Winamp SDK)
IPC_DELETE = 101 # Clear playlist
IPC_STARTPLAY = 102 # Start playback
IPC_CHDIR = 103 # Change directory
IPC_SETVOLUME = 122 # Set volume (wParam = 0-255), returns previous volume
IPC_GETVOLUME = 122 # Get volume (wParam = -666), returns current volume (0-255)
# Window class name that BMS looks for
WINAMP_WINDOW_CLASS = "Winamp v1.x"
WINAMP_WINDOW_TITLE = "YouTube Music - BMS Bridge"
# Fake Winamp version to report (5.666 = 0x5294)
FAKE_WINAMP_VERSION = 0x5294
# WM_APPCOMMAND for controlling media players
WM_APPCOMMAND = 0x0319
APPCOMMAND_MEDIA_NEXTTRACK = 11
APPCOMMAND_MEDIA_PREVIOUSTRACK = 12
APPCOMMAND_MEDIA_STOP = 13
APPCOMMAND_MEDIA_PLAY_PAUSE = 14
APPCOMMAND_MEDIA_PLAY = 46
APPCOMMAND_MEDIA_PAUSE = 47
APPCOMMAND_VOLUME_DOWN = 9
APPCOMMAND_VOLUME_UP = 10