improved error message on wrong sample rate
This commit is contained in:
parent
720fe3c075
commit
d5cb9d821d
1 changed files with 9 additions and 5 deletions
|
@ -213,8 +213,10 @@ void CSound::OpenCoreAudio()
|
||||||
|
|
||||||
if ( static_cast<int> ( inputSampleRate ) != SYSTEM_SAMPLE_RATE )
|
if ( static_cast<int> ( inputSampleRate ) != SYSTEM_SAMPLE_RATE )
|
||||||
{
|
{
|
||||||
// TODO better error message, showing current/desired sample rate and tell how to change
|
throw CGenErr ( QString ( tr ( "Current system audio input device sample "
|
||||||
throw CGenErr ( tr ( "Current system input device sample rate not supported" ) );
|
"rate of %1 Hz is not supported. Please open the Audio-MIDI-Setup in "
|
||||||
|
"Applications->Utilities and try to set a sample rate of %2 Hz." ) ).arg (
|
||||||
|
static_cast<int> ( inputSampleRate ) ).arg ( SYSTEM_SAMPLE_RATE ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// check output device sample rate
|
// check output device sample rate
|
||||||
|
@ -226,11 +228,13 @@ void CSound::OpenCoreAudio()
|
||||||
0,
|
0,
|
||||||
&outputSampleRate,
|
&outputSampleRate,
|
||||||
&size );
|
&size );
|
||||||
|
|
||||||
if ( static_cast<int> ( outputSampleRate ) != SYSTEM_SAMPLE_RATE )
|
if ( static_cast<int> ( outputSampleRate ) != SYSTEM_SAMPLE_RATE )
|
||||||
{
|
{
|
||||||
// TODO better error message, showing current/desired sample rate and tell how to change
|
throw CGenErr ( QString ( tr ( "Current system audio output device sample "
|
||||||
throw CGenErr ( tr ( "Current system output device sample rate not supported" ) );
|
"rate of %1 Hz is not supported. Please open the Audio-MIDI-Setup in "
|
||||||
|
"Applications->Utilities and try to set a sample rate of %2 Hz." ) ).arg (
|
||||||
|
static_cast<int> ( outputSampleRate ) ).arg ( SYSTEM_SAMPLE_RATE ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue