Browse Source

tags/2021-05-28
jules 17 years ago
parent
commit
ac86c4f307
4 changed files with 18 additions and 4 deletions
  1. +5
    -3
      src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp
  2. +5
    -1
      src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.h
  3. +6
    -0
      src/juce_appframework/gui/components/special/juce_OpenGLComponent.h
  4. +2
    -0
      src/juce_core/io/juce_OutputStream.cpp

+ 5
- 3
src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp 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);


+ 5
- 1
src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.h 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;


+ 6
- 0
src/juce_appframework/gui/components/special/juce_OpenGLComponent.h 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();


+ 2
- 0
src/juce_core/io/juce_OutputStream.cpp 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);


Loading…
Cancel
Save