|
|
|
@ -59,10 +59,10 @@ void AudioOutput::stop()
|
|
|
|
|
|
|
|
|
|
|
|
void AudioOutput::installonly(const QString &serial, int port)
|
|
|
|
void AudioOutput::installonly(const QString &serial, int port)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
runSndcpyProcess(serial, port);
|
|
|
|
runSndcpyProcess(serial, port, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AudioOutput::runSndcpyProcess(const QString &serial, int port)
|
|
|
|
bool AudioOutput::runSndcpyProcess(const QString &serial, int port, bool wait)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (QProcess::NotRunning != m_sndcpy.state()) {
|
|
|
|
if (QProcess::NotRunning != m_sndcpy.state()) {
|
|
|
|
m_sndcpy.kill();
|
|
|
|
m_sndcpy.kill();
|
|
|
|
@ -81,6 +81,10 @@ bool AudioOutput::runSndcpyProcess(const QString &serial, int port)
|
|
|
|
m_sndcpy.start("bash", params);
|
|
|
|
m_sndcpy.start("bash", params);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!wait) {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!m_sndcpy.waitForStarted()) {
|
|
|
|
if (!m_sndcpy.waitForStarted()) {
|
|
|
|
qWarning() << "AudioOutput::start sndcpy.bat failed";
|
|
|
|
qWarning() << "AudioOutput::start sndcpy.bat failed";
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|