now always using a rational sample rate when using system default
This commit is contained in:
parent
de5753e7f2
commit
7ea9da7e09
1 changed files with 2 additions and 2 deletions
|
@ -134,8 +134,8 @@ end
|
|||
function PortAudioStream(indev::PortAudioDevice, outdev::PortAudioDevice,
|
||||
inchans=-1, outchans=-1; eltype=Float32, samplerate=-1, blocksize=DEFAULT_BLOCKSIZE)
|
||||
if samplerate == -1
|
||||
sampleratein = indev.defaultsamplerate * Hz;
|
||||
samplerateout = outdev.defaultsamplerate * Hz;
|
||||
sampleratein = rationalize(indev.defaultsamplerate) * Hz;
|
||||
samplerateout = rationalize(outdev.defaultsamplerate) * Hz;
|
||||
if inchans > 0 && outchans > 0 && sampleratein != samplerateout
|
||||
error("Can't open duplex stream with mismatched samplerates")
|
||||
elseif inchans > 0
|
||||
|
|
Loading…
Reference in a new issue