1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-27 02:20:05 +00:00
This commit is contained in:
jules 2008-07-08 17:42:48 +00:00
parent 9d6a41e7f6
commit ac86c4f307
4 changed files with 18 additions and 4 deletions

View file

@ -506,7 +506,7 @@ public:
}
if (setup.maxNumInputChannels > 0
&& setup.minNumOutputChannels < setup.manager->getCurrentAudioDevice()->getInputChannelNames().size())
&& setup.minNumInputChannels < setup.manager->getCurrentAudioDevice()->getInputChannelNames().size())
{
if (inputChanList == 0)
{
@ -936,12 +936,14 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager&
const int minOutputChannels_,
const int maxOutputChannels_,
const bool showMidiInputOptions,
const bool showMidiOutputSelector)
const bool showMidiOutputSelector,
const bool showChannelsAsStereoPairs_)
: deviceManager (deviceManager_),
minOutputChannels (minOutputChannels_),
maxOutputChannels (maxOutputChannels_),
minInputChannels (minInputChannels_),
maxInputChannels (maxInputChannels_),
showChannelsAsStereoPairs (showChannelsAsStereoPairs_),
deviceTypeDropDown (0),
deviceTypeDropDownLabel (0),
audioDeviceSettingsComp (0)
@ -1110,7 +1112,7 @@ void AudioDeviceSelectorComponent::changeListenerCallback (void*)
details.maxNumInputChannels = maxInputChannels;
details.minNumOutputChannels = minOutputChannels;
details.maxNumOutputChannels = maxOutputChannels;
details.useStereoPairs = true;
details.useStereoPairs = showChannelsAsStereoPairs;
audioDeviceSettingsComp = new AudioDeviceSettingsPanel (type, details);

View file

@ -66,6 +66,8 @@ public:
@param maxAudioOutputChannels the maximum number of audio output channels that the application needs
@param showMidiInputOptions if true, the component will allow the user to select which midi inputs are enabled
@param showMidiOutputSelector if true, the component will let the user choose a default midi output device
@param showChannelsAsStereoPairs if true, channels will be treated as pairs; if false, channels will be
treated as a set of separate mono channels.
*/
AudioDeviceSelectorComponent (AudioDeviceManager& deviceManager,
const int minAudioInputChannels,
@ -73,7 +75,8 @@ public:
const int minAudioOutputChannels,
const int maxAudioOutputChannels,
const bool showMidiInputOptions,
const bool showMidiOutputSelector);
const bool showMidiOutputSelector,
const bool showChannelsAsStereoPairs);
/** Destructor */
~AudioDeviceSelectorComponent();
@ -99,6 +102,7 @@ private:
Component* audioDeviceSettingsComp;
String audioDeviceSettingsCompType;
const int minOutputChannels, maxOutputChannels, minInputChannels, maxInputChannels;
const bool showChannelsAsStereoPairs;
MidiInputSelectorComponentListBox* midiInputsList;
Label* midiInputsLabel;

View file

@ -220,6 +220,12 @@ public:
*/
void shareWith (OpenGLContext* contextToShareListsWith);
/** Returns the context that this component is sharing with.
@see shareWith
*/
OpenGLContext* getShareContext() const throw() { return contextToShareListsWith; }
//==============================================================================
/** Flips the openGL buffers over. */
void swapBuffers();

View file

@ -196,6 +196,8 @@ void OutputStream::printf (const char* pf, ...)
const int num = CharacterFunctions::vprintf (buf, bufSize, pf, list);
va_end (list);
if (num > 0)
{
write (buf, num);