Mercurial > hg > beaglert
diff core/RTAudio.cpp @ 172:5f4408705eed
Cleanup
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Mon, 28 Dec 2015 04:00:12 +0100 |
parents | e63563507edd |
children | 1e629f126322 |
line wrap: on
line diff
--- a/core/RTAudio.cpp Mon Dec 28 03:53:36 2015 +0100 +++ b/core/RTAudio.cpp Mon Dec 28 04:00:12 2015 +0100 @@ -210,11 +210,15 @@ cout << "Error: unable to initialise audio codec\n"; return 1; } - cout << "Initialized codec\n"; + // Set default volume levels BeagleRT_setDACLevel(settings->dacLevel); BeagleRT_setADCLevel(settings->adcLevel); for(int n = 0; n < 2; n++){ + if(settings->pgaGain[n] > 59.5){ + std::cerr << "PGA gain out of range [0,59.5]\n"; + exit(1); + } BeagleRT_setPgaGain(settings->pgaGain[n], n); } BeagleRT_setHeadphoneLevel(settings->headphoneLevel); @@ -460,7 +464,6 @@ int BeagleRT_setPgaGain(float decibels, int channel){ if(gAudioCodec == 0) return -1; - printf("calling\n"); return gAudioCodec->setPga(decibels, channel); }