Skip to content

Commit

Permalink
clean-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
Raffaello committed Sep 30, 2023
1 parent f0fd8eb commit 3cad67d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <HyperSonicDrivers/drivers/midi/IMidiChannelVoice.hpp>
#include <HyperSonicDrivers/drivers/midi/IMidiChannel.hpp>

namespace HyperSonicDrivers::drivers::midi
{
uint8_t IMidiChannelVoice::getChannelNum() const noexcept
{
return m_channel->channel;
}

void IMidiChannelVoice::setVolumes(const uint8_t volume) noexcept
{
m_volume = volume;
m_real_volume = calcVolume_();
}

uint8_t IMidiChannelVoice::calcVolume_() const noexcept
{
return std::min<uint8_t>((static_cast<uint32_t>(m_volume) * m_channel->volume / 127), 127);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <HyperSonicDrivers/drivers/midi/opl/OplChannel.hpp>

namespace HyperSonicDrivers::drivers::midi::opl
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

#include <HyperSonicDrivers/drivers/midi/IMidiChannel.hpp>

namespace HyperSonicDrivers::drivers::midi::opl
{
class OplChannel : public IMidiChannel
{
public:
OplChannel() = default;
};
}

0 comments on commit 3cad67d

Please sign in to comment.