bugfix: portaudio backend now handles blocked device correctly.

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1605 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Csaba Hruska
2008-09-14 11:51:54 +00:00
parent 9c356ad09b
commit e9ba002aa8
2 changed files with 10 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2008-09-14 Csaba Hruska <csaba.hruska/at/gmail.com>
* src/core/audio/audio_portaudio.cpp:
Bugfix: Fixed segfault when other app uses and blocks the audio device
2008-09-08 Paul Giblock <drfaygo/at/gmail/dot/com>
* src/core/timeline.cpp:

View File

@@ -113,6 +113,11 @@ audioPortAudio::audioPortAudio( bool & _success_ful, mixer * _mixer ) :
outDevIdx = Pa_GetDefaultOutputDevice();
}
if( inDevIdx < 0 || outDevIdx < 0)
{
return;
}
double inLatency = (double)getMixer()->framesPerPeriod() / (double)sampleRate();
double outLatency = (double)getMixer()->framesPerPeriod() / (double)sampleRate();