[Audacity-devel] Recording Channels
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Martyn S. <mar...@go...> - 2008-06-29 23:53:53
|
Hi I don't have a device with more than 2 recording channels, but I'm offered more in prefs -> Audio I/O ->Recording -> Channels. Is the following a good idea? diff -u -r1.55 AudioIOPrefs.cpp --- AudioIOPrefs.cpp 23 May 2008 16:01:24 -0000 1.55 +++ AudioIOPrefs.cpp 10 Jun 2008 23:24:08 -0000 @@ -76,6 +76,7 @@ int nDevices = Pa_CountDevices(); #endif + int numChannels = 0; // find max no. of record channels available for(j=0; j<nDevices; j++) { const PaDeviceInfo* info = Pa_GetDeviceInfo(j); Name = DeviceName(info); @@ -87,11 +88,12 @@ if (info->maxInputChannels > 0) { mmRecordNames.Add( Name ); mmRecordLabels.Add( Label ); + if (info->maxInputChannels > numChannels) + numChannels = info->maxInputChannels; } } // Channel counts, mono, stereo etc... - const int numChannels = 16; for(int c=0; c<numChannels; c++) { mmChannelNames.Add( wxString::Format(wxT("%d"), c+1)); Not perfect, I know, but better than we have? Martyn |