mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-06 19:38:47 -05:00
Silence.
This commit is contained in:
parent
82047f69ce
commit
c813639df7
@ -23,6 +23,7 @@ find_package(FFTW3F)
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
#include(${QT_USE_FILE})
|
#include(${QT_USE_FILE})
|
||||||
|
set( QT_DEFINITIONS "${QT_DEFINITIONS} -DQT_NO_DEBUG_OUTPUT" )
|
||||||
add_definitions(${QT_DEFINITIONS})
|
add_definitions(${QT_DEFINITIONS})
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
@ -49,7 +49,7 @@ bool AudioOutput::start(int device, int rate)
|
|||||||
QAudioFormat format;
|
QAudioFormat format;
|
||||||
QAudioDeviceInfo devInfo(QAudioDeviceInfo::defaultOutputDevice());
|
QAudioDeviceInfo devInfo(QAudioDeviceInfo::defaultOutputDevice());
|
||||||
|
|
||||||
format.setSampleRate(41000);
|
format.setSampleRate(48000);
|
||||||
format.setChannelCount(2);
|
format.setChannelCount(2);
|
||||||
format.setSampleSize(16);
|
format.setSampleSize(16);
|
||||||
format.setCodec("audio/pcm");
|
format.setCodec("audio/pcm");
|
||||||
@ -57,12 +57,12 @@ bool AudioOutput::start(int device, int rate)
|
|||||||
format.setSampleType(QAudioFormat::SignedInt);
|
format.setSampleType(QAudioFormat::SignedInt);
|
||||||
|
|
||||||
if(!devInfo.isFormatSupported(format)) {
|
if(!devInfo.isFormatSupported(format)) {
|
||||||
qDebug("default format not supported - try to use nearest");
|
qWarning("48kHz S16_LE audio format not supported");
|
||||||
format = devInfo.nearestFormat(format);
|
format = devInfo.nearestFormat(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(format.sampleSize() != 16) {
|
if(format.sampleSize() != 16) {
|
||||||
qDebug("audio device doesn't support 16 bit samples (%s)", qPrintable(devInfo.defaultOutputDevice().deviceName()));
|
qWarning("Audio device ( %s ) failed", qPrintable(devInfo.defaultOutputDevice().deviceName()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user