Initial commit

This commit is contained in:
Gericom
2025-11-22 17:21:45 +01:00
commit 5d6f67c612
517 changed files with 63025 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#include "common.h"
#include <string.h>
#include "Pcm16FileAudioStream.h"
bool Pcm16FileAudioStream::Open(const TCHAR* filePath)
{
if (_audioFile.Open(filePath, FA_OPEN_EXISTING | FA_READ) != FR_OK)
return false;
if (_audioFile.CreateClusterTable(_clusterTable, sizeof(_clusterTable)) != FR_OK)
return false;
return true;
}
void Pcm16FileAudioStream::Close()
{
_audioFile.Close();
}
void Pcm16FileAudioStream::ReadSamples(s16 *left, s16 *right, u32 count)
{
u32 bytesRead = 0;
_audioFile.Read(left, count * sizeof(s16), bytesRead);
memcpy(right, left, count * sizeof(s16));
}