Prepare MainVolume
This commit is contained in:
@@ -2,6 +2,7 @@ ARTIFACT = libJabyEngine
|
||||
BUILD_DIR = bin
|
||||
|
||||
CCFLAGS += -I../../include
|
||||
CCFLAGS += -save-temps=obj
|
||||
|
||||
include ../../lib/Wildcard.mk
|
||||
SRCS = $(call rwildcard, src, c cpp)
|
||||
|
@@ -2,10 +2,35 @@
|
||||
#include <stdio.h>
|
||||
|
||||
namespace JabyEngine {
|
||||
void start() {
|
||||
SPU::SweepVolume b;
|
||||
namespace SPU {
|
||||
static void clear_voice(::SPU::Voice& voice) {
|
||||
io_class__volatile_assign(voice.volumeLeft, ::SPU::SweepVolume());
|
||||
io_class__volatile_assign(voice.volumeRight, ::SPU::SweepVolume());
|
||||
|
||||
b.set_volume(9);
|
||||
printf("Hello Planschbecken\n");
|
||||
io_class__volatile_assign(voice.sampleRate, ::SPU::SampleRate::from_HZ(0.0));
|
||||
io_class__volatile_assign(voice.adsr, ::SPU::ADSR());
|
||||
io_class__volatile_assign(voice.currentVolume, ::SPU::SweepVolume());
|
||||
|
||||
voice.adr = 0x200;
|
||||
voice.repeatAdr = 0x200;
|
||||
}
|
||||
|
||||
static void setup() {
|
||||
static constexpr auto StartVol = ::SPU::SweepVolume().set_volume_mode().set_volume(::SPU::SweepVolume::VolumeLevelPercent(50.0));
|
||||
|
||||
io_class__volatile_assign(::SPU::MainVolume::Left, StartVol);
|
||||
io_class__volatile_assign(::SPU::MainVolume::Right, StartVol);
|
||||
|
||||
for(auto& voice : ::SPU::Voice::Channel) {
|
||||
clear_voice(voice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void start() {
|
||||
printf("Hello Planschbecken\n");
|
||||
|
||||
SPU::setup();
|
||||
printf("Setup done!\n");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user