Add Initial Music Playback, because I just feel like doing it. 😛

Put `Music.wav` to `sdmc:/3ds/Universal-Updater/`. **Warning**: The Wav File should not be larger than 13 / 14 MB, otherwise it will crash.
This commit is contained in:
VoltZ
2019-11-17 22:34:04 +01:00
parent 2921ce0b2d
commit 5f5669678d
3 changed files with 195 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
#pragma once
#include <3ds.h>
#include <string>
class sound
{
public:
sound(const std::string& path, int channel = 1, bool toloop = true);
~sound();
void play();
void stop();
private:
u32 dataSize;
ndspWaveBuf waveBuf;
u8* data = NULL;
int chnl;
};