Update of /cvsroot/audacity/lib-src/portmixer/src
In directory
sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4904/lib-src/portmixer/src
Modified Files:
px_linux_alsa.c px_mac_coreaudio.c
Log Message:
Allow Mixer Toolbar to control playback when capture is unavailable
(includes some PortMixer fixes for Linux and Mac; Windows apparently
worked fine already)
Index: px_mac_coreaudio.c
===================================================================
RCS file: /cvsroot/audacity/lib-src/portmixer/src/px_mac_coreaudio.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- px_mac_coreaudio.c 2 Oct 2006 00:27:52 -0000 1.1
+++ px_mac_coreaudio.c 24 Nov 2009 03:16:37 -0000 1.2
@@ -81,13 +81,9 @@
info->output = PaMacCore_GetStreamOutputDevice(Px->pa_stream);
if (info->input == kAudioDeviceUnknown) {
- outSize = sizeof(AudioDeviceID);
- err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice,
- &outSize,
- &info->input);
- if (err) {
- return cleanup(Px);
- }
+ /* This probably means it was an output-only stream;
+ * the rest of this fn needs a good input device */
+ return TRUE;
}
outSize = sizeof(UInt32);
Index: px_linux_alsa.c
===================================================================
RCS file: /cvsroot/audacity/lib-src/portmixer/src/px_linux_alsa.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- px_linux_alsa.c 14 Jul 2009 04:06:11 -0000 1.7
+++ px_linux_alsa.c 24 Nov 2009 03:16:37 -0000 1.8
@@ -546,7 +546,8 @@
set_volume_indexed(dev, generic_lookup(dev, "Master"), volume);
/* Ensure pending events are handled...otherwise, they build up */
- snd_mixer_handle_events(info->capture.handle);
+ if (dev->handle)
+ snd_mixer_handle_events(dev->handle);
return;
}
@@ -579,7 +580,8 @@
set_volume_indexed(dev, generic_lookup(dev, "PCM"), volume);
/* Ensure pending events are handled...otherwise, they build up */
- snd_mixer_handle_events(info->capture.handle);
+ if (dev->handle)
+ snd_mixer_handle_events(dev->handle);
return;
}
@@ -716,7 +718,7 @@
long vol;
PxVolume volume = 0.0;
- if (info->capture.source < 0) {
+ if (info->capture.source < 0 || info->capture.numselems < 1) {
return volume;
}
@@ -742,7 +744,7 @@
long max;
long vol;
- if (info->capture.source < 0) {
+ if (info->capture.source < 0 || info->capture.numselems < 1) {
return;
}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs