Browse Source

Better error checking in PortAudio driver.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1411 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.62
sletz 18 years ago
parent
commit
6c0af510a1
2 changed files with 10 additions and 2 deletions
  1. +4
    -0
      ChangeLog
  2. +6
    -2
      windows/JackPortAudioDriver.cpp

+ 4
- 0
ChangeLog View File

@@ -1,6 +1,10 @@
---------------------------
Jackdmp changes log
---------------------------
2007-02-14 Stephane Letz <letz@grame.fr>
* Better error checking in PortAudio driver.

2007-02-07 Stephane Letz <letz@grame.fr>


+ 6
- 2
windows/JackPortAudioDriver.cpp View File

@@ -284,7 +284,9 @@ int JackPortAudioDriver::Open(jack_nframes_t nframes,
if (capturing) {
if (!GetInputDeviceFromName(capture_driver_uid, &fInputDevice, &in_max)) {
JackLog("JackPortAudioDriver::GetInputDeviceFromName cannot open %s\n", capture_driver_uid);
fInputDevice = Pa_GetDefaultInputDevice();
fInputDevice = Pa_GetDefaultInputDevice();
if (fInputDevice == paNoDevice)
goto error;
deviceInfo = Pa_GetDeviceInfo(fInputDevice);
in_max = deviceInfo->maxInputChannels;
capture_driver_uid = strdup(deviceInfo->name);
@@ -299,7 +301,9 @@ int JackPortAudioDriver::Open(jack_nframes_t nframes,
if (playing) {
if (!GetOutputDeviceFromName(playback_driver_uid, &fOutputDevice, &out_max)) {
JackLog("JackPortAudioDriver::GetOutputDeviceFromName cannot open %s\n", playback_driver_uid);
fOutputDevice = Pa_GetDefaultOutputDevice();
fOutputDevice = Pa_GetDefaultOutputDevice();
if (fOutputDevice == paNoDevice)
goto error;
deviceInfo = Pa_GetDeviceInfo(fOutputDevice);
out_max = deviceInfo->maxOutputChannels;
playback_driver_uid = strdup(deviceInfo->name);


Loading…
Cancel
Save