aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/include/psxspu.h
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2023-04-05 01:30:55 +0200
committerspicyjpeg <thatspicyjpeg@gmail.com>2023-04-05 01:30:55 +0200
commitb4242acc35c522bd4d4a951a84933ba6f80d2015 (patch)
tree02cdff7a11329a7445baae489dd2b38225b12d96 /libpsn00b/include/psxspu.h
parent651415f5b549b363dec971e2ef589cce098ee1f2 (diff)
downloadpsn00bsdk-b4242acc35c522bd4d4a951a84933ba6f80d2015.tar.gz
Clean up all headers, add and rename some BIOS APIs
Diffstat (limited to 'libpsn00b/include/psxspu.h')
-rw-r--r--libpsn00b/include/psxspu.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/libpsn00b/include/psxspu.h b/libpsn00b/include/psxspu.h
index cdc3ac7..d829821 100644
--- a/libpsn00b/include/psxspu.h
+++ b/libpsn00b/include/psxspu.h
@@ -1,10 +1,25 @@
/*
* PSn00bSDK SPU library
- * (C) 2019-2022 Lameguy64, spicyjpeg - MPL licensed
+ * (C) 2019-2023 Lameguy64, spicyjpeg - MPL licensed
*/
-#ifndef __PSXSPU_H
-#define __PSXSPU_H
+/**
+ * @file psxspu.h
+ * @brief SPU library header
+ *
+ * @details The PSn00bSDK SPU library allows for SPU initialization, DMA
+ * transfers (both sample data uploads and capture buffer reads) and provides
+ * helper macros for accessing SPU control registers, which can be used to
+ * control sample playback on each channel, configure reverb and enable more
+ * advanced features such as interrupts.
+ *
+ * This library currently has fewer functions than its Sony SDK counterpart, in
+ * part because it is not yet complete but also since the vast majority of the
+ * Sony library's functions are redundant, inefficient and can be replaced with
+ * simple SPU register writes.
+ */
+
+#pragma once
#include <stdint.h>
#include <stddef.h>
@@ -12,6 +27,7 @@
/* Definitions */
+#if 0
typedef enum _SPU_AttrMask {
SPU_VOICE_VOLL = 1 << 0, // Left volume
SPU_VOICE_VOLR = 1 << 1, // Right volume
@@ -33,6 +49,7 @@ typedef enum _SPU_AttrMask {
SPU_VOICE_ADSR_ADSR1 = 1 << 17,
SPU_VOICE_ADSR_ADSR2 = 1 << 18
} SPU_AttrMask;
+#endif
typedef enum _SPU_TransferMode {
SPU_TRANSFER_BY_DMA = 0,
@@ -46,6 +63,7 @@ typedef enum _SPU_WaitMode {
/* Structure definitions */
+#if 0
typedef struct _SpuVolume {
int16_t left, right;
} SpuVolume;
@@ -72,6 +90,7 @@ typedef struct _SpuCommonAttr {
SpuVolume mvol, mvolmode, mvolx;
SpuExtAttr cd, ext;
} SpuCommonAttr;
+#endif
/* Macros */
@@ -143,5 +162,3 @@ int SpuIsTransferCompleted(int mode);
#ifdef __cplusplus
}
#endif
-
-#endif