// task has been ended while writing
return;
}
- logger.warn("InterruptedIOException while writing to from pulse source pipe: {}",
+ logger.warn("InterruptedIOException while writing from pulse source to pipe: {}",
getExceptionMessage(e));
} catch (IOException e) {
- logger.warn("IOException while writing to from pulse source pipe: {}",
+ logger.warn("IOException while writing from pulse source to pipe: {}",
getExceptionMessage(e));
} catch (RuntimeException e) {
- logger.warn("RuntimeException while writing to pulse source pipe: {}",
+ logger.warn("RuntimeException while writing from pulse source to pipe: {}",
getExceptionMessage(e));
}
}
lc++;
if (retRead > 0) {
String line = new String(buff, 0, retRead);
- // System.out.println("'"+line+"'");
if (line.endsWith(">>> ") && lc > 1) {
result += line.substring(0, line.length() - 4);
break;
}
int idleTimeout = pulseaudioHandler.getIdleTimeout();
if (idleTimeout > -1) {
- logger.debug("Scheduling next disconnect");
- scheduledDisconnection = scheduler.schedule(this::disconnect, idleTimeout, TimeUnit.MILLISECONDS);
+ if (idleTimeout == 0) {
+ this.disconnect();
+ } else {
+ logger.debug("Scheduling next disconnect");
+ scheduledDisconnection = scheduler.schedule(this::disconnect, idleTimeout,
+ TimeUnit.MILLISECONDS);
+ }
}
}
} finally {
thing-type.config.pulseaudio.sink.simpleProtocolSOTimeout.label = Simple Protocol SO Timeout
thing-type.config.pulseaudio.sink.simpleProtocolSOTimeout.description = Socket SO timeout when connecting to pulseaudio server though module-simple-protocol-tcp. You can tune this option if the socket disconnect frequently.
thing-type.config.pulseaudio.sink.simpleProtocolSinkIdleTimeout.label = Idle Timeout
-thing-type.config.pulseaudio.sink.simpleProtocolSinkIdleTimeout.description = Timeout in ms after which the connection will be closed when no stream is running. This ensures that your speaker is not on all the time and the pulseaudio sink can go to idle mode. -1 for no disconnection.
+thing-type.config.pulseaudio.sink.simpleProtocolSinkIdleTimeout.description = Timeout in ms after which the connection will be closed when no stream is running. This ensures that your speaker is not on all the time and the pulseaudio sink can go to idle mode. -1 for no disconnection (improve latency). 0 for immediate disconnection.
thing-type.config.pulseaudio.sink.simpleProtocolSinkPort.label = Simple Protocol Port
thing-type.config.pulseaudio.sink.simpleProtocolSinkPort.description = Default Port to allocate for use by module-simple-protocol-tcp on the pulseaudio server
thing-type.config.pulseaudio.sinkInput.additionalFilters.label = Additional Filters
thing-type.config.pulseaudio.source.simpleProtocolSourceFormat.option.s32le = PCM signed 32-bit little-endian
thing-type.config.pulseaudio.source.simpleProtocolSourceFormat.option.s32be = PCM signed 32-bit big-endian
thing-type.config.pulseaudio.source.simpleProtocolSourceIdleTimeout.label = Idle Timeout
-thing-type.config.pulseaudio.source.simpleProtocolSourceIdleTimeout.description = Timeout in ms after which the connection will be closed when no stream is running. This ensures that your speaker is not on all the time and the pulseaudio source can go to idle mode. -1 for no disconnection.
+thing-type.config.pulseaudio.source.simpleProtocolSourceIdleTimeout.description = Timeout in ms after which the connection will be closed when no stream is running. This ensures that your mic is not on all the time and the pulseaudio source can go to idle mode. -1 for no disconnection. 0 for immediate disconnection (recommended value to avoid capturing unwanted buffered audio).
thing-type.config.pulseaudio.source.simpleProtocolSourcePort.label = Simple Protocol Port
thing-type.config.pulseaudio.source.simpleProtocolSourcePort.description = Default Port to allocate to be used by module-simple-protocol-tcp on the pulseaudio server
thing-type.config.pulseaudio.source.simpleProtocolSourceRate.label = Simple Protocol Rate
<parameter name="simpleProtocolSinkIdleTimeout" type="integer" required="false">
<label>Idle Timeout</label>
<description>Timeout in ms after which the connection will be closed when no stream is running. This ensures that
- your speaker is not on all the time and the pulseaudio sink can go to idle mode. -1 for no disconnection.
+ your speaker is not on all the time and the pulseaudio sink can go to idle mode. -1 for no disconnection (improve
+ latency). 0 for immediate disconnection.
</description>
<default>30000</default>
</parameter>
<default>4710</default>
</parameter>
<parameter name="simpleProtocolSourceIdleTimeout" type="integer" required="false">
+ <advanced>true</advanced>
<label>Idle Timeout</label>
<description>Timeout in ms after which the connection will be closed when no stream is running. This ensures that
- your speaker is not on all the time and the pulseaudio source can go to idle mode. -1 for no disconnection.
+ your mic is not on all the time and the pulseaudio source can go to idle mode. -1 for no disconnection. 0 for
+ immediate disconnection (recommended value to avoid capturing unwanted buffered audio)
</description>
- <default>30000</default>
+ <default>0</default>
</parameter>
<parameter name="simpleProtocolSourceFormat" type="text">
<label>Simple Protocol Format</label>