diff --git a/cimp.bas b/cimp.bas index c0209a1..5733d89 100644 --- a/cimp.bas +++ b/cimp.bas @@ -37,6 +37,8 @@ if ipc_status = 0 then dim cmd_msg as string Select Case command$(1) + Case "--soundbank" + cmd_msg = "SOUNDBANK:" + command$(2) Case "--next" cmd_msg = "NEXT" @@ -182,6 +184,13 @@ for i=1 to _commandcount nooutput=-1 case "-N","--nyan" nyan=-1 + case "-b","--soundbank" + if _commandcount>i and _fileexists(command$(i+1)) then + loadsoundbank command$(i+1) + else + print "error loading soundbank" + system + end if case else if _fileexists(command$(i)) then if lcase$(right$(command$(i),4))=".m3u"then @@ -238,6 +247,8 @@ while keyin<>27 keyin=asc("s") elseif client_cmd = "NYAN" then nyan = not nyan + elseif left$(client_cmd, 10) = "SOUNDBANK:" then + loadsoundbank mid$(client_cmd,11) elseif left$(client_cmd, 4) = "VOL:" then volume = val(mid$(client_cmd, 5)) / 100 if volume > 1 then volume = 1 @@ -676,3 +687,7 @@ function getcodepoint& (utf8char$) getcodepoint&=(b1 and &h07)*262144+(b2 and &h3f)*4096+(b3 and &h3f)*64+(b4 and &h3f) end select end function + +sub loadsoundbank (filename as string) + _midisoundbank filename +end sub