Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/ChannelVolumeAudioSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void ChannelVolumeAudioSource::resetAllVolumes()
m_appliedGains.clear();
}

void ChannelVolumeAudioSource::setChannelVolume(size_t channelIndex, float gain)
void ChannelVolumeAudioSource::setChannelVolume(int channelIndex, float gain)
{
const juce::ScopedLock sl(m_lock);

Expand Down Expand Up @@ -130,7 +130,7 @@ int ChannelVolumeAudioSource::channelCount() const
return m_setVolumes.size();
}

void ChannelVolumeAudioSource::updateGain(size_t channelIndex)
void ChannelVolumeAudioSource::updateGain(int channelIndex)
{
bool mute = m_setMutes[channelIndex];
bool solo = m_setSolos[channelIndex];
Expand Down
4 changes: 2 additions & 2 deletions Source/ChannelVolumeAudioSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ChannelVolumeAudioSource : public juce::AudioSource
source specified when this object was created).
@param gain the gain to multiply the samples with during our getNextAudioBlock() callback
*/
void setChannelVolume(size_t channelIndex, float gain);
void setChannelVolume(int channelIndex, float gain);

/** Returns the volume from a channel.
*/
Expand Down Expand Up @@ -80,7 +80,7 @@ class ChannelVolumeAudioSource : public juce::AudioSource

// gain to apply
private:
void updateGain(size_t channelIndex);
void updateGain(int channelIndex);
juce::Array<float> m_appliedGains;

// AudioSource
Expand Down
7 changes: 4 additions & 3 deletions Source/MixerComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,11 @@ void MixerComponent::restoreFromXml(const juce::XmlElement& element)
{
for (size_t i = 0; i < m_channelSliders.size(); i++)
{
juce::String value = element.getChildElement(i)->getAllSubText().trim();
const juce::XmlElement* childElement = element.getChildElement(i);
juce::String value = childElement->getAllSubText().trim();
m_channelSliders[i]->setValue(value.getFloatValue());
m_channelSliders[i]->setSolo(element.getChildElement(i)->getBoolAttribute("solo"));
m_channelSliders[i]->setMute(element.getChildElement(i)->getBoolAttribute("mute"));
m_channelSliders[i]->setSolo(childElement->getBoolAttribute("solo"));
m_channelSliders[i]->setMute(childElement->getBoolAttribute("mute"));
}
}
void MixerComponent::outputChannelNamesReset() {}
Expand Down
4 changes: 2 additions & 2 deletions Source/OutputChannelNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ juce::String OutputChannelNames::getDeviceOutputChannelName(int activeChannelInd
return m_deviceOutputChannelNames[outputChannel];
}

juce::String OutputChannelNames::getInternalOutputChannelName(int activeChannelIndex)
juce::String OutputChannelNames::getInternalOutputChannelName(size_t activeChannelIndex)
{
jassert(activeChannelIndex >= 0 && activeChannelIndex < m_internalOutputChannelNames.size());
jassert(activeChannelIndex < m_internalOutputChannelNames.size());

juce::BigInteger activeOutputChannels = m_audioDevice->getActiveOutputChannels();

Expand Down
2 changes: 1 addition & 1 deletion Source/OutputChannelNames.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class OutputChannelNames
public:
juce::String getDeviceOutputChannelName(int activeChannelIndex);
juce::StringArray getAllDeviceOutputChannelNames();
juce::String getInternalOutputChannelName(int activeChannelIndex);
juce::String getInternalOutputChannelName(size_t activeChannelIndex);
void setInternalOutputChannelName(int activeChannelIndex, const juce::String& text);

private:
Expand Down
6 changes: 3 additions & 3 deletions Source/PluginLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ void PluginLoader::previousEntrySelected(const char* playerName)
}

void PluginLoader::playlistEntrySelected(
const char* playerName, size_t entryIndex, const char* playlistEntryName, double duration)
const char* playerName, int entryIndex, const char* playlistEntryName, double duration)
{
for (const auto& plugin : pluginsV1)
{
Expand All @@ -453,7 +453,7 @@ void PluginLoader::playlistEntrySelected(
}
}

void PluginLoader::playlistEntryNameChanged(const char* playerName, size_t entryIndex, const char* playlistEntryName)
void PluginLoader::playlistEntryNameChanged(const char* playerName, int entryIndex, const char* playlistEntryName)
{
for (const auto& plugin : pluginsV2)
{
Expand All @@ -465,7 +465,7 @@ void PluginLoader::playlistEntryNameChanged(const char* playerName, size_t entry
}
}

void PluginLoader::playlistEntryDurationChanged(const char* playerName, size_t entryIndex, double duration)
void PluginLoader::playlistEntryDurationChanged(const char* playerName, int entryIndex, double duration)
{
for (const auto& plugin : pluginsV2)
{
Expand Down
7 changes: 3 additions & 4 deletions Source/PluginLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ class PluginLoader

void previousEntrySelected(const char* playerName);

void playlistEntrySelected(
const char* playerName, size_t entryIndex, const char* playlistEntryName, double duration);
void playlistEntrySelected(const char* playerName, int entryIndex, const char* playlistEntryName, double duration);

void playlistEntryNameChanged(const char* playerName, size_t entryIndex, const char* playlistEntryName);
void playlistEntryNameChanged(const char* playerName, int entryIndex, const char* playlistEntryName);

void playlistEntryDurationChanged(const char* playerName, size_t entryIndex, double duration);
void playlistEntryDurationChanged(const char* playerName, int entryIndex, double duration);

void trackVolumeChanged(const char* playerName, const char* trackName, float volume);

Expand Down
6 changes: 3 additions & 3 deletions Source/Track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ void Track::setPan(const float pan)
// left = 1.0 ... 1.0 ... 1.0 ... 0.7 ... 0.0 # 1.0 - clmp1
// clmp2 = -1.0 ... 0.3 ... 0.0 ... 0.0 ... 0.0 # clamp(-1.0, 0.0)
// right = 0.0 ... 0.7 ... 1.0 ... 1.0 ... 1.0 # 1.0 - clmp2
const float gainLeft = 1.0 - std::clamp(m_pan, 0.0f, 1.0f);
const float gainRight = 1.0 + std::clamp(m_pan, -1.0f, 0.0f);
const float gainLeft = 1.0f - std::clamp(m_pan, 0.0f, 1.0f);
const float gainRight = 1.0f + std::clamp(m_pan, -1.0f, 0.0f);
m_remappingAudioSource.setSourceChannelGain(0, gainLeft);
m_remappingAudioSource.setSourceChannelGain(1, gainRight);
}
Expand Down Expand Up @@ -376,7 +376,7 @@ void Track::restoreFromXml(const juce::XmlElement& element)
m_stereo = element.getStringAttribute("stereo", "false") == "true";
setMute(element.getStringAttribute("mute", "false") == "true");
setSolo(element.getStringAttribute("solo", "false") == "true");
setPan(element.getDoubleAttribute("pan", m_stereo ? 0.0f : NAN));
setPan(static_cast<float>(element.getDoubleAttribute("pan", m_stereo ? 0.0f : NAN)));
setGain(static_cast<float>(element.getDoubleAttribute("gain", 1.0)));

juce::XmlElement* nameXml = element.getChildByName("Name");
Expand Down