remove excessive use of space.
This commit is contained in:
parent
4d5522f1bf
commit
499fcff6dd
2 changed files with 231 additions and 230 deletions
60
cimp.bas
60
cimp.bas
|
|
@ -36,16 +36,16 @@ if ipc_status = 0 then
|
||||||
' --- CLIENT MODE ---
|
' --- CLIENT MODE ---
|
||||||
dim cmd_msg as string
|
dim cmd_msg as string
|
||||||
|
|
||||||
Select Case command$(1)
|
select case command$(1)
|
||||||
Case "--soundbank"
|
case "--soundbank"
|
||||||
cmd_msg="SOUNDBANK:"+_cwd$ +slash+command$(2)
|
cmd_msg="SOUNDBANK:"+_cwd$ +slash+command$(2)
|
||||||
Case "--next"
|
case "--next"
|
||||||
cmd_msg="NEXT"
|
cmd_msg="NEXT"
|
||||||
|
|
||||||
Case "--prev"
|
case "--prev"
|
||||||
cmd_msg="PREV"
|
cmd_msg="PREV"
|
||||||
|
|
||||||
Case "-v", "--volume"
|
case "-v","--volume"
|
||||||
cmd_msg="VOL:"+command$(2)
|
cmd_msg="VOL:"+command$(2)
|
||||||
|
|
||||||
case "--pause"
|
case "--pause"
|
||||||
|
|
@ -68,28 +68,28 @@ if ipc_status = 0 then
|
||||||
cmd_msg="NYAN"
|
cmd_msg="NYAN"
|
||||||
case "--nyan-off"
|
case "--nyan-off"
|
||||||
cmd_msg="NYANOFF"
|
cmd_msg="NYANOFF"
|
||||||
Case "--add"
|
case "--add"
|
||||||
For i = 2 To _commandcount
|
for i=2 to _commandcount
|
||||||
cmd_msg="ADD:"+_cwd$ +slash+command$(i)
|
cmd_msg="ADD:"+_cwd$ +slash+command$(i)
|
||||||
ipc_send_message cmd_msg
|
ipc_send_message cmd_msg
|
||||||
Next i
|
next i
|
||||||
System
|
system
|
||||||
|
|
||||||
Case "--playlist"
|
case "--playlist"
|
||||||
cmd_msg="GET_PLAYLIST"
|
cmd_msg="GET_PLAYLIST"
|
||||||
|
|
||||||
Case Else
|
case else
|
||||||
' Default behavior: Resolve target file/playlist and replace active queue
|
' Default behavior: Resolve target file/playlist and replace active queue
|
||||||
cmd_msg="PLAY:"+_cwd$ +slash+command$(1)
|
cmd_msg="PLAY:"+_cwd$ +slash+command$(1)
|
||||||
ipc_send_message cmd_msg
|
ipc_send_message cmd_msg
|
||||||
If _commandcount > 1 Then
|
if _commandcount>1 then
|
||||||
For i = 2 To _commandcount
|
for i=2 to _commandcount
|
||||||
cmd_msg="ADD:"+_cwd$ +slash+command$(i)
|
cmd_msg="ADD:"+_cwd$ +slash+command$(i)
|
||||||
ipc_send_message cmd_msg
|
ipc_send_message cmd_msg
|
||||||
Next i
|
next i
|
||||||
System
|
system
|
||||||
End If
|
end if
|
||||||
End Select
|
end select
|
||||||
|
|
||||||
' Send instruction to the main player instance
|
' Send instruction to the main player instance
|
||||||
ipc_send_message cmd_msg
|
ipc_send_message cmd_msg
|
||||||
|
|
@ -294,7 +294,7 @@ while keyin<>27
|
||||||
elseif left$(client_cmd,10)="SOUNDBANK:" then
|
elseif left$(client_cmd,10)="SOUNDBANK:" then
|
||||||
if client_cmd="default" then loadsoundbank "" else loadsoundbank mid$(client_cmd,11)
|
if client_cmd="default" then loadsoundbank "" else loadsoundbank mid$(client_cmd,11)
|
||||||
|
|
||||||
if _SNDPLAYING(musichandle) then
|
if _sndplaying(musichandle) then
|
||||||
|
|
||||||
' a hack to make qb64pe load the midi file that is already loaded.
|
' a hack to make qb64pe load the midi file that is already loaded.
|
||||||
' qb64 can't open the same file again with a new sound bank for some reason
|
' qb64 can't open the same file again with a new sound bank for some reason
|
||||||
|
|
@ -753,33 +753,33 @@ sub loadsoundbank (filename as string)
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
|
|
||||||
FUNCTION GetConfig$ (FileName as string)
|
function GetConfig$ (FileName as string)
|
||||||
SELECT CASE left$(_OS$,instr(_OS$,"]"))
|
select case left$(_os$,instr(_os$,"]"))
|
||||||
CASE "[WINDOWS]"
|
case "[WINDOWS]"
|
||||||
dim appdata as string
|
dim appdata as string
|
||||||
appdata = ENVIRON$("APPDATA")
|
appdata=environ$("APPDATA")
|
||||||
if appdata = "" then appdata = ENVIRON$("USERPROFILE") + "\AppData\Roaming"
|
if appdata="" then appdata=environ$("USERPROFILE")+"\AppData\Roaming"
|
||||||
if right$(appdata,1)<>"\" then appdata=appdata+"\"
|
if right$(appdata,1)<>"\" then appdata=appdata+"\"
|
||||||
GetConfig=appdata+FileName
|
GetConfig=appdata+FileName
|
||||||
|
|
||||||
CASE "[MACOSX]"
|
case "[MACOSX]"
|
||||||
dim homemac as string
|
dim homemac as string
|
||||||
homemac = ENVIRON$("HOME")
|
homemac=environ$("HOME")
|
||||||
if homemac="" then homemac="/tmp"
|
if homemac="" then homemac="/tmp"
|
||||||
if right$(homemac,1)="/" then homemac=left$(homemac,len(homemac)-1)
|
if right$(homemac,1)="/" then homemac=left$(homemac,len(homemac)-1)
|
||||||
GetConfig=homemac+"/Library/Application Support/"+FileName
|
GetConfig=homemac+"/Library/Application Support/"+FileName
|
||||||
|
|
||||||
CASE ELSE ' Linux and other Unix-like systems
|
case else ' Linux and other Unix-like systems
|
||||||
dim xdg as string,baseDir as string,homelinux as string
|
dim xdg as string,baseDir as string,homelinux as string
|
||||||
xdg = ENVIRON$("XDG_CONFIG_HOME")
|
xdg=environ$("XDG_CONFIG_HOME")
|
||||||
if xdg<>"" then
|
if xdg<>"" then
|
||||||
baseDir=xdg
|
baseDir=xdg
|
||||||
else
|
else
|
||||||
homelinux = ENVIRON$("HOME")
|
homelinux=environ$("HOME")
|
||||||
if homelinux="" then homelinux="/tmp"
|
if homelinux="" then homelinux="/tmp"
|
||||||
baseDir=homelinux+"/.config"
|
baseDir=homelinux+"/.config"
|
||||||
end if
|
end if
|
||||||
if right$(baseDir,1)="/" then baseDir=left$(baseDir,len(baseDir)-1)
|
if right$(baseDir,1)="/" then baseDir=left$(baseDir,len(baseDir)-1)
|
||||||
GetConfig=baseDir+"/"+FileName
|
GetConfig=baseDir+"/"+FileName
|
||||||
END SELECT
|
end select
|
||||||
END FUNCTION
|
end function
|
||||||
|
|
|
||||||
1
test.bas
Normal file
1
test.bas
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
print 5--5
|
||||||
Loading…
Reference in a new issue