Compare commits
	
		
			2 Commits
		
	
	
		
			1127b1ec09
			...
			9def17c07c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 9def17c07c | |||
| 72d99007c5 | 
@ -14,9 +14,9 @@ before the first public release.
 | 
			
		||||
 | 
			
		||||
Also, I plan to add a higher-level abstraction on top of the direct mapping
 | 
			
		||||
from Nim procs and types to C functions and types, probably in the form of
 | 
			
		||||
a JACk client object, which takes care of a JACK client instance, registering
 | 
			
		||||
ports and setting up all the callbacks necessary for a well-behaved JACK 
 | 
			
		||||
application.
 | 
			
		||||
a JACK client object, which takes care of creating a JACK client instance,
 | 
			
		||||
registering ports and setting up all the callbacks necessary for a well-behaved
 | 
			
		||||
JACK application.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Installation
 | 
			
		||||
 | 
			
		||||
@ -42,7 +42,6 @@ proc portConnected(portA: PortIdT; portB: PortIdT; connect: cint; arg: pointer)
 | 
			
		||||
        echo "Port B: <unknown>"
 | 
			
		||||
        
 | 
			
		||||
    echo("Action: ", if connect > 0: "connect" else: "disconnect")
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
addHandler(log)
 | 
			
		||||
setErrorFunction(errorCb)
 | 
			
		||||
 | 
			
		||||
@ -33,7 +33,7 @@ debug "JACK server status: " & $status
 | 
			
		||||
 | 
			
		||||
if jclient == nil:
 | 
			
		||||
    error getJackStatusErrorString(status)
 | 
			
		||||
    quit 1
 | 
			
		||||
    quit QuitFailure
 | 
			
		||||
 | 
			
		||||
when defined(windows):
 | 
			
		||||
    setSignalProc(signalCb, SIGABRT, SIGINT, SIGTERM)
 | 
			
		||||
 | 
			
		||||
@ -79,10 +79,10 @@ debug "JACK server status: " & $status
 | 
			
		||||
 | 
			
		||||
if jclient == nil:
 | 
			
		||||
    error getJackStatusErrorString(status)
 | 
			
		||||
    quit 1
 | 
			
		||||
    quit QuitFailure
 | 
			
		||||
 | 
			
		||||
# Create sine oscillator
 | 
			
		||||
let sampleRate =(float) jclient.getSampleRate()
 | 
			
		||||
let sampleRate = jclient.getSampleRate.float
 | 
			
		||||
debug "JACK sample rate: " & $sampleRate
 | 
			
		||||
var osc = initSineOsc(sampleRate, sineFreq)
 | 
			
		||||
 | 
			
		||||
@ -96,6 +96,7 @@ else:
 | 
			
		||||
if jclient.setProcessCallback(processCb, osc.addr) != 0:
 | 
			
		||||
    error "Could not set JACK process callback function."
 | 
			
		||||
    cleanup()
 | 
			
		||||
    quit QuitFailure
 | 
			
		||||
 | 
			
		||||
jclient.onShutdown(shutdownCb, nil)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user