Works on Raspbian.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2019-12-14 19:56:20 +00:00
parent 849482ea65
commit 24e0b17135
2 changed files with 13 additions and 2 deletions

View file

@ -36,5 +36,11 @@ target_link_libraries(applen PRIVATE
appleii
)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
target_link_libraries(applen PRIVATE
stdc++fs
)
endif()
add_custom_target(copy-resources ALL
COMMAND cmake -E copy_directory ${CMAKE_SOURCE_DIR}/resource ${CMAKE_BINARY_DIR}/resource)

View file

@ -104,11 +104,16 @@ void AudioGenerator::start()
return;
}
qDebug(appleAudio) << "Restarting the AudioGenerator";
// restart as we are either starting or recovering from underrun
myDevice = myAudioOutput->start();
if (!myDevice)
{
return;
}
qDebug(appleAudio) << "Restarting the AudioGenerator";
const int bytesSize = myAudioOutput->bufferSize();
const qint32 frameSize = myAudioFormat.framesForBytes(bytesSize);