minor fixes

This commit is contained in:
h4570
2022-08-11 20:39:04 +02:00
parent 5316abce42
commit 74c642bd83
5 changed files with 15 additions and 12 deletions
+8 -6
View File
@@ -37,14 +37,14 @@ class Audio {
void init(); void init();
/** /**
* Load 24bit 22050Hz Stereo WAV. * Load 24bit 22kHz Stereo WAV.
* Can be used multiple times for song switching. * Can be used multiple times for song switching.
* @param t_path Example: "host:song.wav" or "host:folder/song.wav" * @param t_path Example: "host:song.wav" or "host:folder/song.wav"
*/ */
void loadSong(const char* t_path); void loadSong(const char* t_path);
/** /**
* Load 24bit 22050Hz Stereo WAV. * Load 24bit 22kHz Stereo WAV.
* Can be used multiple times for song switching. * Can be used multiple times for song switching.
* @param t_path Example: "host:song.wav" or "host:folder/song.wav" * @param t_path Example: "host:song.wav" or "host:folder/song.wav"
*/ */
@@ -89,15 +89,17 @@ class Audio {
void removeSongListener(const u32& t_id); void removeSongListener(const u32& t_id);
/** /**
* Load ADPCM sample. ADPCM sample is an output from * Load ADPCM sample.
* "adpenc" tool, shipped with PS2SDK. * ADPCM sample is an output from "Convert WAV to ADPCM" task (adpenc tool).
* Adpenc expects 22kHz 16bit file.
* @param t_path Example: "host:hit.adpcm" or "host:folder/jump.adpcm" * @param t_path Example: "host:hit.adpcm" or "host:folder/jump.adpcm"
*/ */
audsrv_adpcm_t* loadADPCM(const char* t_path); audsrv_adpcm_t* loadADPCM(const char* t_path);
/** /**
* Load ADPCM sample. ADPCM sample is an output from * Load ADPCM sample.
* "adpenc" tool, shipped with PS2SDK. * ADPCM sample is an output from "Convert WAV to ADPCM" task (adpenc tool).
* Adpenc expects 22kHz 16bit file.
* @param t_path Example: "host:hit.adpcm" or "host:folder/jump.adpcm" * @param t_path Example: "host:hit.adpcm" or "host:folder/jump.adpcm"
*/ */
inline audsrv_adpcm_t* loadADPCM(const std::string& t_path) { inline audsrv_adpcm_t* loadADPCM(const std::string& t_path) {
+4 -4
View File
@@ -34,10 +34,10 @@ class Pad {
void init(); void init();
void update(); void update();
inline const PadButtons& getClicked() { return clicked; } inline const PadButtons& getClicked() const { return clicked; }
inline const PadButtons& getPressed() { return pressed; } inline const PadButtons& getPressed() const { return pressed; }
inline const PadJoy& getLeftJoyPad() { return leftJoyPad; } inline const PadJoy& getLeftJoyPad() const { return leftJoyPad; }
inline const PadJoy& getRightJoyPad() { return rightJoyPad; } inline const PadJoy& getRightJoyPad() const { return rightJoyPad; }
private: private:
char padBuf[256] alignas(sizeof(char) * 256); char padBuf[256] alignas(sizeof(char) * 256);
+1 -1
View File
@@ -221,7 +221,7 @@ audsrv_adpcm_t* Audio::loadADPCM(const char* t_path) {
u8 data[adpcmFileSize]; u8 data[adpcmFileSize];
rewind(file); rewind(file);
fread(data, sizeof(u8), adpcmFileSize, file); fread(data, sizeof(u8), adpcmFileSize, file);
audsrv_adpcm_t* result = new audsrv_adpcm_t(); auto* result = new audsrv_adpcm_t();
result->size = 0; result->size = 0;
result->buffer = 0; result->buffer = 0;
result->loop = 0; result->loop = 0;
@@ -16,6 +16,7 @@
namespace Tyra { namespace Tyra {
StaPipBagPackager::StaPipBagPackager() {} StaPipBagPackager::StaPipBagPackager() {}
StaPipBagPackager::~StaPipBagPackager() {} StaPipBagPackager::~StaPipBagPackager() {}
void StaPipBagPackager::init(Renderer3DFrustumPlanes* t_frustumPlanes) { void StaPipBagPackager::init(Renderer3DFrustumPlanes* t_frustumPlanes) {
@@ -177,7 +177,7 @@ void StaPipCore::render(StaPipBag* bag, StaPipBagPackagesBBox* bbox) {
if (checkYesFrustumInClipYes || checkYesFrustumInClipNo || checkNoClipNo) { if (checkYesFrustumInClipYes || checkYesFrustumInClipNo || checkNoClipNo) {
u16 packagesCount = 0; u16 packagesCount = 0;
auto biggerPkgs = packager.create(&packagesCount, bag, maxVertCount); auto* biggerPkgs = packager.create(&packagesCount, bag, maxVertCount);
Verbose("Material - in frustum. Pkgs: ", packagesCount, Verbose("Material - in frustum. Pkgs: ", packagesCount,
" size: ", static_cast<int>(biggerPkgs[0].size)); " size: ", static_cast<int>(biggerPkgs[0].size));
for (u16 i = 0; i < packagesCount; i++) { for (u16 i = 0; i < packagesCount; i++) {